[PR #2525] [MERGED] Support to show text action toolbar when the selection exists and the range is not collapsed #5275

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/2525
Author: @qinluhe
Created: 5/13/2023
Status: Merged
Merged: 5/19/2023
Merged by: @qinluhe

Base: developHead: feat/block-toolbar


📝 Commits (4)

📊 Changes

50 files changed (+1604 additions, -764 deletions)

View changed files

📝 frontend/appflowy_tauri/src-tauri/Cargo.lock (+355 -300)
frontend/appflowy_tauri/src/appflowy_app/components/document/BlockHorizontalToolbar/FormatButton.tsx (+0 -32)
frontend/appflowy_tauri/src/appflowy_app/components/document/BlockHorizontalToolbar/index.hooks.ts (+0 -33)
frontend/appflowy_tauri/src/appflowy_app/components/document/BlockHorizontalToolbar/index.tsx (+0 -30)
frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSelection/BlockRangeSelection.hooks.ts (+104 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSelection/BlockRectSelection.hooks.ts (+13 -32)
frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSelection/BlockRectSelection.tsx (+13 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSelection/index.tsx (+6 -15)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideToolbar/index.tsx (+5 -1)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/CalloutBlock/index.tsx (+5 -3)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/CodeBlock/elements.tsx (+9 -1)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/CodeBlock/index.tsx (+5 -3)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/Overlay/index.tsx (+5 -4)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/Root/index.tsx (+5 -12)
frontend/appflowy_tauri/src/appflowy_app/components/document/TextActionMenu/index.hooks.ts (+43 -0)
frontend/appflowy_tauri/src/appflowy_app/components/document/TextActionMenu/index.tsx (+46 -0)
frontend/appflowy_tauri/src/appflowy_app/components/document/TextActionMenu/menu/FormatButton.tsx (+68 -0)
📝 frontend/appflowy_tauri/src/appflowy_app/components/document/TextActionMenu/menu/FormatIcon.tsx (+1 -1)
frontend/appflowy_tauri/src/appflowy_app/components/document/TextActionMenu/menu/MenuTooltip.tsx (+20 -0)
frontend/appflowy_tauri/src/appflowy_app/components/document/TextActionMenu/menu/TurnIntoSelect.tsx (+50 -0)

...and 30 more files

📄 Description

This PR base on https://github.com/AppFlowy-IO/AppFlowy/pull/2514

Feature Preview

  • Support to show text action toolbar when the selection exists and the range is not collapsed
    image
  • Support format in the toolbar
  • Support to turn into other block in the toolbar
    image

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/2525 **Author:** [@qinluhe](https://github.com/qinluhe) **Created:** 5/13/2023 **Status:** ✅ Merged **Merged:** 5/19/2023 **Merged by:** [@qinluhe](https://github.com/qinluhe) **Base:** `develop` ← **Head:** `feat/block-toolbar` --- ### 📝 Commits (4) - [`63d8989`](https://github.com/AppFlowy-IO/AppFlowy/commit/63d8989c5c1a2f3a8a2369646906605335ea12b1) feat: support text action menu - [`5e66441`](https://github.com/AppFlowy-IO/AppFlowy/commit/5e664414fbb89f130058dbd012d438a1a37259e8) fix: selection bugs - [`19dff9a`](https://github.com/AppFlowy-IO/AppFlowy/commit/19dff9a3c2a9b47565b153f0d9ef4a91bc971765) fix: review suggestions - [`020665f`](https://github.com/AppFlowy-IO/AppFlowy/commit/020665f34a57a6b7ba7dac000b5e58ec60cc3890) fix: ci tsc failed ### 📊 Changes **50 files changed** (+1604 additions, -764 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_tauri/src-tauri/Cargo.lock` (+355 -300) ➖ `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockHorizontalToolbar/FormatButton.tsx` (+0 -32) ➖ `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockHorizontalToolbar/index.hooks.ts` (+0 -33) ➖ `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockHorizontalToolbar/index.tsx` (+0 -30) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSelection/BlockRangeSelection.hooks.ts` (+104 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSelection/BlockRectSelection.hooks.ts` (+13 -32) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSelection/BlockRectSelection.tsx` (+13 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSelection/index.tsx` (+6 -15) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/BlockSideToolbar/index.tsx` (+5 -1) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/CalloutBlock/index.tsx` (+5 -3) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/CodeBlock/elements.tsx` (+9 -1) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/CodeBlock/index.tsx` (+5 -3) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/Overlay/index.tsx` (+5 -4) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/Root/index.tsx` (+5 -12) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/document/TextActionMenu/index.hooks.ts` (+43 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/document/TextActionMenu/index.tsx` (+46 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/document/TextActionMenu/menu/FormatButton.tsx` (+68 -0) 📝 `frontend/appflowy_tauri/src/appflowy_app/components/document/TextActionMenu/menu/FormatIcon.tsx` (+1 -1) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/document/TextActionMenu/menu/MenuTooltip.tsx` (+20 -0) ➕ `frontend/appflowy_tauri/src/appflowy_app/components/document/TextActionMenu/menu/TurnIntoSelect.tsx` (+50 -0) _...and 30 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 PR base on https://github.com/AppFlowy-IO/AppFlowy/pull/2514 <!--- 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 to show text action toolbar when the selection exists and the range is not collapsed <img width="651" alt="image" src="https://github.com/AppFlowy-IO/AppFlowy/assets/108015703/873dd109-31bb-42d7-8634-a4ffb48c88c1"> - [x] Support format in the toolbar - [x] Support to turn into other block in the toolbar <img width="635" alt="image" src="https://github.com/AppFlowy-IO/AppFlowy/assets/108015703/1f84bf17-59ce-4e07-8482-a35bc3f902be"> <!--- 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:01 +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#5275
No description provided.