[PR #2808] [MERGED] Support document multiple instance and change doc_id from String to &str #5432

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/2808
Author: @qinluhe
Created: 6/15/2023
Status: Merged
Merged: 6/17/2023
Merged by: @qinluhe

Base: mainHead: fix/document-multiple-instance


📝 Commits (10+)

  • 106f317 fix: support multiple document
  • 50dee2a fix: change the doc_id params to ref
  • fbf3ee5 fix: function to converge subscription state
  • 825fc78 fix: mousedown behavior update
  • 586df7b fix: turn to textblock when the enter pressed in empty block
  • b5712a4 fix: support cut
  • 259485e fix: emoji caret
  • 03bd82c fix: support slash arrow key
  • 51f24fc fix: eslint padding-line-between-statements
  • 7d277f7 fix: add comment

📊 Changes

79 files changed (+1792 additions, -750 deletions)

View changed files

📝 frontend/appflowy_tauri/.eslintrc.cjs (+10 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSelection/BlockRangeSelection.hooks.ts (+37 -19)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSelection/BlockRectSelection.hooks.ts (+23 -6)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSelection/NodesRect.hooks.ts (+4 -7)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSelection/RangeKeyDown.hooks.ts (+6 -4)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideToolbar/BlockMenu.hooks.ts (+3 -3)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideToolbar/BlockMenu.tsx (+134 -44)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideToolbar/BlockMenuTurnInto.tsx (+12 -13)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideToolbar/BlockSideToolbar.hooks.tsx (+11 -3)
frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideToolbar/MenuItem.tsx (+0 -36)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideToolbar/index.tsx (+13 -5)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSlash/BlockSlashMenu.tsx (+197 -39)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSlash/index.hooks.ts (+24 -10)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSlash/index.tsx (+12 -4)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/CalloutBlock/CalloutBlock.hooks.ts (+3 -4)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/CodeBlock/SelectLanguage.tsx (+2 -2)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/CodeBlock/useKeyDown.ts (+2 -2)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/NumberedListBlock/NumberedListBlock.hooks.ts (+6 -2)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/Overlay/index.tsx (+1 -1)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/Root/Root.hooks.tsx (+0 -3)

...and 59 more files

📄 Description

Feature Preview

  • Support multiple document instances
  • Change doc_id from String to &str
  • Support multiple menu to respond arrow key events
  • Fixed emoji caret position
  • Fixed paste didn't work bugs

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/2808 **Author:** [@qinluhe](https://github.com/qinluhe) **Created:** 6/15/2023 **Status:** ✅ Merged **Merged:** 6/17/2023 **Merged by:** [@qinluhe](https://github.com/qinluhe) **Base:** `main` ← **Head:** `fix/document-multiple-instance` --- ### 📝 Commits (10+) - [`106f317`](https://github.com/AppFlowy-IO/AppFlowy/commit/106f317d59070d6298cdfd31ec15c0ffd6193b72) fix: support multiple document - [`50dee2a`](https://github.com/AppFlowy-IO/AppFlowy/commit/50dee2a7052e2305599e9eee42ee6b073c210032) fix: change the doc_id params to ref - [`fbf3ee5`](https://github.com/AppFlowy-IO/AppFlowy/commit/fbf3ee58051c9ff56043ee73247bf37f20ca7d83) fix: function to converge subscription state - [`825fc78`](https://github.com/AppFlowy-IO/AppFlowy/commit/825fc78c209eb9e2fcb0b5ee52d30ada7197180c) fix: mousedown behavior update - [`586df7b`](https://github.com/AppFlowy-IO/AppFlowy/commit/586df7b6ac4a7627125f60c789bcd2fcf8810974) fix: turn to textblock when the enter pressed in empty block - [`b5712a4`](https://github.com/AppFlowy-IO/AppFlowy/commit/b5712a4affb186ab28a1124794de003630010f3c) fix: support cut - [`259485e`](https://github.com/AppFlowy-IO/AppFlowy/commit/259485e15d2baa560d1f89ca10327945d9c750a5) fix: emoji caret - [`03bd82c`](https://github.com/AppFlowy-IO/AppFlowy/commit/03bd82ca8819859cc0e1fceced606db36e6f3fc4) fix: support slash arrow key - [`51f24fc`](https://github.com/AppFlowy-IO/AppFlowy/commit/51f24fcd20a344656fb5dd01a86f197698fc7864) fix: eslint padding-line-between-statements - [`7d277f7`](https://github.com/AppFlowy-IO/AppFlowy/commit/7d277f73f94dcbf43e9cb6e5f56796b8cd75133a) fix: add comment ### 📊 Changes **79 files changed** (+1792 additions, -750 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_tauri/.eslintrc.cjs` (+10 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSelection/BlockRangeSelection.hooks.ts` (+37 -19) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSelection/BlockRectSelection.hooks.ts` (+23 -6) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSelection/NodesRect.hooks.ts` (+4 -7) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSelection/RangeKeyDown.hooks.ts` (+6 -4) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideToolbar/BlockMenu.hooks.ts` (+3 -3) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideToolbar/BlockMenu.tsx` (+134 -44) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideToolbar/BlockMenuTurnInto.tsx` (+12 -13) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideToolbar/BlockSideToolbar.hooks.tsx` (+11 -3) ➖ `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideToolbar/MenuItem.tsx` (+0 -36) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideToolbar/index.tsx` (+13 -5) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSlash/BlockSlashMenu.tsx` (+197 -39) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSlash/index.hooks.ts` (+24 -10) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSlash/index.tsx` (+12 -4) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/CalloutBlock/CalloutBlock.hooks.ts` (+3 -4) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/CodeBlock/SelectLanguage.tsx` (+2 -2) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/CodeBlock/useKeyDown.ts` (+2 -2) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/NumberedListBlock/NumberedListBlock.hooks.ts` (+6 -2) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/Overlay/index.tsx` (+1 -1) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/Root/Root.hooks.tsx` (+0 -3) _...and 59 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 - [x] Support multiple document instances - [x] Change doc_id from String to &str - [x] Support multiple menu to respond arrow key events - [x] Fixed emoji caret position - [x] Fixed paste didn't work bugs <!--- 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 - [ ] My code adheres to the [AppFlowy Style Guide](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/style-guides) - [ ] 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 22:18:43 +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#5432
No description provided.