[PR #2191] [CLOSED] feat: allow timezone aware date cells #5143

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/2191
Author: @richardshiue
Created: 4/4/2023
Status: Closed

Base: mainHead: timezone-fix


📝 Commits (9)

  • 12f4573 fix: revert previous fix for timezone bug
  • ce44cd9 feat: support timezone-aware date cell data
  • 5fdd011 chore: improve date bloc
  • ae4484d fix: backend date logic
  • 53ac720 fix: send correct timestamp to backend
  • 8f68445 chore: date tests
  • 969b6d5 chore: add a comment for null pb
  • 22a9753 chore: use FlowyTextField and reorganize date editor code
  • 283133a fix: time component not being restored

📊 Changes

16 files changed (+647 additions, -340 deletions)

View changed files

📝 frontend/appflowy_flutter/lib/plugins/database_view/application/cell/cell_data_persistence.dart (+8 -6)
📝 frontend/appflowy_flutter/lib/plugins/database_view/application/database_controller.dart (+1 -1)
📝 frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/date_cell/date_cal_bloc.dart (+83 -118)
📝 frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/date_cell/date_cell_bloc.dart (+5 -1)
📝 frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/date_cell/date_editor.dart (+41 -73)
📝 frontend/appflowy_flutter/lib/plugins/trash/src/trash_cell.dart (+0 -1)
📝 frontend/rust-lib/Cargo.lock (+25 -2)
📝 frontend/rust-lib/flowy-database/Cargo.toml (+1 -0)
📝 frontend/rust-lib/flowy-database/src/event_handler.rs (+1 -0)
📝 frontend/rust-lib/flowy-database/src/services/cell/cell_operation.rs (+1 -0)
📝 frontend/rust-lib/flowy-database/src/services/field/type_options/date_type_option/date_tests.rs (+336 -82)
📝 frontend/rust-lib/flowy-database/src/services/field/type_options/date_type_option/date_type_option.rs (+126 -55)
📝 frontend/rust-lib/flowy-database/src/services/field/type_options/date_type_option/date_type_option_entities.rs (+16 -1)
📝 frontend/rust-lib/flowy-database/src/services/field/type_options/text_type_option/text_tests.rs (+1 -0)
📝 frontend/rust-lib/flowy-database/tests/database/block_test/util.rs (+1 -0)
📝 frontend/rust-lib/flowy-database/tests/database/field_test/util.rs (+1 -0)

📄 Description

This PR partly addresses #2336 by implementing the backend and data storage for timezones with accompanying tests. The frontend isn't implemented yet (see the above issue). It also reorganize some of the code in the frontend, particularly the date calendar bloc.

resolves #2066
resolves #2238

To Do:

  • fix bug: toggling include time on an empty date cell automatically enters the current date time
  • fix bug: turning off include time on an empty date cell doesn't work
  • fix date tests
  • add more date tests for timezone-aware data:
    • regular timezones
    • timezones that have daylight saving time (variable offsets)

🔄 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/2191 **Author:** [@richardshiue](https://github.com/richardshiue) **Created:** 4/4/2023 **Status:** ❌ Closed **Base:** `main` ← **Head:** `timezone-fix` --- ### 📝 Commits (9) - [`12f4573`](https://github.com/AppFlowy-IO/AppFlowy/commit/12f4573558f31dc2c1ee2670e57e6be00ec0e74e) fix: revert previous fix for timezone bug - [`ce44cd9`](https://github.com/AppFlowy-IO/AppFlowy/commit/ce44cd9577db9f81db66111c3b37e06330b9daf8) feat: support timezone-aware date cell data - [`5fdd011`](https://github.com/AppFlowy-IO/AppFlowy/commit/5fdd011104ce4a8934c3addb38fa7c03c33d56e5) chore: improve date bloc - [`ae4484d`](https://github.com/AppFlowy-IO/AppFlowy/commit/ae4484dd33e0ef2b058e310d2df1b0838c59ddd1) fix: backend date logic - [`53ac720`](https://github.com/AppFlowy-IO/AppFlowy/commit/53ac72060968af37052c416cfe348831035272be) fix: send correct timestamp to backend - [`8f68445`](https://github.com/AppFlowy-IO/AppFlowy/commit/8f684451efcd8dc1e124a125947a3ff17f1a4af4) chore: date tests - [`969b6d5`](https://github.com/AppFlowy-IO/AppFlowy/commit/969b6d5df09695cbf8cc9c9ecde9fb9a003eab7b) chore: add a comment for null pb - [`22a9753`](https://github.com/AppFlowy-IO/AppFlowy/commit/22a97533dd730689a87b60ed0a3ef152fe927841) chore: use FlowyTextField and reorganize date editor code - [`283133a`](https://github.com/AppFlowy-IO/AppFlowy/commit/283133aa0227d02760968ec6d0fbe78aa5bd1b8a) fix: time component not being restored ### 📊 Changes **16 files changed** (+647 additions, -340 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/cell/cell_data_persistence.dart` (+8 -6) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/application/database_controller.dart` (+1 -1) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/date_cell/date_cal_bloc.dart` (+83 -118) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/date_cell/date_cell_bloc.dart` (+5 -1) 📝 `frontend/appflowy_flutter/lib/plugins/database_view/widgets/row/cells/date_cell/date_editor.dart` (+41 -73) 📝 `frontend/appflowy_flutter/lib/plugins/trash/src/trash_cell.dart` (+0 -1) 📝 `frontend/rust-lib/Cargo.lock` (+25 -2) 📝 `frontend/rust-lib/flowy-database/Cargo.toml` (+1 -0) 📝 `frontend/rust-lib/flowy-database/src/event_handler.rs` (+1 -0) 📝 `frontend/rust-lib/flowy-database/src/services/cell/cell_operation.rs` (+1 -0) 📝 `frontend/rust-lib/flowy-database/src/services/field/type_options/date_type_option/date_tests.rs` (+336 -82) 📝 `frontend/rust-lib/flowy-database/src/services/field/type_options/date_type_option/date_type_option.rs` (+126 -55) 📝 `frontend/rust-lib/flowy-database/src/services/field/type_options/date_type_option/date_type_option_entities.rs` (+16 -1) 📝 `frontend/rust-lib/flowy-database/src/services/field/type_options/text_type_option/text_tests.rs` (+1 -0) 📝 `frontend/rust-lib/flowy-database/tests/database/block_test/util.rs` (+1 -0) 📝 `frontend/rust-lib/flowy-database/tests/database/field_test/util.rs` (+1 -0) </details> ### 📄 Description This PR partly addresses #2336 by implementing the backend and data storage for timezones with accompanying tests. The frontend isn't implemented yet (see the above issue). It also reorganize some of the code in the frontend, particularly the date calendar bloc. resolves #2066 resolves #2238 To Do: - [x] fix bug: toggling include time on an empty date cell automatically enters the current date time - [x] fix bug: turning off include time on an empty date cell doesn't work - [x] fix date tests - [x] add more date tests for timezone-aware data: - [x] regular timezones - [x] timezones that have daylight saving time (variable offsets) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
mirror 2026-03-23 22:17:26 +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#5143
No description provided.