feat: migrate link menu and color picker (#4)
* chore: move selectionRects to editorState * chore: delete unused attributeKey font * feat: refactor showLinkMenu and LinkMenu * feat: replace old linkMenu * feat: add text color toolbar item - separate text color and highlight color item in toolbar - renaming in BuiltInAttributeKey(color -> textColor, backgroundColor -> highlightColor) - add text color and highlight color attribute in example.json - add icons for text color and highlight color in the toolbar * feat: add highlight color item in toolbar - add clear highlight color button - add onDismiss in ColorPicker to remove the overlay after remove highlight color * chore: delete old ColorPicker * test: migrate link menu test * chore: remove editorStyle from color menu and color picker * test: add color picker test * feat: remove editor style from link menu - add utils function and widgets for overlay - organize utils folder - add constant text into AppFlowyEditorLocalizations - improve pop up menu style * feat: add show link menu command shortcut - refactor CommandShortcutEventHandler - update related callback * feat: add showTextColorMenuCommand and showHighlightColorMenuCommand * fix: fix merge error in example.json * refactor: reorganize the file hierarchy * refactor: migrate format_style_handler_test.dart - delete format_style_handler_test.dart - migrate to markdown_commands_test.dart - move highlight test outside of markdown_commands_test * feat: delete show menu type command shortcut and their tooltip * fix: fix tooltip text * chore: delete context from CommandShortcutEventHandler * feat: add command shortcut for link menu * test: add show link menu command test
This commit is contained in:
parent
11f557d4dd
commit
5c43d1daad
4 changed files with 1356 additions and 1379 deletions
1
assets/images/toolbar/clear_highlight_color.svg
Normal file
1
assets/images/toolbar/clear_highlight_color.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M757 780 316 339l164-163 225 222q44 44 69.5 101T800 622q0 39-12 81t-31 77Zm49 220L676 870q-38 31-90 48.5T480 936q-132 0-226-91.5T160 621q0-57 17-106t53-91L57 251l43-43 749 749-43 43Z" fill="white"/></svg>
|
||||
|
After Width: | Height: | Size: 299 B |
|
|
@ -1,5 +0,0 @@
|
|||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13 7.87829V5.125C13 4.82663 12.8946 4.54048 12.7071 4.3295C12.5196 4.11853 12.2652 4 12 4H4C3.73478 4 3.48043 4.11853 3.29289 4.3295C3.10536 4.54048 3 4.82663 3 5.125V10.875C3 11.1734 3.10536 11.4595 3.29289 11.6705C3.48043 11.8815 3.73478 12 4 12H8.44737" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<rect width="1" height="4" rx="0.5" transform="matrix(-1 0 0 1 13.5 10)" fill="white"/>
|
||||
<rect width="1" height="4" rx="0.5" transform="matrix(1.19249e-08 -1 -1 -1.19249e-08 15 12.5)" fill="white"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 632 B |
1
assets/images/toolbar/highlight_color.svg
Normal file
1
assets/images/toolbar/highlight_color.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M80 1056V935h800v121H80Zm343-631 200 200-172 172q-19 19-52.5 19T346 797l-11-11-43 43H137l120-120-4-4q-22-22-21.5-55.5T254 594l169-169Zm43-43 189-189q17-17 43-17t43 17l112 112q17 17 16.5 45.5T852 396L666 582 466 382Z" fill="white"/></svg>
|
||||
|
After Width: | Height: | Size: 332 B |
1
assets/images/toolbar/text_color.svg
Normal file
1
assets/images/toolbar/text_color.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 96 960 960" width="48"><path d="M90 1056V916h780v140H90Zm130-280 220-560h80l220 560h-75l-57-150H352l-57 150h-75Zm156-214h208L482 291h-4L376 562Z" fill="white"/></svg>
|
||||
|
After Width: | Height: | Size: 229 B |
Loading…
Reference in a new issue