mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2026-03-24 04:46:56 +00:00
[PR #4398] [MERGED] refactor: database cell controller and builder #6234
Labels
No labels
2024
2025
2026
acct mgmt
AI
automation
bug
calendar
ci
CJK
cloud
code-block
collaboration
copy-paste
database
data migration
data sync
deploy
desktop
develop
develop
documentation
duplicate
editor
editor-plugin
emoji
export
files
flutter-only
follow-up
formula
good first issue for devs
good first issue for experienced devs
grid
hacktoberfest
HACKTOBERFEST-ACCEPTED
help wanted
i18n
icons
images
importer
improvements
infra
install
integrations
IR
kanban board
login
look and joy
mentorship
mobile
mobile
needs design
new feature
new feature
non-coding
notes
notifications
onboarding
organization
P0+
permission
platform-linux
platform-mac
platform-windows
plugins
program
pull-request
Q1 25
Q1 26
Q2 24
Q2 25
Q3 24
Q3 25
Q4 24
Q4 25
react
regression
rust
rust
Rust-only
Rust-only
Rust-starter
Rust-starter
self-hosted
shortcuts
side panel
slash-menu
sync v2
table
tablet
task
tauri
templates
tests
themes
translation
v0.5.6
v0.5.8
v0.5.9
v0.6.0
v0.6.1
v0.6.4
v0.6.7
v0.6.8
v0.7.1
v0.7.4
v0.7.4
v0.7.5
v0.7.6
v0.7.7
v0.7.8
v0.8.0
v0.8.4
v0.8.5
v0.8.9
web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AppFlowy-IO/AppFlowy#6234
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/4398
Author: @richardshiue
Created: 1/15/2024
Status: ✅ Merged
Merged: 1/24/2024
Merged by: @appflowy
Base:
main← Head:refactor/database-bloc📝 Commits (10+)
adb08a2refactor: get row/field data from row cache and field controller in cell controllera87038crefactor: reorganize cell controller tasks and builder83c5420refactor: rename cell_builder.dart414f7d9refactor: database editable cell builder1da0ec9refactor: database card cell builderd6da813fix: make it work1fcfa5bfix: start cell listener and adjust cell style on desktopf9feddefix: build card cell98c64fcfix: remove unnecessary await in testsdcbb7b8fix: cell cache validation📊 Changes
185 files changed (+6507 additions, -7656 deletions)
View changed files
📝
frontend/appflowy_flutter/analysis_options.yaml(+1 -0)📝
frontend/appflowy_flutter/integration_test/board/board_add_row_test.dart(+11 -13)📝
frontend/appflowy_flutter/integration_test/board/board_group_test.dart(+5 -5)📝
frontend/appflowy_flutter/integration_test/board/board_row_test.dart(+5 -5)📝
frontend/appflowy_flutter/integration_test/database/database_cell_test.dart(+12 -6)📝
frontend/appflowy_flutter/integration_test/database/database_field_test.dart(+193 -8)📝
frontend/appflowy_flutter/integration_test/database/database_reminder_test.dart(+4 -4)📝
frontend/appflowy_flutter/integration_test/database/database_row_page_test.dart(+12 -23)📝
frontend/appflowy_flutter/integration_test/database/database_share_test.dart(+2 -1)📝
frontend/appflowy_flutter/integration_test/document/document_with_database_test.dart(+2 -2)📝
frontend/appflowy_flutter/integration_test/util/database_test_op.dart(+95 -84)📝
frontend/appflowy_flutter/lib/mobile/presentation/database/board/mobile_board_content.dart(+19 -37)📝
frontend/appflowy_flutter/lib/mobile/presentation/database/board/widgets/mobile_hidden_groups_column.dart(+94 -163)📝
frontend/appflowy_flutter/lib/mobile/presentation/database/card/card.dart(+1 -1)➖
frontend/appflowy_flutter/lib/mobile/presentation/database/card/card_content/card_cells/card_cells.dart(+0 -9)➖
frontend/appflowy_flutter/lib/mobile/presentation/database/card/card_content/card_cells/checkbox.dart(+0 -68)➖
frontend/appflowy_flutter/lib/mobile/presentation/database/card/card_content/card_cells/checklist.dart(+0 -137)➖
frontend/appflowy_flutter/lib/mobile/presentation/database/card/card_content/card_cells/date.dart(+0 -74)➖
frontend/appflowy_flutter/lib/mobile/presentation/database/card/card_content/card_cells/number.dart(+0 -76)➖
frontend/appflowy_flutter/lib/mobile/presentation/database/card/card_content/card_cells/select_option.dart(+0 -147)...and 80 more files
📄 Description
DatabaseCellContext(now renamed toCellContext), because this class previously also contains theRowMetaPBandFieldInfo. As a result, extra work was required to make sure that theDatabaseCellContextis always up to date. We should instead grab this info from theRowCacheandFieldController, and add listeners to them to update the cells. Doing so also leads to less widget rebuilds since the cell blocs and controllers don't have to be re-instantiated.CellControlleris also now more streamlined. Seefrontend/appflowy_flutter/lib/plugins/database/application/cell/cell_controller_builder.dartGridCellBuilder. In the mobile sprints, lots of unplanned copy and pasting was done to meet the deadline. Seefrontend/appflowy_flutter/lib/plugins/database/widgets/cell/editable_cell_builder.dartandcard_cell_builder.dart.Feature Preview
PR Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.