[PR #2270] [MERGED] Support ui update when receive doc changes #5178

Closed
opened 2026-03-23 22:17:35 +00:00 by mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/2270
Author: @qinluhe
Created: 4/17/2023
Status: Merged
Merged: 4/24/2023
Merged by: @appflowy

Base: developHead: feat/refactor-tauri-document


📝 Commits (10+)

  • f4708e5 fix: add method
  • 59816da fix: update text block and doc title
  • 1d86824 Merge branch 'develop' of github.com:AppFlowy-IO/AppFlowy into refactor-tauri-document
  • 26811d4 fix: support ui update when receive doc changes
  • 6d696f3 Merge branch 'develop' of github.com:AppFlowy-IO/AppFlowy into refactor-tauri-document
  • e81f706 fix: modify the subscribe change
  • f4f53cb chore: add test for document manager
  • f05aa7c chore: add test for document manager
  • 0197c70 chore: add insert and update test for document manager
  • 726e57a fix: load document data

📊 Changes

43 files changed (+1364 additions, -269 deletions)

View changed files

📝 frontend/appflowy_tauri/src-tauri/Cargo.lock (+71 -57)
frontend/appflowy_tauri/src/appflowy_app/components/document/BlockMenu/BlockMenu.hooks.ts (+30 -0)
frontend/appflowy_tauri/src/appflowy_app/components/document/BlockMenu/MenuItem.hooks.ts (+31 -0)
frontend/appflowy_tauri/src/appflowy_app/components/document/BlockMenu/MenuItem.tsx (+32 -0)
frontend/appflowy_tauri/src/appflowy_app/components/document/BlockMenu/index.tsx (+42 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideTools/BlockSideTools.hooks.tsx (+20 -30)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideTools/index.tsx (+27 -23)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/DocumentTitle/index.tsx (+1 -1)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/Node/index.tsx (+8 -10)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/TextBlock.hooks.ts (+102 -6)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/index.tsx (+14 -12)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/VirtualizedList/index.tsx (+6 -1)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/_shared/HoveringToolbar/index.hooks.ts (+2 -2)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/_shared/HoveringToolbar/index.tsx (+1 -1)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/_shared/TextInput.hooks.ts (+46 -10)
📝 frontend/appflowy_tauri/src/appflowy_app/components/layout/NavigationPanel/FolderItem.hooks.ts (+9 -8)
📝 frontend/appflowy_tauri/src/appflowy_app/interfaces/document.ts (+9 -1)
📝 frontend/appflowy_tauri/src/appflowy_app/stores/effects/document/document_controller.ts (+118 -5)
frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async_actions/backspace.ts (+96 -0)
frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async_actions/delete.ts (+32 -0)

...and 23 more files

📄 Description

Feature Preview

  • flowy-document2 document change PB
  • Support create a document with initial data
  • Support UI updated by change
  • Support Insert and Delete with left toolbar
  • Support indent outdent compose block operation
  • Support split text block when press enter key

PR Checklist

  • My code adheres to the AppFlowy Style Guide
  • 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/2270 **Author:** [@qinluhe](https://github.com/qinluhe) **Created:** 4/17/2023 **Status:** ✅ Merged **Merged:** 4/24/2023 **Merged by:** [@appflowy](https://github.com/appflowy) **Base:** `develop` ← **Head:** `feat/refactor-tauri-document` --- ### 📝 Commits (10+) - [`f4708e5`](https://github.com/AppFlowy-IO/AppFlowy/commit/f4708e51197b5cf2a35cec747641a462760edbb5) fix: add method - [`59816da`](https://github.com/AppFlowy-IO/AppFlowy/commit/59816dafb4171ca56c0d8daea462254c2fd69b77) fix: update text block and doc title - [`1d86824`](https://github.com/AppFlowy-IO/AppFlowy/commit/1d86824a74136b6445de34ffd9bcabce8a65a4bb) Merge branch 'develop' of github.com:AppFlowy-IO/AppFlowy into refactor-tauri-document - [`26811d4`](https://github.com/AppFlowy-IO/AppFlowy/commit/26811d4d357a87143e82a75103dd7db279fd2a2b) fix: support ui update when receive doc changes - [`6d696f3`](https://github.com/AppFlowy-IO/AppFlowy/commit/6d696f337c2bb0bd419f342eb6776950676e7a7e) Merge branch 'develop' of github.com:AppFlowy-IO/AppFlowy into refactor-tauri-document - [`e81f706`](https://github.com/AppFlowy-IO/AppFlowy/commit/e81f7063df48220a5fb5b7ca0298c3abf4921147) fix: modify the subscribe change - [`f4f53cb`](https://github.com/AppFlowy-IO/AppFlowy/commit/f4f53cbecca8298cb3feded41d8d7ac943cc2842) chore: add test for document manager - [`f05aa7c`](https://github.com/AppFlowy-IO/AppFlowy/commit/f05aa7ce18e27a77f6cc3949a0617d16824f0791) chore: add test for document manager - [`0197c70`](https://github.com/AppFlowy-IO/AppFlowy/commit/0197c70b325b74589ed39ef8176cd6e67bff699e) chore: add insert and update test for document manager - [`726e57a`](https://github.com/AppFlowy-IO/AppFlowy/commit/726e57a182e95c7cc9aec2e0c4b4e5ce2798536e) fix: load document data ### 📊 Changes **43 files changed** (+1364 additions, -269 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_tauri/src-tauri/Cargo.lock` (+71 -57) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockMenu/BlockMenu.hooks.ts` (+30 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockMenu/MenuItem.hooks.ts` (+31 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockMenu/MenuItem.tsx` (+32 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockMenu/index.tsx` (+42 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideTools/BlockSideTools.hooks.tsx` (+20 -30) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideTools/index.tsx` (+27 -23) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/DocumentTitle/index.tsx` (+1 -1) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/Node/index.tsx` (+8 -10) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/TextBlock.hooks.ts` (+102 -6) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/index.tsx` (+14 -12) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/VirtualizedList/index.tsx` (+6 -1) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/_shared/HoveringToolbar/index.hooks.ts` (+2 -2) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/_shared/HoveringToolbar/index.tsx` (+1 -1) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/_shared/TextInput.hooks.ts` (+46 -10) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/layout/NavigationPanel/FolderItem.hooks.ts` (+9 -8) 📝 `frontend/appflowy_tauri/src/appflowy_app/interfaces/document.ts` (+9 -1) 📝 `frontend/appflowy_tauri/src/appflowy_app/stores/effects/document/document_controller.ts` (+118 -5) ➕ `frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async_actions/backspace.ts` (+96 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async_actions/delete.ts` (+32 -0) _...and 23 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 <!--- 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 --> - [x] <code>flowy-document2</code> document change PB - [x] Support create a document with initial data - [x] Support UI updated by change - [x] Support Insert and Delete with left toolbar - [x] Support `indent` `outdent` `compose` block operation - [x] Support `split` text block when press `enter` key --- <!--- Before you mark this PR ready for review, run through this checklist! --> #### PR Checklist - [x] My code adheres to the [AppFlowy Style Guide](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/style-guides) - [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 22:17:35 +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#5178
No description provided.