[PR #1158] [MERGED] feat: use commas to select a tag in multi-select grid cells #4566

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/1158
Author: @richardshiue
Created: 9/25/2022
Status: Merged
Merged: 10/11/2022
Merged by: @appflowy

Base: mainHead: fix-comma-select


📝 Commits (6)

  • f4d6f70 fix: comma to select tags
  • 612ce52 chore: support passing multiple option ids
  • 6dcd64a chore: add more unit tests for single select and multi select
  • 3fc2e42 chore: move to select multiple options using a single payload
  • 9d70481 chore: do not unselect the option if insert option ids contain that option
  • 1f4071e chore: Merge branch 'main' into fix-comma-select

📊 Changes

17 files changed (+383 additions, -214 deletions)

View changed files

📝 frontend/app_flowy/lib/plugins/grid/application/cell/select_option_editor_bloc.dart (+17 -4)
📝 frontend/app_flowy/lib/plugins/grid/application/cell/select_option_service.dart (+9 -7)
📝 frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/select_option_editor.dart (+9 -0)
📝 frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/text_field.dart (+40 -2)
📝 frontend/rust-lib/flowy-grid/src/event_handler.rs (+5 -5)
📝 frontend/rust-lib/flowy-grid/src/services/cell/cell_operation.rs (+4 -4)
📝 frontend/rust-lib/flowy-grid/src/services/field/type_options/selection_type_option/multi_select_type_option.rs (+102 -63)
📝 frontend/rust-lib/flowy-grid/src/services/field/type_options/selection_type_option/select_option.rs (+86 -46)
📝 frontend/rust-lib/flowy-grid/src/services/field/type_options/selection_type_option/single_select_type_option.rs (+76 -52)
📝 frontend/rust-lib/flowy-grid/src/services/group/controller_impls/select_option_controller/multi_select_controller.rs (+1 -1)
📝 frontend/rust-lib/flowy-grid/src/services/group/controller_impls/select_option_controller/single_select_controller.rs (+1 -1)
📝 frontend/rust-lib/flowy-grid/src/services/group/controller_impls/select_option_controller/util.rs (+2 -2)
📝 frontend/rust-lib/flowy-grid/src/services/row/row_builder.rs (+2 -2)
📝 frontend/rust-lib/flowy-grid/src/util.rs (+12 -12)
📝 frontend/rust-lib/flowy-grid/tests/grid/block_test/util.rs (+3 -7)
📝 frontend/rust-lib/flowy-grid/tests/grid/cell_test/test.rs (+2 -2)
📝 frontend/rust-lib/flowy-grid/tests/grid/group_test/script.rs (+12 -4)

📄 Description

This patch adds the ability to use special characters to separate inputs while selecting options, or select multiple options at once by pasting in a list of options separated by these special characters. Currently, this character is the comma, but will be expanded to include other characters.

In the future, this may also be used for copy-and-paste for the cells.

  • Don't create option if it doesn't exist
  • Fix bug: text field cursor does not travel to the end of the text
  • Fix bug: "select" events not being handled when fired in quick succession
  • Add tests

🔄 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/1158 **Author:** [@richardshiue](https://github.com/richardshiue) **Created:** 9/25/2022 **Status:** ✅ Merged **Merged:** 10/11/2022 **Merged by:** [@appflowy](https://github.com/appflowy) **Base:** `main` ← **Head:** `fix-comma-select` --- ### 📝 Commits (6) - [`f4d6f70`](https://github.com/AppFlowy-IO/AppFlowy/commit/f4d6f70b5c00b640e034035b9e6816695dad872d) fix: comma to select tags - [`612ce52`](https://github.com/AppFlowy-IO/AppFlowy/commit/612ce523725f65b4201d6df412bf9b2f05d0ed6c) chore: support passing multiple option ids - [`6dcd64a`](https://github.com/AppFlowy-IO/AppFlowy/commit/6dcd64ad9149e8829de7981a4fb64402c0f4f417) chore: add more unit tests for single select and multi select - [`3fc2e42`](https://github.com/AppFlowy-IO/AppFlowy/commit/3fc2e42a13ee45f0ae5c1fcc94b21824364ad5b3) chore: move to select multiple options using a single payload - [`9d70481`](https://github.com/AppFlowy-IO/AppFlowy/commit/9d70481f19cca0a47631cc2f6150980a85247cd8) chore: do not unselect the option if insert option ids contain that option - [`1f4071e`](https://github.com/AppFlowy-IO/AppFlowy/commit/1f4071ee54d53873ba2154edef8a36c88c0c4017) chore: Merge branch 'main' into fix-comma-select ### 📊 Changes **17 files changed** (+383 additions, -214 deletions) <details> <summary>View changed files</summary> 📝 `frontend/app_flowy/lib/plugins/grid/application/cell/select_option_editor_bloc.dart` (+17 -4) 📝 `frontend/app_flowy/lib/plugins/grid/application/cell/select_option_service.dart` (+9 -7) 📝 `frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/select_option_editor.dart` (+9 -0) 📝 `frontend/app_flowy/lib/plugins/grid/presentation/widgets/cell/select_option_cell/text_field.dart` (+40 -2) 📝 `frontend/rust-lib/flowy-grid/src/event_handler.rs` (+5 -5) 📝 `frontend/rust-lib/flowy-grid/src/services/cell/cell_operation.rs` (+4 -4) 📝 `frontend/rust-lib/flowy-grid/src/services/field/type_options/selection_type_option/multi_select_type_option.rs` (+102 -63) 📝 `frontend/rust-lib/flowy-grid/src/services/field/type_options/selection_type_option/select_option.rs` (+86 -46) 📝 `frontend/rust-lib/flowy-grid/src/services/field/type_options/selection_type_option/single_select_type_option.rs` (+76 -52) 📝 `frontend/rust-lib/flowy-grid/src/services/group/controller_impls/select_option_controller/multi_select_controller.rs` (+1 -1) 📝 `frontend/rust-lib/flowy-grid/src/services/group/controller_impls/select_option_controller/single_select_controller.rs` (+1 -1) 📝 `frontend/rust-lib/flowy-grid/src/services/group/controller_impls/select_option_controller/util.rs` (+2 -2) 📝 `frontend/rust-lib/flowy-grid/src/services/row/row_builder.rs` (+2 -2) 📝 `frontend/rust-lib/flowy-grid/src/util.rs` (+12 -12) 📝 `frontend/rust-lib/flowy-grid/tests/grid/block_test/util.rs` (+3 -7) 📝 `frontend/rust-lib/flowy-grid/tests/grid/cell_test/test.rs` (+2 -2) 📝 `frontend/rust-lib/flowy-grid/tests/grid/group_test/script.rs` (+12 -4) </details> ### 📄 Description This patch adds the ability to use special characters to separate inputs while selecting options, or select multiple options at once by pasting in a list of options separated by these special characters. Currently, this character is the comma, but will be expanded to include other characters. In the future, this may also be used for copy-and-paste for the cells. - [x] Don't create option if it doesn't exist - [x] Fix bug: text field cursor does not travel to the end of the text - [x] Fix bug: "select" events not being handled when fired in quick succession - [x] Add tests --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 21:38:22 +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#4566
No description provided.