-
Notifications
You must be signed in to change notification settings - Fork 210
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
feat: Table navigation using TAB key #627
Conversation
Would be nice to also have Shift+tab to move the reverse way. |
yeah, the issue was, that |
Hi @Xazin, could you review my PR when you get a chance? Thank you! |
@AnsahMohammad Can you add the tests to cover the code? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #627 +/- ##
==========================================
+ Coverage 78.25% 78.31% +0.05%
==========================================
Files 290 291 +1
Lines 12698 12805 +107
==========================================
+ Hits 9937 10028 +91
- Misses 2761 2777 +16 ☔ View full report in Codecov by Sentry. |
@LucasXu0 I have added tests for Tab, Shift+Tab, Arrow Right and Arrow Left. |
ready for review 👍 |
Nice! I will check it now. |
@@ -152,6 +166,42 @@ CommandShortcutEventHandler _downInTableCellHandler = (editorState) { | |||
return KeyEventResult.ignored; | |||
}; | |||
|
|||
CommandShortcutEventHandler _tabInTableCellHandler = (editorState) { | |||
final inTableNodes = _inTableNodes(editorState); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the _hasSelectionAndTableCell
always return true if the result of _inTableNodes
is not empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, we check for the following conditions too :
nodes.length == 1 &&
selection != null &&
selection.isCollapsed &&
nodes.first.parent?.type == TableCellBlockKeys.type;
lib/src/editor/block_component/table_block_component/table_commands.dart
Outdated
Show resolved
Hide resolved
lib/src/editor/block_component/table_block_component/table_commands.dart
Outdated
Show resolved
Hide resolved
lib/src/editor/block_component/table_block_component/table_commands.dart
Outdated
Show resolved
Hide resolved
lib/src/editor/block_component/table_block_component/table_commands.dart
Outdated
Show resolved
Hide resolved
lib/src/editor/block_component/table_block_component/table_commands.dart
Outdated
Show resolved
Hide resolved
lib/src/editor/block_component/table_block_component/table_commands.dart
Outdated
Show resolved
Hide resolved
lib/src/editor/block_component/table_block_component/table_commands.dart
Outdated
Show resolved
Hide resolved
Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
* main: feat: table navigation using TAB key (AppFlowy-IO#627) feat: add markdown link syntax formatting (AppFlowy-IO#618) fix:text_decoration_mobile_toolbar_padding (AppFlowy-IO#621) fix: active hover on upload image (AppFlowy-IO#597) feat: adding an ability to have a link check before embedding (AppFlowy-IO#603) fix: node_iterator toList encounter Dangling Node trigger dead loop. (AppFlowy-IO#623)
Implemented the navigation of Table cells using TAB key
This PR solves [FR] Table Cells navigation using TAB key #3982