[PR #2514] [MERGED] Support range selection and refactor data update mechanism and optimize outdent/indent operations #5270

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/2514
Author: @qinluhe
Created: 5/12/2023
Status: Merged
Merged: 5/16/2023
Merged by: @qinluhe

Base: developHead: feat/range-selection


📝 Commits (3)

  • 6b7b0fc refactor: simplify data update logic and optimize outdent/indent operations
  • 88d8c1d feat: support range selection
  • 0128e55 fix: review suggestions

📊 Changes

30 files changed (+639 additions, -378 deletions)

View changed files

📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockHorizontalToolbar/index.hooks.ts (+1 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSelection/NodesRect.hooks.ts (+19 -5)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideToolbar/BlockSideToolbar.hooks.tsx (+46 -50)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideToolbar/index.tsx (+2 -1)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/CodeBlock/CodeBlock.hooks.ts (+1 -1)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/DocumentTitle/index.tsx (+3 -6)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/Node/index.tsx (+7 -10)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/Leaf.tsx (+17 -8)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/TextBlock.hooks.ts (+3 -3)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/events/Events.hooks.ts (+3 -2)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/index.tsx (+8 -13)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/_shared/SubscribeNode.hooks.ts (+59 -11)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/_shared/Text/TextEvents.hooks.ts (+11 -3)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/_shared/Text/TextInput.hooks.ts (+68 -133)
frontend/appflowy_tauri/src/appflowy_app/components/document/_shared/Text/TextSelection.hooks.ts (+113 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/interfaces/document.ts (+3 -1)
📝 frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/text/indent.ts (+21 -11)
📝 frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/text/merge.ts (+1 -4)
📝 frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/text/outdent.ts (+45 -7)
📝 frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/text/split.ts (+4 -6)

...and 10 more files

📄 Description

This branch is based on https://github.com/AppFlowy-IO/AppFlowy/pull/2501

Feature Preview

  • Simplified Data Update Mechanism

  • Enhanced Outdent/Indent Functionality
    Kapture 2023-05-12 at 16 51 28

  • Support Range Selection
    Kapture 2023-05-12 at 16 40 21


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/2514 **Author:** [@qinluhe](https://github.com/qinluhe) **Created:** 5/12/2023 **Status:** ✅ Merged **Merged:** 5/16/2023 **Merged by:** [@qinluhe](https://github.com/qinluhe) **Base:** `develop` ← **Head:** `feat/range-selection` --- ### 📝 Commits (3) - [`6b7b0fc`](https://github.com/AppFlowy-IO/AppFlowy/commit/6b7b0fc92d300f80a667258ac6661be3fcad180c) refactor: simplify data update logic and optimize outdent/indent operations - [`88d8c1d`](https://github.com/AppFlowy-IO/AppFlowy/commit/88d8c1d2e378642d179957c772a8be606d75ee8c) feat: support range selection - [`0128e55`](https://github.com/AppFlowy-IO/AppFlowy/commit/0128e55c6037e6e8c1a934b0163fd51093f81133) fix: review suggestions ### 📊 Changes **30 files changed** (+639 additions, -378 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockHorizontalToolbar/index.hooks.ts` (+1 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSelection/NodesRect.hooks.ts` (+19 -5) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideToolbar/BlockSideToolbar.hooks.tsx` (+46 -50) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideToolbar/index.tsx` (+2 -1) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/CodeBlock/CodeBlock.hooks.ts` (+1 -1) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/DocumentTitle/index.tsx` (+3 -6) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/Node/index.tsx` (+7 -10) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/Leaf.tsx` (+17 -8) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/TextBlock.hooks.ts` (+3 -3) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/events/Events.hooks.ts` (+3 -2) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/TextBlock/index.tsx` (+8 -13) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/_shared/SubscribeNode.hooks.ts` (+59 -11) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/_shared/Text/TextEvents.hooks.ts` (+11 -3) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/_shared/Text/TextInput.hooks.ts` (+68 -133) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/document/_shared/Text/TextSelection.hooks.ts` (+113 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/interfaces/document.ts` (+3 -1) 📝 `frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/text/indent.ts` (+21 -11) 📝 `frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/text/merge.ts` (+1 -4) 📝 `frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/text/outdent.ts` (+45 -7) 📝 `frontend/appflowy_tauri/src/appflowy_app/stores/reducers/document/async-actions/blocks/text/split.ts` (+4 -6) _...and 10 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). --> This branch is based on https://github.com/AppFlowy-IO/AppFlowy/pull/2501 <!--- 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] Simplified Data Update Mechanism - [x] Enhanced Outdent/Indent Functionality ![Kapture 2023-05-12 at 16 51 28](https://github.com/AppFlowy-IO/AppFlowy/assets/108015703/37a790c9-632b-4776-8079-f9c90468487a) - [x] Support Range Selection ![Kapture 2023-05-12 at 16 40 21](https://github.com/AppFlowy-IO/AppFlowy/assets/108015703/42625d4f-db32-4c65-ba88-581ece9fce8c) <!--- 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:17:59 +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#5270
No description provided.