[PR #4136] [MERGED] refactor: database field type option #6085

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/4136
Author: @richardshiue
Created: 12/12/2023
Status: Merged
Merged: 12/20/2023
Merged by: @appflowy

Base: mainHead: refactor/field-type-option


📝 Commits (8)

  • d128dba refactor: include field type option in FieldPB
  • 51ab0f5 refactor: adapt changes on flutter
  • bb9cb3f refactor: adapt changes on new tauri grid
  • 2b35a07 refactor: adapt changes on old tauri grid/board
  • 5b01859 chore: merge remote-tracking branch 'upstream/main' into refactor/field-type-option
  • eadc7ee chore: merge remote-tracking branch 'upstream/main' into refactor/field-type-option
  • 3eb1a8a chore: merge remote-tracking branch 'upstream/main' into refactor/field-type-option
  • 656591a chore: merge

📊 Changes

73 files changed (+1320 additions, -2453 deletions)

View changed files

📝 frontend/appflowy_flutter/integration_test/database/database_field_test.dart (+1 -1)
📝 frontend/appflowy_flutter/integration_test/util/database_test_op.dart (+1 -3)
📝 frontend/appflowy_flutter/lib/mobile/presentation/database/date_picker/mobile_date_picker_screen.dart (+25 -70)
📝 frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_edit_field_screen.dart (+25 -41)
📝 frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_field_type_option_editor.dart (+24 -33)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/cell/cell_controller.dart (+8 -16)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_editor_bloc.dart (+20 -23)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_service.dart (+4 -19)
frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_type_option_edit_bloc.dart (+0 -66)
frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/date_bloc.dart (+0 -68)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/multi_select_type_option.dart (+60 -64)
frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/number_bloc.dart (+0 -48)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/select_option_type_option_bloc.dart (+16 -7)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/single_select_type_option.dart (+61 -60)
frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/timestamp_bloc.dart (+0 -76)
frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/type_option_context.dart (+0 -190)
frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/type_option_data_controller.dart (+0 -117)
frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/type_option_data_parser.dart (+80 -0)
📝 frontend/appflowy_flutter/lib/plugins/database_view/grid/application/filter/select_option_filter_bloc.dart (+8 -9)
📝 frontend/appflowy_flutter/lib/plugins/database_view/grid/application/filter/select_option_filter_list_bloc.dart (+4 -5)

...and 53 more files

📄 Description

With this PR, any notification or event that contains a FieldPB will send the type option data inside it as well. There aren't any user-facing changes here.

NB: For now, the SwitchFieldType and UpdateFieldTypeOption events are still used to update the field type option or the field type instead of using UpdateField. I'll probably refactor this in another PR.

fixes #4161

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.

🔄 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/4136 **Author:** [@richardshiue](https://github.com/richardshiue) **Created:** 12/12/2023 **Status:** ✅ Merged **Merged:** 12/20/2023 **Merged by:** [@appflowy](https://github.com/appflowy) **Base:** `main` ← **Head:** `refactor/field-type-option` --- ### 📝 Commits (8) - [`d128dba`](https://github.com/AppFlowy-IO/AppFlowy/commit/d128dbab5019b6b1144a15922336e86d305c7517) refactor: include field type option in FieldPB - [`51ab0f5`](https://github.com/AppFlowy-IO/AppFlowy/commit/51ab0f581abf52fea5fd4017c6210610d2c757d4) refactor: adapt changes on flutter - [`bb9cb3f`](https://github.com/AppFlowy-IO/AppFlowy/commit/bb9cb3ff86ced255f39340c44c44118204ec029c) refactor: adapt changes on new tauri grid - [`2b35a07`](https://github.com/AppFlowy-IO/AppFlowy/commit/2b35a07fee0a3ca48d5b390f0cf1496a972e2fce) refactor: adapt changes on old tauri grid/board - [`5b01859`](https://github.com/AppFlowy-IO/AppFlowy/commit/5b01859470dbe86114d11074d2b2aa531f6e7233) chore: merge remote-tracking branch 'upstream/main' into refactor/field-type-option - [`eadc7ee`](https://github.com/AppFlowy-IO/AppFlowy/commit/eadc7ee7a27ff6bf650c7c72f39b2e3822962662) chore: merge remote-tracking branch 'upstream/main' into refactor/field-type-option - [`3eb1a8a`](https://github.com/AppFlowy-IO/AppFlowy/commit/3eb1a8a0b637bcb337437275786ff3b40df27b5f) chore: merge remote-tracking branch 'upstream/main' into refactor/field-type-option - [`656591a`](https://github.com/AppFlowy-IO/AppFlowy/commit/656591a33a1003af29c677ddb5f96bf249d46c40) chore: merge ### 📊 Changes **73 files changed** (+1320 additions, -2453 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/integration_test/database/database_field_test.dart` (+1 -1) 📝 `frontend/appflowy_flutter/integration_test/util/database_test_op.dart` (+1 -3) 📝 `frontend/appflowy_flutter/lib/mobile/presentation/database/date_picker/mobile_date_picker_screen.dart` (+25 -70) 📝 `frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_edit_field_screen.dart` (+25 -41) 📝 `frontend/appflowy_flutter/lib/mobile/presentation/database/field/mobile_field_type_option_editor.dart` (+24 -33) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/cell/cell_controller.dart` (+8 -16) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_editor_bloc.dart` (+20 -23) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_service.dart` (+4 -19) ➖ `frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_type_option_edit_bloc.dart` (+0 -66) ➖ `frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/date_bloc.dart` (+0 -68) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/multi_select_type_option.dart` (+60 -64) ➖ `frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/number_bloc.dart` (+0 -48) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/select_option_type_option_bloc.dart` (+16 -7) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/single_select_type_option.dart` (+61 -60) ➖ `frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/timestamp_bloc.dart` (+0 -76) ➖ `frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/type_option_context.dart` (+0 -190) ➖ `frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/type_option_data_controller.dart` (+0 -117) ➕ `frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/type_option_data_parser.dart` (+80 -0) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/grid/application/filter/select_option_filter_bloc.dart` (+8 -9) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/grid/application/filter/select_option_filter_list_bloc.dart` (+4 -5) _...and 53 more files_ </details> ### 📄 Description With this PR, any notification or event that contains a `FieldPB` will send the type option data inside it as well. There aren't any user-facing changes here. NB: For now, the `SwitchFieldType` and `UpdateFieldTypeOption` events are still used to update the field type option or the field type instead of using `UpdateField`. I'll probably refactor this in another PR. fixes #4161 ### 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) - [ ] 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:21:39 +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#6085
No description provided.