[PR #6582] [MERGED] feat(flutter): date picker improvements #7473

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

📋 Pull Request Information

Original PR: https://github.com/AppFlowy-IO/AppFlowy/pull/6582
Author: @richardshiue
Created: 10/19/2024
Status: Merged
Merged: 10/23/2024
Merged by: @richardshiue

Base: mainHead: feat/date-parse


📝 Commits (10+)

  • 82ba13f feat(flutter): improve date picker
  • e51ff10 test: add widget tests
  • 9185d14 test: add bloc test
  • a812e4d test: adjust rust-lib tests
  • 44a997f fix: fix failing tests
  • e403b62 chore: fix rustfmt
  • f3785db test: remove redundant await
  • 03868a7 fix: fix failing tests
  • d367978 feat: use cupertino date picker on mobile
  • 4f37e16 chore: merge remote-tracking branch 'upstream/main' into this one

📊 Changes

62 files changed (+2944 additions, -2167 deletions)

View changed files

📝 frontend/appflowy_flutter/integration_test/desktop/board/board_hide_groups_test.dart (+0 -20)
📝 frontend/appflowy_flutter/integration_test/desktop/database/database_cell_test.dart (+5 -4)
📝 frontend/appflowy_flutter/integration_test/desktop/database/database_field_test.dart (+7 -6)
📝 frontend/appflowy_flutter/integration_test/desktop/database/database_media_test.dart (+0 -1)
📝 frontend/appflowy_flutter/integration_test/desktop/document/document_inline_sub_page_test.dart (+0 -1)
📝 frontend/appflowy_flutter/integration_test/desktop/document/document_with_date_reminder_test.dart (+1 -2)
📝 frontend/appflowy_flutter/integration_test/desktop/document/document_with_multi_image_block_test.dart (+0 -1)
📝 frontend/appflowy_flutter/integration_test/desktop/settings/shortcuts_settings_test.dart (+0 -1)
📝 frontend/appflowy_flutter/integration_test/shared/common_operations.dart (+19 -1)
📝 frontend/appflowy_flutter/integration_test/shared/database_test_op.dart (+1 -1)
📝 frontend/appflowy_flutter/integration_test/shared/settings.dart (+0 -1)
📝 frontend/appflowy_flutter/lib/mobile/presentation/database/date_picker/mobile_date_picker_screen.dart (+40 -68)
📝 frontend/appflowy_flutter/lib/mobile/presentation/database/view/database_filter_bottom_sheet.dart (+31 -10)
📝 frontend/appflowy_flutter/lib/plugins/database/application/cell/bloc/date_cell_bloc.dart (+16 -34)
📝 frontend/appflowy_flutter/lib/plugins/database/application/cell/bloc/date_cell_editor_bloc.dart (+137 -334)
📝 frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_controller.dart (+4 -8)
📝 frontend/appflowy_flutter/lib/plugins/database/domain/date_cell_service.dart (+13 -18)
📝 frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/filter/choicechip/date.dart (+4 -7)
📝 frontend/appflowy_flutter/lib/plugins/database/widgets/cell/card_cell_skeleton/date_card_cell.dart (+9 -6)
📝 frontend/appflowy_flutter/lib/plugins/database/widgets/cell/desktop_grid/desktop_grid_date_cell.dart (+7 -3)

...and 42 more files

📄 Description

Screenshot 2024-10-19 at 5 37 53 PM

User-facing changes:

  • enter date and time using keyboard, support parsing in current locale
  • improve look of the date picker header, no longer look squished on Linux and WIndows platforms
  • i18n for database date cells
  • focus traversal and submit on leave

Developer-facing changes:

  • clean up parameter and callbacks to AppFlowyDatePicker and MobileAppFlowyDatePicker widgets.
  • internal states for these widgets are better encapsulated and managed within the widget, ensuring same behavior across different places where the widget is used. No longer worry about focusedDay, selectedDay, startDay, endDay parameters, but just pass in dateTime, endDateTime, includeTime, isRange and desired onChanged callbacks.

resolves https://github.com/AppFlowy-IO/AppFlowy/issues/4617
resolves https://github.com/AppFlowy-IO/AppFlowy/issues/4309
resolves https://github.com/AppFlowy-IO/AppFlowy/issues/3496
resolves https://github.com/AppFlowy-IO/AppFlowy/issues/3027
resolves https://github.com/AppFlowy-IO/AppFlowy/issues/2441
resolves https://github.com/AppFlowy-IO/AppFlowy/issues/1887

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/6582 **Author:** [@richardshiue](https://github.com/richardshiue) **Created:** 10/19/2024 **Status:** ✅ Merged **Merged:** 10/23/2024 **Merged by:** [@richardshiue](https://github.com/richardshiue) **Base:** `main` ← **Head:** `feat/date-parse` --- ### 📝 Commits (10+) - [`82ba13f`](https://github.com/AppFlowy-IO/AppFlowy/commit/82ba13fbd79218f40145dcfeb77138199f2fbe45) feat(flutter): improve date picker - [`e51ff10`](https://github.com/AppFlowy-IO/AppFlowy/commit/e51ff10e763ed8221bcd7562abe311a0465ae1b0) test: add widget tests - [`9185d14`](https://github.com/AppFlowy-IO/AppFlowy/commit/9185d14705b6c83124e10940a37f57c9ebf93e3d) test: add bloc test - [`a812e4d`](https://github.com/AppFlowy-IO/AppFlowy/commit/a812e4d4c40ccb8071b5cf1b793b323d3675a3e4) test: adjust rust-lib tests - [`44a997f`](https://github.com/AppFlowy-IO/AppFlowy/commit/44a997fab848f59454b0dcfef1fc77756dcab060) fix: fix failing tests - [`e403b62`](https://github.com/AppFlowy-IO/AppFlowy/commit/e403b62b9286bfe11edeccdbe1c9ad1a0ba78d8b) chore: fix rustfmt - [`f3785db`](https://github.com/AppFlowy-IO/AppFlowy/commit/f3785db42c373c90f6797f3b3edf22fedecaae5c) test: remove redundant await - [`03868a7`](https://github.com/AppFlowy-IO/AppFlowy/commit/03868a78aa2ce954a1a56d35d236cda040f2d927) fix: fix failing tests - [`d367978`](https://github.com/AppFlowy-IO/AppFlowy/commit/d367978fffbc9f54b272c90ae5643f42d6297f08) feat: use cupertino date picker on mobile - [`4f37e16`](https://github.com/AppFlowy-IO/AppFlowy/commit/4f37e16fa369ea637754a3f6b330eb05d5965365) chore: merge remote-tracking branch 'upstream/main' into this one ### 📊 Changes **62 files changed** (+2944 additions, -2167 deletions) <details> <summary>View changed files</summary> 📝 `frontend/appflowy_flutter/integration_test/desktop/board/board_hide_groups_test.dart` (+0 -20) 📝 `frontend/appflowy_flutter/integration_test/desktop/database/database_cell_test.dart` (+5 -4) 📝 `frontend/appflowy_flutter/integration_test/desktop/database/database_field_test.dart` (+7 -6) 📝 `frontend/appflowy_flutter/integration_test/desktop/database/database_media_test.dart` (+0 -1) 📝 `frontend/appflowy_flutter/integration_test/desktop/document/document_inline_sub_page_test.dart` (+0 -1) 📝 `frontend/appflowy_flutter/integration_test/desktop/document/document_with_date_reminder_test.dart` (+1 -2) 📝 `frontend/appflowy_flutter/integration_test/desktop/document/document_with_multi_image_block_test.dart` (+0 -1) 📝 `frontend/appflowy_flutter/integration_test/desktop/settings/shortcuts_settings_test.dart` (+0 -1) 📝 `frontend/appflowy_flutter/integration_test/shared/common_operations.dart` (+19 -1) 📝 `frontend/appflowy_flutter/integration_test/shared/database_test_op.dart` (+1 -1) 📝 `frontend/appflowy_flutter/integration_test/shared/settings.dart` (+0 -1) 📝 `frontend/appflowy_flutter/lib/mobile/presentation/database/date_picker/mobile_date_picker_screen.dart` (+40 -68) 📝 `frontend/appflowy_flutter/lib/mobile/presentation/database/view/database_filter_bottom_sheet.dart` (+31 -10) 📝 `frontend/appflowy_flutter/lib/plugins/database/application/cell/bloc/date_cell_bloc.dart` (+16 -34) 📝 `frontend/appflowy_flutter/lib/plugins/database/application/cell/bloc/date_cell_editor_bloc.dart` (+137 -334) 📝 `frontend/appflowy_flutter/lib/plugins/database/application/cell/cell_controller.dart` (+4 -8) 📝 `frontend/appflowy_flutter/lib/plugins/database/domain/date_cell_service.dart` (+13 -18) 📝 `frontend/appflowy_flutter/lib/plugins/database/grid/presentation/widgets/filter/choicechip/date.dart` (+4 -7) 📝 `frontend/appflowy_flutter/lib/plugins/database/widgets/cell/card_cell_skeleton/date_card_cell.dart` (+9 -6) 📝 `frontend/appflowy_flutter/lib/plugins/database/widgets/cell/desktop_grid/desktop_grid_date_cell.dart` (+7 -3) _...and 42 more files_ </details> ### 📄 Description ![Screenshot 2024-10-19 at 5 37 53 PM](https://github.com/user-attachments/assets/dddd86b4-df7c-4f82-927b-7c84acc649e2) User-facing changes: - enter date and time using keyboard, support parsing in current locale - improve look of the date picker header, no longer look squished on Linux and WIndows platforms - i18n for database date cells - focus traversal and submit on leave Developer-facing changes: - clean up parameter and callbacks to `AppFlowyDatePicker` and `MobileAppFlowyDatePicker` widgets. - internal states for these widgets are better encapsulated and managed within the widget, ensuring same behavior across different places where the widget is used. No longer worry about `focusedDay`, `selectedDay`, `startDay`, `endDay` parameters, but just pass in `dateTime`, `endDateTime`, `includeTime`, `isRange` and desired onChanged callbacks. resolves https://github.com/AppFlowy-IO/AppFlowy/issues/4617 resolves https://github.com/AppFlowy-IO/AppFlowy/issues/4309 resolves https://github.com/AppFlowy-IO/AppFlowy/issues/3496 resolves https://github.com/AppFlowy-IO/AppFlowy/issues/3027 resolves https://github.com/AppFlowy-IO/AppFlowy/issues/2441 resolves https://github.com/AppFlowy-IO/AppFlowy/issues/1887 ### 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) - [x] I've listed at least one issue that this PR fixes in the description above. - [x] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes. - [x] 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 23:19:47 +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#7473
No description provided.