Commit graph appflowy-editor/test/new/block_component
Author SHA1 Message Date
Lucas.Xu
c7d99913aa
feat: support Flutter stable channel (#581)
* feat: adjust toggle list block

* chore: upgrade Flutter to master channel

* chore: upgrade pbxproj

* fix: toolbar copy button not closing on mobile editor

* fix: formatting issues and add missing commas

* chore: add stable branch to GitHub Actions workflow

* chore: add missing trailing commas

* chore: adjust indentation padding in block component
configuration and unit tests
2023-11-08 13:46:33 +08:00
Mathias Mogensen
5b9b6d80f5
feat: power checkbox shortcut (#553) 2023-10-30 11:20:15 +08:00
Mohammad Zolfaghari
189a41f67d
fix: respect default and last direction on new line and indent (#482) 2023-09-20 14:07:38 +08:00
Sun Jiao
ce8a77014e
fix: resolve RangeErrorwhen last row deleted. (#470) 2023-09-17 16:10:14 +08:00
Lucas.Xu
b602141d32 fix: missing a required trailing comma 2023-09-13 15:26:29 +08:00
Lucas.Xu
19f999f422
feat: optimize the performance (#442) 2023-09-11 15:03:14 +08:00
Mohammad Zolfaghari
b429ae6b96
fix: better column resize performance (#434)
* fix: table padding when it gets scrolled

The handler was getting out of region when table width was wider
than editor size.

* fix: modify scroll view padding

* fix: better column resize performance
2023-09-01 10:48:13 +08:00
Lucas.Xu
f205f8040a
fix: table block bugs (#431)
* fix: resizing the table won't send transaction

* fix: lost selection after inserting table block

* fix: test

* refactor: don't pass editorState to TableNode

pass only transaction to methods directly.

* refactor: reduce extra transactions

* fix: mitigate Appflowy transaction adapter problem

With current transaction adapter in Appflowy which creates `BlockActionPB`
for `documentService` (backend). Its not possible to have multiple
`InsertOperation`s separately as a single transaction (multiple
`transaction.insertNode()`). The `BlockActionPB` creator (`toBlockAction`)
can't figure out the `prevId` (previous node of inserting node id), The
first insert operations shifts all next nodes path.
Because of this situation we decided to apply the insert operations one by
one.

* fix: table actions keep selection

* fix: on add col|row respect row|col bg color

* refactor: moving cell related keys to TableCellBlockKeys

* style: dart format

---------

Co-authored-by: Mohammad Zolfaghari <zidom72@gmail.com>
2023-08-31 10:35:23 +08:00
Mohammad Zolfaghari
dd52ce6718
feat: table plugin (#62)
* feat: table plugin requisites

* feat: moved table plugin to appflowy-editor

* fix: flutter analyze

* fix: dont use nested maps in node attributes

rust backend (flowy-document) doesn't support it.

* feat: add table to appflowy editor default selection menu

* feat table markdown encoder

* refactor: apply @Xazin review suggestions

* refactor: merge main and fix color picker conflicts

* feat: table markdown decoder

* fix: use specific backgroun generator for table

* feat: table plugin

* style: adapt new structure

* fix: table columns border height

* fix: adapt new style key commands

* fix: remove table context menu

* test: adapt to main branch changes

* fix: backspace handling regarding table

* fix: flutter analyze

* fix: enter when table cell is bullet list

* fix: selection bug on large table

* feat: row/col action menu

* fix: row action handler positioning

* refactor: merge row and col handler widget

* refactor: add size and color to handler icon

* style(merge): merge main

* feat: added padding and action wrapper

* feat: enable customizing icons and etc

* feat: table menu builder

* fix: table getBlockRect

* refactor: table action button design

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2023-08-29 15:24:25 +08:00
Mohammad Zolfaghari
e2fc87f892
fix: exception on prev node text direction null (#404)
* feat: default text direction property

Introduced default text direction property on editor style. which
accepts rtl|ltr|auto for controlling default fallback direction.
Before this we had something controlled by Directionality but it
had two problems:
1. It didn't accept auto text direction. We had to introduce our
own Directionality component.
2. Directionality also affects layout direction, for example
setting Directionality to RTL will cause the handlers and other
things move to right side of the screen. While this is good but
there are cases which we don't want to change whole layout direction
but only the text default direction to for example auto.

* fix: flutter analyze

* fix: exception on prev node text direction null

The code was throwing excenption on changing current node text
direction to auto when the previous node had text direction attribute
with null value.
Also changed to only use direct previous node text direction and
direct parent for inheriting text direction when the current node
text direction is auto and undeterminable (e.g. empty text).
2023-08-29 15:20:50 +08:00
Mohammad Zolfaghari
9105812cbc
feat: default text direction property (#402)
* feat: default text direction property

Introduced default text direction property on editor style. which
accepts rtl|ltr|auto for controlling default fallback direction.
Before this we had something controlled by Directionality but it
had two problems:
1. It didn't accept auto text direction. We had to introduce our
own Directionality component.
2. Directionality also affects layout direction, for example
setting Directionality to RTL will cause the handlers and other
things move to right side of the screen. While this is good but
there are cases which we don't want to change whole layout direction
but only the text default direction to for example auto.

* fix: flutter analyze

* fix: bugfix on auto as default text direction

* docs: make documentation clear
2023-08-28 17:13:04 +08:00
Mukund Tandon
5a0a6fa5e0
fix: fixed the cursor not moving to next line after inserting divider (#371)
* fix: fixed the cursor not moving to next line after inserting divider

* test: added test

* fix: fixed failing checks

* fix: fixed issues from code review

* refactor: removed the use of depriciated function
2023-08-28 17:11:58 +08:00
Mathias Mogensen
a564c10e87 chore: deprecate Selection.collapse + coverage for selection.dart 2023-08-17 13:13:45 +08:00
Mohammad Zolfaghari
3bd7c2aaa2
fix: indent padding from left when rtl (#318) 2023-07-19 15:58:27 +08:00
Mohammad Zolfaghari
f8da435ad5
feat: support RTL and auto direction (#191) 2023-07-12 10:51:38 +08:00
Lucas.Xu
2b2bce4f3c
fix: analysis issues (#283) 2023-07-04 11:22:35 +08:00
Aman Negi
03bc577fcd
feat: add underline shortcut (#199)
* feat: Add underline divider shortcut

* chore: stage uncommitted files

* chore: Add tests for character_shortcut_event
2023-06-20 22:33:46 +08:00
Lucas.Xu
421ea5917c
feat: support customizing number of the numbered list (#219)
* feat: support customizing number of the numbered list

* test: add tests
2023-06-20 17:13:10 +08:00
Lucas.Xu
76c854bd5a
fix: tabbing whitespace at the front will convert current paragraph into heading (#206) 2023-06-16 11:27:51 +08:00
Gunjan Lunkad
eeae6fe818
feat: added divider to work with * (#118)
* feat: Added divider to work with *

* chore: Resolved the suggested changes

* refactor: removed the check for star character

* feat:added  character variable to insert divider .

* feat: support converting stars ** to divider

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2023-06-07 15:58:28 +08:00
Lucas.Xu
b29d053924 fix: flutter analyze and dart lint 2023-05-22 14:51:57 +08:00
Lucas.Xu
b1a1b14f35 feat: format " to quote 2023-05-16 22:20:22 +08:00
Yijing Huang
378cbfb17a test: add todo list character shortcut test 2023-04-28 16:25:51 -05:00
Lucas.Xu
2bf07055ed feat: implement node extension, allSatisfyInSelection 2023-04-28 19:48:34 +08:00
Lucas.Xu
683318b177 feat: implement heading block 2023-04-28 17:03:58 +08:00
Lucas.Xu
19a6c7a7b4 feat: add testable editor 2023-04-28 10:54:21 +08:00
Lucas.Xu
75ce21cc91 feat: implement converting > to quote style 2023-04-27 16:13:29 +08:00
Lucas.Xu
f624f3a308 feat: implement converting 1. to numbered list style 2023-04-27 15:34:39 +08:00
Lucas.Xu
8bc0b8be99 fix: bulleted list format error 2023-04-26 23:06:16 +08:00
Lucas.Xu
1881573c5f chore: implement delete selection 2023-04-26 14:57:18 +08:00
Lucas.Xu
79d4eb4529 feat: implement the block component builder 2023-04-25 14:45:36 +08:00
Lucas.Xu
813aa1a7a3 feat: implement bulleted list shortcut 2023-04-23 21:26:05 +08:00