[PR #6871] [MERGED] feat: simple table issues #7619

Closed
opened 2026-03-23 23:20:27 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/6871
Author: @LucasXu0
Created: 11/28/2024
Status: Merged
Merged: 12/2/2024
Merged by: @LucasXu0

Base: mainHead: table_v2_follow_up


📝 Commits (10+)

  • 392ca8c fix: disable cut command in table cell
  • 4d8c46f feat: only keep the table cell content when coping text from table
  • 6b3a349 fix: focus on the first cell after inserting table
  • e80831c test: focus on the first cell after inserting table
  • 0b88124 feat: highlight the cell when editing
  • b57104e test: highlight the cell when editing
  • 107bc1e fix: creating a new row makes a cursor appear for a fraction of a second
  • dcb9719 fix: add 4px between scroll bar and add row button
  • 3e1f992 chore: rename simple table components
  • 2f5f50f fix: select all in table cell block

📊 Changes

57 files changed (+1462 additions, -454 deletions)

View changed files

📝 frontend/appflowy_flutter/integration_test/desktop/document/document_with_simple_table_test.dart (+339 -11)
📝 frontend/appflowy_flutter/integration_test/desktop/uncategorized/import_files_test.dart (+2 -1)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_configuration.dart (+2 -4)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/actions/block_action_list.dart (+1 -2)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/actions/block_action_option_cubit.dart (+44 -1)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/actions/drag_to_reorder/option_button.dart (+1 -4)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/custom_copy_command.dart (+35 -6)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/custom_cut_command.dart (+6 -2)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/keyboard_interceptor/keyboard_interceptor.dart (+1 -1)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/util/ask_ai_node_extension.dart (+2 -1)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/parsers/markdown_parsers.dart (+2 -0)
frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/parsers/markdown_simple_table_parser.dart (+103 -0)
frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/parsers/simple_table_parser.dart (+86 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/plugins.dart (+2 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/shortcuts/command_shortcuts.dart (+0 -1)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/simple_table/_shared_widget.dart (+214 -110)
frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/simple_table/simple_table.dart (+7 -0)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/simple_table/simple_table_block_component.dart (+48 -41)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/simple_table/simple_table_cell_block_component.dart (+124 -92)
📝 frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/simple_table/simple_table_constants.dart (+29 -4)

...and 37 more files

📄 Description

Feature Preview

follow up with https://github.com/AppFlowy-IO/AppFlowy/pull/6831

  • issues
    • focus on the first cell after inserting table (test)
    • highlight the cell when editing (test)
    • creating a new row makes a cursor appear for a fraction of a second (no test required)
    • the add row button blocks the scroll bar (no test required)
    • ctrl + a to select the content inside the cell (test)
    • disable two-fingers resize in table cell (no test required)
    • + row display logic (no test required)
    • hide the action menu when hovering on add row / column button (no test required)
    • unable to click the part of the drag and drop button that is outside of the cell
      Screenshot 2024-11-28 at 15 02 44
    • popup conflicts in table more action
  • integration tests
    • create a table
    • delete a row(column)
    • insert a row(column)
    • duplicate a row(column)
    • insert left / insert right / insert above / insert below
    • enable header column/row
    • delete the table

PR Checklist

  • My code adheres to AppFlowy's Conventions
  • I've listed at least one issue that this PR fixes in the description above.
  • I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
  • All existing tests are passing.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AppFlowy-IO/AppFlowy/pull/6871 **Author:** [@LucasXu0](https://github.com/LucasXu0) **Created:** 11/28/2024 **Status:** ✅ Merged **Merged:** 12/2/2024 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `table_v2_follow_up` --- ### 📝 Commits (10+) - [`392ca8c`](https://github.com/AppFlowy-IO/AppFlowy/commit/392ca8c9ed0a27611d24cebd573728b9d5b68f1b) fix: disable cut command in table cell - [`4d8c46f`](https://github.com/AppFlowy-IO/AppFlowy/commit/4d8c46fbe27105f98a1be5e68430e960351de05e) feat: only keep the table cell content when coping text from table - [`6b3a349`](https://github.com/AppFlowy-IO/AppFlowy/commit/6b3a349470f0eeb5e7b3654e94280c5181ee550c) fix: focus on the first cell after inserting table - [`e80831c`](https://github.com/AppFlowy-IO/AppFlowy/commit/e80831ccf6c7e0bf41cadd1d97d3df72e8853169) test: focus on the first cell after inserting table - [`0b88124`](https://github.com/AppFlowy-IO/AppFlowy/commit/0b88124a9938d33c256d586016ad722d7bebae4b) feat: highlight the cell when editing - [`b57104e`](https://github.com/AppFlowy-IO/AppFlowy/commit/b57104ebf5a25ba7883c621955c8a2242e4e21ce) test: highlight the cell when editing - [`107bc1e`](https://github.com/AppFlowy-IO/AppFlowy/commit/107bc1ee72c6ab0db75adc054d941633d8e99eae) fix: creating a new row makes a cursor appear for a fraction of a second - [`dcb9719`](https://github.com/AppFlowy-IO/AppFlowy/commit/dcb9719f6b1fce08457c6df0a5c207d471eec51f) fix: add 4px between scroll bar and add row button - [`3e1f992`](https://github.com/AppFlowy-IO/AppFlowy/commit/3e1f992a7ef74be8d145ab6cbc6f323ac3836987) chore: rename simple table components - [`2f5f50f`](https://github.com/AppFlowy-IO/AppFlowy/commit/2f5f50fe8554500db6aa102b37706d1f1435a4ee) fix: select all in table cell block ### 📊 Changes **57 files changed** (+1462 additions, -454 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/integration_test/desktop/document/document_with_simple_table_test.dart` (+339 -11) 📝 `frontend/appflowy_flutter/integration_test/desktop/uncategorized/import_files_test.dart` (+2 -1) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_configuration.dart` (+2 -4) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/actions/block_action_list.dart` (+1 -2) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/actions/block_action_option_cubit.dart` (+44 -1) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/actions/drag_to_reorder/option_button.dart` (+1 -4) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/custom_copy_command.dart` (+35 -6) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/copy_and_paste/custom_cut_command.dart` (+6 -2) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/keyboard_interceptor/keyboard_interceptor.dart` (+1 -1) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/openai/util/ask_ai_node_extension.dart` (+2 -1) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/parsers/markdown_parsers.dart` (+2 -0) ➕ `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/parsers/markdown_simple_table_parser.dart` (+103 -0) ➕ `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/parsers/simple_table_parser.dart` (+86 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/plugins.dart` (+2 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/shortcuts/command_shortcuts.dart` (+0 -1) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/simple_table/_shared_widget.dart` (+214 -110) ➕ `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/simple_table/simple_table.dart` (+7 -0) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/simple_table/simple_table_block_component.dart` (+48 -41) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/simple_table/simple_table_cell_block_component.dart` (+124 -92) 📝 `frontend/appflowy_flutter/lib/plugins/document/presentation/editor_plugins/simple_table/simple_table_constants.dart` (+29 -4) _...and 37 more files_ </details> ### 📄 Description <!--- Thank you for submitting a pull request to AppFlowy. The team will dedicate their best efforts to reviewing and approving your pull request. If you have any questions about the project or feedback for us, please join our [Discord](https://discord.gg/wdjWUXXhtw). --> <!--- If your pull request adds a new feature, please drag and drop a video into this section to showcase what you've done! If not, you may delete this section. --> ### Feature Preview follow up with https://github.com/AppFlowy-IO/AppFlowy/pull/6831 - [x] issues - [x] focus on the first cell after inserting table (test) - [x] highlight the cell when editing (test) - [x] creating a new row makes a cursor appear for a fraction of a second (no test required) - [x] the add row button blocks the scroll bar (no test required) - [x] ctrl + a to select the content inside the cell (test) - [x] disable two-fingers resize in table cell (no test required) - [x] + row display logic (no test required) - [x] hide the action menu when hovering on add row / column button (no test required) - [x] unable to click the part of the drag and drop button that is outside of the cell <img width="454" alt="Screenshot 2024-11-28 at 15 02 44" src="https://github.com/user-attachments/assets/b186d5ff-c17c-4789-b273-aeec9c2e1117"> - [x] popup conflicts in table more action - [x] integration tests - [x] create a table - [x] delete a row(column) - [x] insert a row(column) - [x] duplicate a row(column) - [x] insert left / insert right / insert above / insert below - [x] enable header column/row - [x] delete the table <!--- List at least one issue here that this PR addresses. If it fixes the issue, please use the [fixes](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests) keyword to close the issue. For example: fixes https://github.com/AppFlowy-IO/AppFlowy/pull/2106 --> --- <!--- Before you mark this PR ready for review, run through this checklist! --> #### PR Checklist - [x] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [x] I've listed at least one issue that this PR fixes in the description above. - [x] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [x] All existing tests are passing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 23:20:27 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#7619
No description provided.