[PR #1259] [MERGED] AppFlowy Editor refactoring #4627

Closed
opened 2026-03-23 21:38:38 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/1259
Author: @LucasXu0
Created: 10/10/2022
Status: Merged
Merged: 10/11/2022
Merged by: @LucasXu0

Base: mainHead: refactor


📝 Commits (10+)

  • 11eca2b refactor: move node to core/document
  • cbb6b2d refactor: move attributes to core/document
  • 7f92f89 refactor: move node_iterator to core/document
  • b9788bc refactor: move path to core/document
  • e095fd4 refactor: move text_delta to core/document
  • b0257a6 refactor: move position to core/selection
  • d02c294 refactor: move selection to core/location
  • 5e7507c refactor: rename state_tree to document and move document to core/state
  • b10ff5e refactor: move built_in_attributes_key to core/legacy
  • 805bdc9 refactor: move document.dart to core/document

📊 Changes

93 files changed (+2543 additions, -2006 deletions)

View changed files

📝 frontend/app_flowy/packages/appflowy_editor/README.md (+1 -1)
📝 frontend/app_flowy/packages/appflowy_editor/example/lib/main.dart (+1 -1)
📝 frontend/app_flowy/packages/appflowy_editor/example/lib/plugin/code_block_node_widget.dart (+15 -17)
📝 frontend/app_flowy/packages/appflowy_editor/example/lib/plugin/horizontal_rule_node_widget.dart (+11 -12)
📝 frontend/app_flowy/packages/appflowy_editor/example/lib/plugin/tex_block_node_widget.dart (+14 -16)
📝 frontend/app_flowy/packages/appflowy_editor/example/lib/plugin/underscore_to_italic.dart (+4 -4)
📝 frontend/app_flowy/packages/appflowy_editor/lib/appflowy_editor.dart (+10 -12)
📝 frontend/app_flowy/packages/appflowy_editor/lib/src/commands/edit_text.dart (+5 -6)
📝 frontend/app_flowy/packages/appflowy_editor/lib/src/commands/format_built_in_text.dart (+5 -5)
📝 frontend/app_flowy/packages/appflowy_editor/lib/src/commands/format_text.dart (+14 -17)
📝 frontend/app_flowy/packages/appflowy_editor/lib/src/commands/text_command_infra.dart (+3 -3)
frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/attributes.dart (+51 -0)
frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/document.dart (+118 -0)
📝 frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/node.dart (+105 -85)
📝 frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/node_iterator.dart (+24 -26)
📝 frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/path.dart (+30 -6)
📝 frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/text_delta.dart (+229 -247)
📝 frontend/app_flowy/packages/appflowy_editor/lib/src/core/legacy/built_in_attribute_keys.dart (+0 -0)
📝 frontend/app_flowy/packages/appflowy_editor/lib/src/core/location/position.dart (+12 -14)
📝 frontend/app_flowy/packages/appflowy_editor/lib/src/core/location/selection.dart (+40 -33)

...and 73 more files

📄 Description

  • Extract the key code to the Core directory.
    • document
    • location
    • transform
  • Add more test cases to update the test coverage of the key code.
  • Add documentation and comments.

Breaking Changes:

  • rename state_tree to document.
  • delete transaction_builder.

🔄 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/1259 **Author:** [@LucasXu0](https://github.com/LucasXu0) **Created:** 10/10/2022 **Status:** ✅ Merged **Merged:** 10/11/2022 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `refactor` --- ### 📝 Commits (10+) - [`11eca2b`](https://github.com/AppFlowy-IO/AppFlowy/commit/11eca2b3d93ef95513f379073888c5f5f6ced35c) refactor: move node to core/document - [`cbb6b2d`](https://github.com/AppFlowy-IO/AppFlowy/commit/cbb6b2d9b04fcae8f6036c1405f2eb4bc637b38c) refactor: move attributes to core/document - [`7f92f89`](https://github.com/AppFlowy-IO/AppFlowy/commit/7f92f8988f6d70773ceb788bfa6127957f40e147) refactor: move node_iterator to core/document - [`b9788bc`](https://github.com/AppFlowy-IO/AppFlowy/commit/b9788bce09731352bc10ac76b3b8f210020e459d) refactor: move path to core/document - [`e095fd4`](https://github.com/AppFlowy-IO/AppFlowy/commit/e095fd41818e9a0dddae870405f7a98977c366f6) refactor: move text_delta to core/document - [`b0257a6`](https://github.com/AppFlowy-IO/AppFlowy/commit/b0257a626d226073caecdd44016ba9103138176b) refactor: move position to core/selection - [`d02c294`](https://github.com/AppFlowy-IO/AppFlowy/commit/d02c29426e3fa2bf76aad6bc7ab4c3cb02168d11) refactor: move selection to core/location - [`5e7507c`](https://github.com/AppFlowy-IO/AppFlowy/commit/5e7507c8e7a5c9ce9f4fdfed701b6ded5f2f97d3) refactor: rename state_tree to document and move document to core/state - [`b10ff5e`](https://github.com/AppFlowy-IO/AppFlowy/commit/b10ff5e68ef33b6d872c30375061979ab29f6ec4) refactor: move built_in_attributes_key to core/legacy - [`805bdc9`](https://github.com/AppFlowy-IO/AppFlowy/commit/805bdc9d32098baff6e741817035c0969c6ebad3) refactor: move document.dart to core/document ### 📊 Changes **93 files changed** (+2543 additions, -2006 deletions) <details> <summary>View changed files</summary> 📝 `frontend/app_flowy/packages/appflowy_editor/README.md` (+1 -1) 📝 `frontend/app_flowy/packages/appflowy_editor/example/lib/main.dart` (+1 -1) 📝 `frontend/app_flowy/packages/appflowy_editor/example/lib/plugin/code_block_node_widget.dart` (+15 -17) 📝 `frontend/app_flowy/packages/appflowy_editor/example/lib/plugin/horizontal_rule_node_widget.dart` (+11 -12) 📝 `frontend/app_flowy/packages/appflowy_editor/example/lib/plugin/tex_block_node_widget.dart` (+14 -16) 📝 `frontend/app_flowy/packages/appflowy_editor/example/lib/plugin/underscore_to_italic.dart` (+4 -4) 📝 `frontend/app_flowy/packages/appflowy_editor/lib/appflowy_editor.dart` (+10 -12) 📝 `frontend/app_flowy/packages/appflowy_editor/lib/src/commands/edit_text.dart` (+5 -6) 📝 `frontend/app_flowy/packages/appflowy_editor/lib/src/commands/format_built_in_text.dart` (+5 -5) 📝 `frontend/app_flowy/packages/appflowy_editor/lib/src/commands/format_text.dart` (+14 -17) 📝 `frontend/app_flowy/packages/appflowy_editor/lib/src/commands/text_command_infra.dart` (+3 -3) ➕ `frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/attributes.dart` (+51 -0) ➕ `frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/document.dart` (+118 -0) 📝 `frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/node.dart` (+105 -85) 📝 `frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/node_iterator.dart` (+24 -26) 📝 `frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/path.dart` (+30 -6) 📝 `frontend/app_flowy/packages/appflowy_editor/lib/src/core/document/text_delta.dart` (+229 -247) 📝 `frontend/app_flowy/packages/appflowy_editor/lib/src/core/legacy/built_in_attribute_keys.dart` (+0 -0) 📝 `frontend/app_flowy/packages/appflowy_editor/lib/src/core/location/position.dart` (+12 -14) 📝 `frontend/app_flowy/packages/appflowy_editor/lib/src/core/location/selection.dart` (+40 -33) _...and 73 more files_ </details> ### 📄 Description * Extract the key code to the Core directory. * document * location * transform * Add more test cases to update the test coverage of the key code. * Add documentation and comments. Breaking Changes: * rename state_tree to document. * delete transaction_builder. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 21:38:38 +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#4627
No description provided.