[PR #7893] [MERGED] fix: select option logic #8189

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/7893
Author: @richardshiue
Created: 5/7/2025
Status: Merged
Merged: 5/8/2025
Merged by: @richardshiue

Base: mainHead: fix/7774


📝 Commits (4)

📊 Changes

5 files changed (+229 additions, -185 deletions)

View changed files

📝 frontend/rust-lib/flowy-database2/src/services/field/type_options/selection_type_option/mod.rs (+1 -0)
📝 frontend/rust-lib/flowy-database2/src/services/field/type_options/selection_type_option/multi_select_type_option.rs (+15 -119)
frontend/rust-lib/flowy-database2/src/services/field/type_options/selection_type_option/select_option_tests.rs (+183 -0)
📝 frontend/rust-lib/flowy-database2/src/services/field/type_options/selection_type_option/single_select_type_option.rs (+16 -64)
📝 frontend/rust-lib/flowy-database2/tests/database/database_editor.rs (+14 -2)

📄 Description

closes #7774

Feature Preview


PR Checklist

  • My code adheres to AppFlowy's Conventions
  • 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.

Summary by Sourcery

Refactor and improve the logic for handling select options in single and multi-select type options

Enhancements:

  • Simplified the logic for inserting and managing select options in single and multi-select fields
  • Improved handling of option insertion and deletion scenarios

Tests:

  • Added comprehensive test cases for select option scenarios
  • Consolidated test cases into a new select option tests module

Chores:

  • Removed redundant test modules from individual type option files

🔄 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/7893 **Author:** [@richardshiue](https://github.com/richardshiue) **Created:** 5/7/2025 **Status:** ✅ Merged **Merged:** 5/8/2025 **Merged by:** [@richardshiue](https://github.com/richardshiue) **Base:** `main` ← **Head:** `fix/7774` --- ### 📝 Commits (4) - [`565c630`](https://github.com/AppFlowy-IO/AppFlowy/commit/565c63007e5353ab301ad733e56d29756929f79b) test: add select option tests - [`23b397f`](https://github.com/AppFlowy-IO/AppFlowy/commit/23b397f3cc8ece162c8804c05a7c3c397dcb3a6d) fix: select option logic - [`4e10d2d`](https://github.com/AppFlowy-IO/AppFlowy/commit/4e10d2d4dbdfd3cb4ef2914fe7abc4bccc4c37a2) test: fix existing tests - [`1fcc76e`](https://github.com/AppFlowy-IO/AppFlowy/commit/1fcc76e3f86611b229b66af81ef88a2dc8fc631e) test: fix test logic ### 📊 Changes **5 files changed** (+229 additions, -185 deletions) <details> <summary>View changed files</summary> 📝 `frontend/rust-lib/flowy-database2/src/services/field/type_options/selection_type_option/mod.rs` (+1 -0) 📝 `frontend/rust-lib/flowy-database2/src/services/field/type_options/selection_type_option/multi_select_type_option.rs` (+15 -119) ➕ `frontend/rust-lib/flowy-database2/src/services/field/type_options/selection_type_option/select_option_tests.rs` (+183 -0) 📝 `frontend/rust-lib/flowy-database2/src/services/field/type_options/selection_type_option/single_select_type_option.rs` (+16 -64) 📝 `frontend/rust-lib/flowy-database2/tests/database/database_editor.rs` (+14 -2) </details> ### 📄 Description closes #7774 ### Feature Preview <!--- 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 - [x] My code adheres to [AppFlowy's Conventions](https://docs.appflowy.io/docs/documentation/software-contributions/conventions) - [x] I've listed at least one issue that this PR fixes in the description above. - [x] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [x] All existing tests are passing. ## Summary by Sourcery Refactor and improve the logic for handling select options in single and multi-select type options Enhancements: - Simplified the logic for inserting and managing select options in single and multi-select fields - Improved handling of option insertion and deletion scenarios Tests: - Added comprehensive test cases for select option scenarios - Consolidated test cases into a new select option tests module Chores: - Removed redundant test modules from individual type option files --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 23:23: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#8189
No description provided.