[PR #775] [MERGED] feat: optimize selection implement by binary search #4333

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/775
Author: @LucasXu0
Created: 8/5/2022
Status: Merged
Merged: 8/8/2022
Merged by: @LucasXu0

Base: mainHead: feat/selection_optimizatiion


📝 Commits (4)

  • 4b4ce10 feat: optimize selection implement by binary search
  • 7e6c7a2 feat: refactor current selection and current selectedNodes in selection_service
  • fb267ac feat: optimize the calculation of cursor position and selection position
  • 2b113aa chore: format code

📊 Changes

13 files changed (+42199 additions, -235 deletions)

View changed files

frontend/app_flowy/packages/flowy_editor/example/assets/big_document.json (+41960 -0)
📝 frontend/app_flowy/packages/flowy_editor/example/assets/example.json (+0 -6)
📝 frontend/app_flowy/packages/flowy_editor/example/lib/main.dart (+99 -99)
📝 frontend/app_flowy/packages/flowy_editor/example/pubspec.yaml (+1 -0)
📝 frontend/app_flowy/packages/flowy_editor/lib/extensions/node_extensions.dart (+8 -0)
📝 frontend/app_flowy/packages/flowy_editor/lib/render/selection/toolbar_widget.dart (+2 -2)
📝 frontend/app_flowy/packages/flowy_editor/lib/service/default_text_operations/format_rich_text_style.dart (+5 -5)
📝 frontend/app_flowy/packages/flowy_editor/lib/service/input_service.dart (+12 -14)
📝 frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/delete_text_handler.dart (+2 -2)
📝 frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/enter_in_edge_of_text_node_handler.dart (+2 -2)
📝 frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/slash_handler.dart (+4 -5)
📝 frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/update_text_style_by_command_x_handler.dart (+2 -2)
📝 frontend/app_flowy/packages/flowy_editor/lib/service/selection_service.dart (+102 -98)

📄 Description

No description provided


🔄 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/775 **Author:** [@LucasXu0](https://github.com/LucasXu0) **Created:** 8/5/2022 **Status:** ✅ Merged **Merged:** 8/8/2022 **Merged by:** [@LucasXu0](https://github.com/LucasXu0) **Base:** `main` ← **Head:** `feat/selection_optimizatiion` --- ### 📝 Commits (4) - [`4b4ce10`](https://github.com/AppFlowy-IO/AppFlowy/commit/4b4ce1020d3f12831501e48a28255f8c37f6730f) feat: optimize selection implement by binary search - [`7e6c7a2`](https://github.com/AppFlowy-IO/AppFlowy/commit/7e6c7a2b4e024152b4178ea79359ac51ca7a8a32) feat: refactor current selection and current selectedNodes in selection_service - [`fb267ac`](https://github.com/AppFlowy-IO/AppFlowy/commit/fb267ace1819b9c9cc86a104effeb8204d496c97) feat: optimize the calculation of cursor position and selection position - [`2b113aa`](https://github.com/AppFlowy-IO/AppFlowy/commit/2b113aae7f6ae86ee2780b22f7ad8eaf37623c1a) chore: format code ### 📊 Changes **13 files changed** (+42199 additions, -235 deletions) <details> <summary>View changed files</summary> ➕ `frontend/app_flowy/packages/flowy_editor/example/assets/big_document.json` (+41960 -0) 📝 `frontend/app_flowy/packages/flowy_editor/example/assets/example.json` (+0 -6) 📝 `frontend/app_flowy/packages/flowy_editor/example/lib/main.dart` (+99 -99) 📝 `frontend/app_flowy/packages/flowy_editor/example/pubspec.yaml` (+1 -0) 📝 `frontend/app_flowy/packages/flowy_editor/lib/extensions/node_extensions.dart` (+8 -0) 📝 `frontend/app_flowy/packages/flowy_editor/lib/render/selection/toolbar_widget.dart` (+2 -2) 📝 `frontend/app_flowy/packages/flowy_editor/lib/service/default_text_operations/format_rich_text_style.dart` (+5 -5) 📝 `frontend/app_flowy/packages/flowy_editor/lib/service/input_service.dart` (+12 -14) 📝 `frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/delete_text_handler.dart` (+2 -2) 📝 `frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/enter_in_edge_of_text_node_handler.dart` (+2 -2) 📝 `frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/slash_handler.dart` (+4 -5) 📝 `frontend/app_flowy/packages/flowy_editor/lib/service/internal_key_event_handlers/update_text_style_by_command_x_handler.dart` (+2 -2) 📝 `frontend/app_flowy/packages/flowy_editor/lib/service/selection_service.dart` (+102 -98) </details> ### 📄 Description _No description provided_ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 21:37:20 +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#4333
No description provided.