feat: mobile tool bar basic features (#161)

* refactor: refactor mobile toolbar

* feat: add text decoration icon in AFMobileIcons

* chore: update mobile parameter

* feat: add text decoration basic feature

* chore: replace text by AppFlowyEditorLocalizations

* feat: add code toolbar item

* chore: refactor code
- add hasMenu in MToolbarItem
- add const size

* feat: add line input menu

* chore: create toolbar items draft file

* refactor: textDecorationMToolbarItem refactor

* fix: add key to ensures MToolbarWidget is rebuilt whenever the selection changes

* feat: add link toolbar item and the way to close item menu

* chore: replace m by mobile

* chore:replace BuiltInAttributeKey by FlowyRichTextKeys

* chore: replace m by mobile

* refactor: refactor MobileToolbarWidget

* refactor: add MobileToolbarStyle to control all cosmetic parameters

* refactor: refactor MobileToolbarItemMenuBtn to stateless widget

* feat: add heading menu

* fix: fix open the wrong menu

* feat: add heading icon

* feat: add todo list and list toolbar item

* feat: add quote toolbar item

* fix: fix selection service error

* test: add mobile toolbar basic elements test

* test: add item menu button test and helper widgets

* test: add text decoration mobile toolbar item test

* test: add code mobile toolbar item test

* test: add heading mobile toolbar item test

* test: add list mobile toolbar item test

* chore: fix typo

* test: add quote mobile toolbar item test

* test: add todo list mobile toolbar item test

* test: add link mobile toolbar item test

* chore: update name and add Material widget

* fix: flutter analyze

* fix: flutter analyze in test mobile toolbar

* chore: dart format test code

* refactor: improve code

* fix: fix refactor error

* chore: move all the tests in mobile to test/mobile

* chore: move toolbar/items to toolbar/desktop/items

* chore: remove the mobileToolbarItemMenuStateKey

* chore: add some comments

* test: update testing

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
This commit is contained in:
Yijing Huang 2023-06-13 01:01:08 -05:00 • committed by GitHub
commit 6a4a8ae818
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M8 4C7.4477 4 7 4.448 7 5V19C7 19.552 7.4477 20 8 20C8.5523 20 9 19.552 9 19V13H15V19C15 19.552 15.4477 20 16 20C16.5523 20 17 19.552 17 19V5C17 4.448 16.5523 4 16 4C15.4477 4 15 4.448 15 5V11H9V5C9 4.448 8.5523 4 8 4Z" fill="#2F3030"/>
</svg>

After

Width:  |  Height:  |  Size: 349 B