[PR #3633] [CLOSED] refactor: field info refactor #5802

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/3633
Author: @richardshiue
Created: 10/6/2023
Status: Closed

Base: mainHead: field-info-refactor


📝 Commits (10+)

  • d5f9f62 refactor: initial field info pass
  • 27decb1 chore: WIP on Flutter database services
  • 82cdca9 refactor: remove type option controller
  • bbcd276 refactor: wip refactor from type option controller removal
  • 6b09bc0 chore: more type option refactor
  • 164824c refactor: more wip
  • 6f9b095 refactor: more wip
  • 7b3964a refactor: last push before sleep
  • 8264d10 refactor: a push a day keeps the doctor away
  • 05aab6b chore: revert some changes

📊 Changes

136 files changed (+3034 additions, -4217 deletions)

View changed files

📝 frontend/appflowy_flutter/integration_test/util/database_test_op.dart (+9 -10)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/cell/cell_controller.dart (+12 -27)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/cell/cell_service.dart (+9 -14)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/cell/select_option_cell_service.dart (+6 -4)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/database_controller.dart (+41 -20)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/defines.dart (+4 -4)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_action_sheet_bloc.dart (+29 -26)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_cell_bloc.dart (+14 -16)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_controller.dart (+62 -621)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_editor_bloc.dart (+53 -63)
frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_extension.dart (+51 -0)
frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_info.dart (+0 -79)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_listener.dart (+9 -9)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_service.dart (+57 -38)
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 (+24 -25)
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/single_select_type_option.dart (+22 -21)
frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/timestamp_bloc.dart (+0 -76)

...and 80 more files

📄 Description

Summary of changes:

  • deprecation of collab::Field's visible boolean struct field. This has been replaced by the FieldVisibility enum which has 3 values: AlwaysHidden, HideWhenEmpty and AlwaysShown
  • Sending field type option data (of type Vec<u8> in FieldPB when calling get_field or in database notifications. Consequently, the related structs, events and notifications have been deprecated as well (TypeOptionPB, GetTypeOption, UpdateTypeOption, DidUpdateTypeOption, etc.)
  • Extra information about the field in a specific view are now attached in the FieldPB struct as well, including whether the field is participating in sorts and filters, its visibility in the view, whether it's acting as the grouping field in a kanban, etc.
  • Consequently, the GetFieldSettings and GetAllFieldSettings events, and the DidUpdateFieldSettings notifications, have been deprecated.
  • Renamed CreateFieldTypeOption event to CreateFied.

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/3633 **Author:** [@richardshiue](https://github.com/richardshiue) **Created:** 10/6/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `field-info-refactor` --- ### 📝 Commits (10+) - [`d5f9f62`](https://github.com/AppFlowy-IO/AppFlowy/commit/d5f9f628fa6fb2ac939a2321424f6d08e89c522b) refactor: initial field info pass - [`27decb1`](https://github.com/AppFlowy-IO/AppFlowy/commit/27decb1c706a623500ea4faeb9321e39df5c56bb) chore: WIP on Flutter database services - [`82cdca9`](https://github.com/AppFlowy-IO/AppFlowy/commit/82cdca9535d9cd8288794dd6ce4cd52804c1c936) refactor: remove type option controller - [`bbcd276`](https://github.com/AppFlowy-IO/AppFlowy/commit/bbcd276cab5966d904002e721265392af0f14b97) refactor: wip refactor from type option controller removal - [`6b09bc0`](https://github.com/AppFlowy-IO/AppFlowy/commit/6b09bc045a54e1231b0e82cc057219d85fa07618) chore: more type option refactor - [`164824c`](https://github.com/AppFlowy-IO/AppFlowy/commit/164824c505d72b49ff3c3baa9deec4bb112a1cd3) refactor: more wip - [`6f9b095`](https://github.com/AppFlowy-IO/AppFlowy/commit/6f9b095a0a3f55f229e94d22ebe83763c213a75d) refactor: more wip - [`7b3964a`](https://github.com/AppFlowy-IO/AppFlowy/commit/7b3964adac253a0148cbd46e36348b27fef5c4a8) refactor: last push before sleep - [`8264d10`](https://github.com/AppFlowy-IO/AppFlowy/commit/8264d10d2582ad0c01b98f1b13fac05bb75dc9cf) refactor: a push a day keeps the doctor away - [`05aab6b`](https://github.com/AppFlowy-IO/AppFlowy/commit/05aab6bfb305b299c86c6a4976ab3b031a7005ed) chore: revert some changes ### 📊 Changes **136 files changed** (+3034 additions, -4217 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/integration_test/util/database_test_op.dart` (+9 -10) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/cell/cell_controller.dart` (+12 -27) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/cell/cell_service.dart` (+9 -14) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/cell/select_option_cell_service.dart` (+6 -4) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/database_controller.dart` (+41 -20) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/defines.dart` (+4 -4) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_action_sheet_bloc.dart` (+29 -26) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_cell_bloc.dart` (+14 -16) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_controller.dart` (+62 -621) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_editor_bloc.dart` (+53 -63) ➕ `frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_extension.dart` (+51 -0) ➖ `frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_info.dart` (+0 -79) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_listener.dart` (+9 -9) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/field/field_service.dart` (+57 -38) ➖ `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` (+24 -25) ➖ `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/single_select_type_option.dart` (+22 -21) ➖ `frontend/appflowy_flutter/lib/plugins/database_view/application/field/type_option/timestamp_bloc.dart` (+0 -76) _...and 80 more files_ </details> ### 📄 Description Summary of changes: - deprecation of `collab::Field`'s `visible` boolean struct field. This has been replaced by the `FieldVisibility` enum which has 3 values: `AlwaysHidden`, `HideWhenEmpty` and `AlwaysShown` - Sending field type option data (of type `Vec<u8>` in `FieldPB` when calling `get_field` or in database notifications. Consequently, the related structs, events and notifications have been deprecated as well (`TypeOptionPB`, `GetTypeOption`, `UpdateTypeOption`, `DidUpdateTypeOption`, etc.) - Extra information about the field in a specific view are now attached in the `FieldPB` struct as well, including whether the field is participating in sorts and filters, its visibility in the view, whether it's acting as the grouping field in a kanban, etc. - Consequently, the `GetFieldSettings` and `GetAllFieldSettings` events, and the `DidUpdateFieldSettings` notifications, have been deprecated. - Renamed `CreateFieldTypeOption` event to `CreateFied`. ### 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 - [ ] 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:20: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#5802
No description provided.