-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interactive Book Integration Phase 1 | GSoC 2021 #110
Commits on Jul 6, 2021
-
Bringup Interactive Book UI Views.
* Moved common drawer tile to components as CVDrawerTile. * Added a IbTheme class for custom styles. * Bringup "Hardcoded" IbLandingView and it's UI Test. * Bringup "Hardcoded" IbPageView and it's UI Test. Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 313e772 - Browse repository at this point
Copy the full SHA 313e772View commit details -
IbPageView: Implement Table of Contents UI.
* Uses Function Callback to run the function in IbPageView when TOC button is pressed in AppBar (present in IbLandingView) * Intentially added Future.delayed() when callback function is recieved, as in our hardcoded scenerio, setState() is called even before the Widget fully builds. This will be not required when data is coming from ViewModel via async methods. * Table of Contents uses Bottom Modal Sheets with Scroll Controller. Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fe2031e - Browse repository at this point
Copy the full SHA fe2031eView commit details -
IbPageView: Fading Floating Action Buttons for readability
* Floating Action Buttons now fades in if we scroll down and accordingly fades out if we scroll up. Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for dc88b2b - Browse repository at this point
Copy the full SHA dc88b2bView commit details -
IbPageView: Improve Floating Action Buttons.
* Made Button size smaller. * Color Scheme follows white as bg color and primary color as Icon's color. * Restore elevation to default (6.0) to show drop shadow. Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 29618f5 - Browse repository at this point
Copy the full SHA 29618f5View commit details -
IbLandingView: Seperate Actions for Expandable tile Drawer
The current Interactive Book has pages for Parent pages like "Binary Algebra". Currently, mobile-app has the expandable tile which will be just expanding and showing sub-pages. We want to have seperate actions for arrow and text such that the text will open it's "Parent Page" and arrows/whitespace will expand to show child pages. * Uses Gesture Detector to incorporate different action for Text. * Produces no UI differences and works as expected. ref: https://stackoverflow.com/a/61573993 Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5bdcdfd - Browse repository at this point
Copy the full SHA 5bdcdfdView commit details -
UI Tests: Fix Landing View Test due to recent changes
* Future.delayed() introduced in callback function causes Timer to throw errors. ref: https://stackoverflow.com/q/56600290 * Incorporate Floating Action Buttons changes to fix test. Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b4d06a5 - Browse repository at this point
Copy the full SHA b4d06a5View commit details -
GH Actions: Temporarily enable ib branch to run CI.
* I almost forgot to run Tests after doing changes. * Should be reverted before merging back to master. Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d4701bd - Browse repository at this point
Copy the full SHA d4701bdView commit details -
Models: Bringup Interactive Book Models.
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for db8c834 - Browse repository at this point
Copy the full SHA db8c834View commit details -
Services: Implement Interactive Book APIs
* API for fetching Raw Page Data and Fetching Pages list * We are not serializing and returning modal for fetching pages list since directory modals are redundant and we only want to use them for recursively reading pages from directories, which will be handled by our Interactive Book Engine Service. * For Raw Page Data, our response is serialized in `IbRawPageData` model. Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for dc140e6 - Browse repository at this point
Copy the full SHA dc140e6View commit details -
IbPageView: Use camelCasing for constructor variable.
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a1e9e07 - Browse repository at this point
Copy the full SHA a1e9e07View commit details -
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c3e4704 - Browse repository at this point
Copy the full SHA c3e4704View commit details -
Models: Replace IbRawPage with IbChapter.
* In-order to build Navigation and Drawer List Items, we realized that IbRawPage is just too overkill for the requirement. We just need title and ids to build Navigation and Drawer Lists. Also, since data is not getting serialized directly from API, IbEngineService is expected to create models from this RAW JSON. Moreover, this IbRawPage is already included in IbRawPageData which will fetched for every page content. * From now onwards, IbChapter[] will be received from the IbEngineService and will be used just for Book Structure and Navigation. * IbChapter includes previous page id, next page id because IbRawPageData won't have this. The only way to get prev and next is finding them while preparing Navigation and structure. Accordingly, IbPageView should also require prev and next from the IbLandingView to show Previous and Next buttons action. Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7cdae74 - Browse repository at this point
Copy the full SHA 7cdae74View commit details -
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 27a6898 - Browse repository at this point
Copy the full SHA 27a6898View commit details -
Services: Bringup Interactive Book Engine
* Implemented getChapters() and getPageData(). * IbChapter now includes navOrder since it was needed to sort the navigation pages. * IbChapters that includes prev, and next for FABs and navigation are not implemented yet. * getPageData() supports basic Mardkdown parsing like #,##,###,--- and { tags } as done in POC: #44 * Table of Contents is yet to be implemented while fetching getPageData() Testing - * IbEngineService Tests are running well which uses mocked real-time data. * IbChapters since due to nested paging, was expected to take time. I ran a quick real-time test of it on mobile-app to see the performance, it takes approx 1-2 secs on a normal broadband. Also, according to the plans, ViewModel will be able to cache the data for the whole session. Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ed6a262 - Browse repository at this point
Copy the full SHA ed6a262View commit details -
Implement Interactive Book ViewModels.
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for cb0a2f0 - Browse repository at this point
Copy the full SHA cb0a2f0View commit details -
IbEngineService: Implement Navigation
* Navigation includes previous and next buttons are not included in the APIs responses, so we have to manually build using the list of chapters. * The logic involves flattening the nested list and assigning prev and next in IbChapter Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 60e4064 - Browse repository at this point
Copy the full SHA 60e4064View commit details -
IbEngineService: Implement Table of Contents parsing
* The strategy is to parse using html package and recursively parse the lists. * The list data will be stored in IbTocItem as part of IbContent. * Added a new test case for a regular page (Contributing Guidelines) which uses almost every kind of content, it will be helpful in future testing as well as to test Table of Contents. * Since the data was too long, data is stored in JSON for clean and untouched response. * Logic computes the numbers and alphabetes while parsing and prepends to the content. Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2ca4e28 - Browse repository at this point
Copy the full SHA 2ca4e28View commit details -
IbEngine: Include Table of Contents Filters.
* Table of Contents has it's title and list text which is not required in mobile-app as it's now in bottom sheet. * These filters will simply won't add them to Content models. Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2c3fd0c - Browse repository at this point
Copy the full SHA 2c3fd0cView commit details -
IbChapter: Use obj ref for prev, next attrs
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e6191f0 - Browse repository at this point
Copy the full SHA e6191f0View commit details -
Implement ViewModels to Interactive Book views.
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 39c1d0c - Browse repository at this point
Copy the full SHA 39c1d0cView commit details -
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1d0c322 - Browse repository at this point
Copy the full SHA 1d0c322View commit details -
Interactive Book: Switch to flutter_markdown
* We found out that flutter_markdown which is maintained by flutter team, is already supporting GitHub flavoured Markdown, therefore we replaced our parser with flutter_markdown. * Creates almost no UI changes. * Already supports inline markdown syntaxes (not HTML inline syntaxes which is TODO) * Supports img and anchor links (needs to be reworked with respect to local and absolute URLs) * Added Custom Syntaxes and Builders for our purposes. * API Utils: Now supports UTF-8 Decoder as well. It was noticed that API Raw Page Data was not UTF-8 decoded. Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 78c4217 - Browse repository at this point
Copy the full SHA 78c4217View commit details -
IB: Bringup Simulator embeds extension using webview.
* flutter_markdown has some issues because of which we are using our own fork of the same. (manjotsidhu/packages@29bb87f) * We have updated flutter_markdown from 0.5.2 -> 0.6.2. * flutter_html needed update because of Sub6Resources/flutter_html#500. * flutter_html updated from 1.0.2 -> 1.3.0, which depends on flutter_svg, flutter_svg updated from 0.19.3 -> 0.20.0-nullsafety.3 Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 57179ee - Browse repository at this point
Copy the full SHA 57179eeView commit details -
Switch to CV fork of flutter_markdown package
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 52d2fa0 - Browse repository at this point
Copy the full SHA 52d2fa0View commit details -
Ib: Implement Chapter Contents for parent pages.
* Added support for Liquid syntax parsing. * Chapter Contents is parsed from HTML content and then passed via PageData. Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e7d1cd8 - Browse repository at this point
Copy the full SHA e7d1cd8View commit details -
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fa5e854 - Browse repository at this point
Copy the full SHA fa5e854View commit details -
Markdown: Set image root path as IB_BASE_URL.
* There are 3 types of img tags used in Interactive Book: Type 1: Markdown Image: `![alternate text](https://img-link/file.png)` Type 2: Liquid Syntax Image (Recommended in Guidelines): `{% include image.html url="https://img-link/file.png" description="alternate text" %}` Type 3: HTML Image Tag: `<img src="https://img-link/file.png" />` (Not supported) * This will not fix *every* image tag in interactive book but it does fix type 1 Images. * Type 3 Images will be converted to Type 2 and Type 2 implementation is a TODO. Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 08efe82 - Browse repository at this point
Copy the full SHA 08efe82View commit details -
* Ideally, we should not parse pop quizes using markdown. * We will have a special widget that will build Pop Quizes. Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7f1ba0d - Browse repository at this point
Copy the full SHA 7f1ba0dView commit details -
IbLiquidSyntax: Add support for images via liquid tags.
* Still this is not a full working solution since Flutter's Image.network is not capable of handling SVG. * We will need to override and add our custom Image Builder that will use flutter_svg package. Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 60ff798 - Browse repository at this point
Copy the full SHA 60ff798View commit details -
IbEngine: Encode HTML characters using HtmlUnescape.
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1d5fe7d - Browse repository at this point
Copy the full SHA 1d5fe7dView commit details -
IbPageView: Launch absolute links on external browser. #104
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bfc546d - Browse repository at this point
Copy the full SHA bfc546dView commit details -
IbTheme: Independent of CVTheme.
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a6c6d63 - Browse repository at this point
Copy the full SHA a6c6d63View commit details -
IbPageView: Use Scrollbar with ScrollView
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1de0db9 - Browse repository at this point
Copy the full SHA 1de0db9View commit details -
IbPageView: Scrollbar: Disable always shown.
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 45ff247 - Browse repository at this point
Copy the full SHA 45ff247View commit details -
* Get.snackbar now accepts message and title mandatory. * Http package now accepts Uri instead of String. * Manual Testing is highly recommended. Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ad6b3d9 - Browse repository at this point
Copy the full SHA ad6b3d9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2ccdad1 - Browse repository at this point
Copy the full SHA 2ccdad1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0a4a2fd - Browse repository at this point
Copy the full SHA 0a4a2fdView commit details -
conf: update flutter SDK to support extensions
* Ref: https://stackoverflow.com/questions/61779848/flutter-extension-methods-not-working-it-says-undefined-class-and-requires-t Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2d43532 - Browse repository at this point
Copy the full SHA 2d43532View commit details -
Services: Bringup hive database service.
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for e78340e - Browse repository at this point
Copy the full SHA e78340eView commit details -
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f652b82 - Browse repository at this point
Copy the full SHA f652b82View commit details -
DatabaseServiceTest: Fix test for MacOS.
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b875812 - Browse repository at this point
Copy the full SHA b875812View commit details
Commits on Jul 13, 2021
-
Ib: Cache getChapters API using Hive.
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 0a393ab - Browse repository at this point
Copy the full SHA 0a393abView commit details
Commits on Jul 14, 2021
-
IbPageView: Reduce divider thickness.
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d2c69a5 - Browse repository at this point
Copy the full SHA d2c69a5View commit details -
IbLandingView: Highlight and expand selected chapter.
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1af9117 - Browse repository at this point
Copy the full SHA 1af9117View commit details -
IbLandingView: Fixes and Improvements
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9483557 - Browse repository at this point
Copy the full SHA 9483557View commit details
Commits on Jul 15, 2021
-
IbLandingView: properly init and dispose valueNotifier.
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5fed1ed - Browse repository at this point
Copy the full SHA 5fed1edView commit details
Commits on Jul 20, 2021
-
Ib: Bringup HTML Interactions!
Signed-off-by: Manjot Sidhu <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fea7d6b - Browse repository at this point
Copy the full SHA fea7d6bView commit details