Commit graph appflowy-editor/test/new/block_component
Author SHA1 Message Date
81c3006c74
Fit a read-only table's rows to their cells
Some checks failed
Commit messages lint / commitlint (push) Has been cancelled
A table keeps each row's height on its cells, corrected after every
layout through a transaction. A read-only editor applies no transaction
(EditorState.apply returns while it isn't editable), so a table shown
read-only kept the heights it was stored with, or the default of one
line: a cell of several lines ran over its row's borders. The table's
own height (colsHeight) already took the read-only case in place; the
rows' heights now do the same. Upstream's main has the same code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MMm7usAo6q9ZZRoPkWjoxi
2026-10-11 19:40:50 +02:00
Lucas
41335c54ae
chore: merge flutter 3_27_4 into main branch (#1228)
* chore: merge flutter/3_27_4 to main branch

* chore: code format

* fix: unit tests
2026-07-27 15:37:27 +08:00
Ahad Patel
8d3f5b904b
feat: add command shortcut keys to convert text to title (#921)
* feat: add command shortcut keys to convert text to title

* fix: use const values from heading block keys

* chore: add test cases for command

* fix: comments and nomenclature

* chore: add appropriate description
2024-12-11 17:07:18 +08:00
Lucas
eccb24452a
fix: cursor height is inconsistent when the font size is smaller than the default text size (#958)
* fix: cursor height is inconsistent when the font size is smaller than the default text size

* fix: widget tests
2024-11-01 13:19:17 +08:00
Lucas.Xu
44989c568e
feat: optimize the table node parse steps and add logs (#875)
* feat: optimize the table node parse steps and add logs

* feat: support table cell node construtor

* fix: widget test
2024-09-04 13:57:46 +08:00
Lucas.Xu
8e17d1447e
feat: optimize table update (#869)
* feat: optimize table update

* fix: combine the table transactions
2024-08-16 10:52:48 +08:00
Lucas.Xu
8b9ccf83fd
fix: render issue of nested list (#838)
* fix: render issue of nested list

* fix: table board doesn't show in readonly mode

* fix: ci tests
2024-07-04 16:58:57 +08:00
Lucas.Xu
796d1249fe
chore: upgrade Flutter to 3.22.0 (#797) 2024-05-14 14:05:38 +08:00
q200892907
a9ef209c55
feat: add table style (#766) 2024-04-16 15:41:08 +08:00
Lucas.Xu
cbd92c4cd1
feat: disable converting heading block to numbered list block (#740) 2024-03-11 10:42:52 +08:00
Lucas.Xu
5e5b908e78
fix: resolve data loss issue during block type conversion (#726)
* fix: resolve data loss issue during block type conversion

* fix: flutter test

* test: add more tests
2024-02-26 09:44:43 +08:00
Ansah Mohammad
7ec43c9eee
feat: table navigation using TAB key (#627)
* feat: table navigation using TAB key

* feat: shift+tab for reverse navigation in table

* chore: circular traversal for arrow left and right

* test: added tests for tab and shift-tab commands in Table

* test: added tests for arrow left and right in table

* test: added corner case for tab and shift tab

* refactor: made changes as per the review

* refactor: Apply suggestions from code review

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
2024-01-02 12:18:23 +08:00
q200892907
c63d664513
feat: display number in latin or roman format (#595) 2023-11-18 13:48:17 +08:00
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