Skip to content

Conversation

@sarbagyastha
Copy link
Contributor

@sarbagyastha sarbagyastha commented Sep 25, 2024

This PR adds following properties to the DatePickerDialog:

  • insetPadding

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Sep 25, 2024
@ahyangnb
Copy link
Contributor

favor

@sarbagyastha
Copy link
Contributor Author

CC @MitchellGoodwin

Copy link
Contributor

@MitchellGoodwin MitchellGoodwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM. But I'm wondering about the use cases of these. The date values are exposed by the future returned by the dialog being popped off the screen. If another callback exposes the date, then there are conflicting ways to get those values from the widget. I'm worried that exposing these callbacks will create anti-patterns where it's easier to introduce bugs.

Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would split out the insetPadding change from the onStart/EndDateChanged change. It's totally independent, right? I think the insetPadding change looks like it's probably easy to get landed on its own.

I'm also curious about how the new onStart/EndDateChanged parameters will be used. Is there a case where it's not possible to use the Future to get the selected date range?

Copy link
Contributor

@MitchellGoodwin MitchellGoodwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think before merging we need a clear use case for this. Because this is going to introduce a different way to get the date value along with what we had before, it feels off. It may be possible that the problem this is trying to fix could be solved by something else.

@sarbagyastha sarbagyastha changed the title Added date selection callback to Date Picker Dialogs Made insetPadding configurable for Date Picker Dialog Oct 24, 2024
@sarbagyastha
Copy link
Contributor Author

sarbagyastha commented Oct 24, 2024

I think before merging we need a clear use case for this. Because this is going to introduce a different way to get the date value along with what we had before, it feels off. It may be possible that the problem this is trying to fix could be solved by something else.

Possible Use Case: Let's say we use the DatePickerDialog in the model route that show some kind of processed information based on the selected date(before confirming).

showDialog:
  Column:
    DatePickerDialog(onChanged: (date) => selectedDate = date)
    NotAvailableReasonMessageWidget(selectedDate)

But yeah, may be instead of adding the callbacks to the dialog, we can expose a new widget that composes of the Calendar and Input date picker, and have the callbacks in it. Then, use the widget to build DatePickerDialog without exposing the callbacks.

@sarbagyastha
Copy link
Contributor Author

I would split out the insetPadding change from the onStart/EndDateChanged change. It's totally independent, right? I think the insetPadding change looks like it's probably easy to get landed on its own.

For now, I removed the callbacks from the PR.

Copy link
Contributor

@MitchellGoodwin MitchellGoodwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you for the PR.

Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 Thanks for the PR!

@justinmc justinmc added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 30, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Oct 30, 2024

auto label is removed for flutter/flutter/155651, due to - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 30, 2024
@justinmc
Copy link
Contributor

Ah I missed the Google testing failure. @sarbagyastha can you push a merge commit? I see no failures internally.

@MitchellGoodwin MitchellGoodwin added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 31, 2024
@auto-submit auto-submit bot merged commit 19d8fbc into flutter:master Oct 31, 2024
74 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 1, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 1, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 1, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Nov 1, 2024
flutter/flutter@0fe6153...f86b777

2024-11-01 [email protected] Roll Packages from 7cc1caa to 796afa3 (15 revisions) (flutter/flutter#158003)
2024-11-01 [email protected] Marks Linux_pixel_7pro service_extensions_test to be flaky (flutter/flutter#157853)
2024-11-01 [email protected] Roll Flutter Engine from 0a0d5c9be6ff to 3a090b46dd35 (1 revision) (flutter/flutter#157994)
2024-11-01 [email protected] Roll Flutter Engine from bacc5e1e73b7 to 0a0d5c9be6ff (3 revisions) (flutter/flutter#157991)
2024-11-01 [email protected] Add test for `interactive_viewer.transformation_controller.0.dart` (flutter/flutter#157986)
2024-11-01 [email protected] Roll Flutter Engine from d7e928911ac2 to bacc5e1e73b7 (1 revision) (flutter/flutter#157982)
2024-11-01 [email protected] Add test for `notification.0.dart` (flutter/flutter#157909)
2024-11-01 [email protected] performance: Override .elementAt in CachingIterable (flutter/flutter#152477)
2024-11-01 [email protected] Roll Flutter Engine from cd46383cd55e to d7e928911ac2 (4 revisions) (flutter/flutter#157978)
2024-11-01 [email protected] Roll Flutter Engine from bb77cf867aef to cd46383cd55e (11 revisions) (flutter/flutter#157972)
2024-11-01 [email protected] Add a warning/additional handlers for parsing`synthetic-package`. (flutter/flutter#157934)
2024-10-31 [email protected] Roll Flutter Engine from f2154ef3e31c to bb77cf867aef (6 revisions) (flutter/flutter#157960)
2024-10-31 [email protected] Renames `injectBuildTimePluginFilesForWebPlatform` and removes unused named parameter. (flutter/flutter#157944)
2024-10-31 [email protected] [flutter_driver] use mostly public screenshot API. (flutter/flutter#157888)
2024-10-31 [email protected] Made insetPadding configurable for Date Picker Dialog (flutter/flutter#155651)
2024-10-31 [email protected] Fix showSnackBar can't access useMaterial3 from the theme (flutter/flutter#157707)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 6, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants