[PR #3095] [MERGED] refactor: remove date cell persistence #5564

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/3095
Author: @richardshiue
Created: 8/1/2023
Status: Merged
Merged: 9/2/2023
Merged by: @appflowy

Base: mainHead: date-service


📝 Commits (5)

  • be77519 refactor: remove date cell persistence
  • 0410ece refactor: use i64 rather than String in DateChangeset
  • a61cf0d chore: code cleanup
  • a741889 fix: tauri build
  • 13af8ad chore: Merge branch 'main' into date-service

📊 Changes

18 files changed (+159 additions, -197 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/plugins/database_view/application/cell/cell_controller_builder.dart (+2 -2)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/cell/cell_data_persistence.dart (+1 -49)
frontend/appflowy_flutter/lib/plugins/database_view/application/cell/date_cell_service.dart (+47 -0)
📝 frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/date_cell/date_cal_bloc.dart (+59 -69)
📝 frontend/appflowy_tauri/src/appflowy_app/stores/effects/database/cell/data_persistence.ts (+1 -1)
📝 frontend/rust-lib/flowy-database2/src/entities/type_option_entities/date_entities.rs (+1 -1)
📝 frontend/rust-lib/flowy-database2/src/event_handler.rs (+1 -1)
📝 frontend/rust-lib/flowy-database2/src/services/cell/cell_operation.rs (+1 -1)
📝 frontend/rust-lib/flowy-database2/src/services/field/type_options/date_type_option/date_tests.rs (+20 -39)
📝 frontend/rust-lib/flowy-database2/src/services/field/type_options/date_type_option/date_type_option.rs (+1 -1)
📝 frontend/rust-lib/flowy-database2/src/services/field/type_options/date_type_option/date_type_option_entities.rs (+1 -7)
📝 frontend/rust-lib/flowy-database2/tests/database/cell_test/test.rs (+1 -1)
📝 frontend/rust-lib/flowy-database2/tests/database/database_editor.rs (+2 -2)
📝 frontend/rust-lib/flowy-database2/tests/database/field_test/util.rs (+2 -2)
📝 frontend/rust-lib/flowy-database2/tests/database/mock_data/board_mock_data.rs (+5 -5)
📝 frontend/rust-lib/flowy-database2/tests/database/mock_data/calendar_mock_data.rs (+5 -5)
📝 frontend/rust-lib/flowy-database2/tests/database/mock_data/grid_mock_data.rs (+6 -6)
📝 frontend/rust-lib/flowy-test/tests/database/local_test/test.rs (+3 -5)

📄 Description

I'm removing the DateCellPersistence and introducing a DateCellBackendService which I think will help improve code readability.

Imo, the date data isn't really persistent. When the date cell data is being saved, the date's timestamp is sent along with the include time string to be combined in the backend. The timestamp sent from the backend to the frontend, however, is the combined timestamp. This could cause some confusion

This PR also changed the timestamp field of DateChangesetPB from String to i64

Feature Preview


PR Checklist

  • My code adheres to the AppFlowy Style Guide
  • 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/3095 **Author:** [@richardshiue](https://github.com/richardshiue) **Created:** 8/1/2023 **Status:** ✅ Merged **Merged:** 9/2/2023 **Merged by:** [@appflowy](https://github.com/appflowy) **Base:** `main` ← **Head:** `date-service` --- ### 📝 Commits (5) - [`be77519`](https://github.com/AppFlowy-IO/AppFlowy/commit/be7751906b9971e2288fc1342ba540b15d23765e) refactor: remove date cell persistence - [`0410ece`](https://github.com/AppFlowy-IO/AppFlowy/commit/0410ece7b8da87182c5c4622103fb4e849ddaa00) refactor: use i64 rather than String in DateChangeset - [`a61cf0d`](https://github.com/AppFlowy-IO/AppFlowy/commit/a61cf0dcf7ef8e02a8805f27279cf4492012b3c7) chore: code cleanup - [`a741889`](https://github.com/AppFlowy-IO/AppFlowy/commit/a7418892de04f09cd9a0701684eb79c299560d96) fix: tauri build - [`13af8ad`](https://github.com/AppFlowy-IO/AppFlowy/commit/13af8ad0a043261a1ef99fae4b00186882bacc0a) chore: Merge branch 'main' into date-service ### 📊 Changes **18 files changed** (+159 additions, -197 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/cell/cell_controller_builder.dart` (+2 -2) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/cell/cell_data_persistence.dart` (+1 -49) ➕ `frontend/appflowy_flutter/lib/plugins/database_view/application/cell/date_cell_service.dart` (+47 -0) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/date_cell/date_cal_bloc.dart` (+59 -69) 📝 `frontend/appflowy_tauri/src/appflowy_app/stores/effects/database/cell/data_persistence.ts` (+1 -1) 📝 `frontend/rust-lib/flowy-database2/src/entities/type_option_entities/date_entities.rs` (+1 -1) 📝 `frontend/rust-lib/flowy-database2/src/event_handler.rs` (+1 -1) 📝 `frontend/rust-lib/flowy-database2/src/services/cell/cell_operation.rs` (+1 -1) 📝 `frontend/rust-lib/flowy-database2/src/services/field/type_options/date_type_option/date_tests.rs` (+20 -39) 📝 `frontend/rust-lib/flowy-database2/src/services/field/type_options/date_type_option/date_type_option.rs` (+1 -1) 📝 `frontend/rust-lib/flowy-database2/src/services/field/type_options/date_type_option/date_type_option_entities.rs` (+1 -7) 📝 `frontend/rust-lib/flowy-database2/tests/database/cell_test/test.rs` (+1 -1) 📝 `frontend/rust-lib/flowy-database2/tests/database/database_editor.rs` (+2 -2) 📝 `frontend/rust-lib/flowy-database2/tests/database/field_test/util.rs` (+2 -2) 📝 `frontend/rust-lib/flowy-database2/tests/database/mock_data/board_mock_data.rs` (+5 -5) 📝 `frontend/rust-lib/flowy-database2/tests/database/mock_data/calendar_mock_data.rs` (+5 -5) 📝 `frontend/rust-lib/flowy-database2/tests/database/mock_data/grid_mock_data.rs` (+6 -6) 📝 `frontend/rust-lib/flowy-test/tests/database/local_test/test.rs` (+3 -5) </details> ### 📄 Description I'm removing the DateCellPersistence and introducing a DateCellBackendService which I think will help improve code readability. Imo, the date data isn't really persistent. When the date cell data is being saved, the date's timestamp is sent along with the include time string to be combined in the backend. The timestamp sent from the backend to the frontend, however, is the combined timestamp. This could cause some confusion This PR also changed the timestamp field of DateChangesetPB from String to i64 ### 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 the [AppFlowy Style Guide](https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/submitting-code/style-guides) - [ ] 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:19:18 +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#5564
No description provided.