Skip to content

Conversation

@albinpk
Copy link
Contributor

@albinpk albinpk commented Jul 7, 2025

Wraps PageView with a transparent Material to ensure the selected date decorator is painted in the correct context, avoiding visual glitches during transitions.

Fixes #171717

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.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@google-cla
Copy link

google-cla bot commented Jul 7, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Jul 7, 2025
@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #171718 at sha 57e9a04

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label Jul 7, 2025
@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #171718 at sha 26beb1a

@dkwingsmt dkwingsmt self-requested a review July 10, 2025 23:21
@huycozy huycozy self-requested a review July 11, 2025 04:54
Copy link
Member

@huycozy huycozy left a comment

Choose a reason for hiding this comment

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

Thanks for submitting a fix, @albinpk!
The solution looks good to me. However, it appears that test(s) is/are missing. Could you please add one/some? Perhaps you could check the visibility of the Ink's decoration?

@albinpk
Copy link
Contributor Author

albinpk commented Jul 11, 2025

Thanks for the review! @huycozy

I need some help writing a test for this. How to confirm if a decoration is painted on the expected Material widget during a test?
What I could do is check the render object sizes of the PageView and the nearest Material to see if they match. Let me know if that sounds reasonable or if there's a better approach.

@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #171718 at sha 52ecfed

@huycozy
Copy link
Member

huycozy commented Jul 15, 2025

I need some help writing a test for this. How to confirm if a decoration is painted on the expected Material widget during a test?
What I could do is check the render object sizes of the PageView and the nearest Material to see if they match. Let me know if that sounds reasonable or if there's a better approach.

@albinpk I would suggest using Devtools and finding the difference between before and after the fix. (It could be visibility of the Ink's decoration as suggested above, perhaps from some of its property values?)

Copy link
Contributor

@dkwingsmt dkwingsmt left a comment

Choose a reason for hiding this comment

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

The change looks good to me.

If unit tests are really a blocker, you can also go the easy way of using golden tests.

@gnprice
Copy link
Member

gnprice commented Jul 23, 2025

Thanks for fixing this! For writing a test, I saw your question in Discord, and have a couple of suggestions:
https://discord.com/channels/608014603317936148/692831010445983785/1397446388681277450

albinpk and others added 2 commits July 23, 2025 15:10
Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #171718 at sha da3d62c

@dkwingsmt dkwingsmt self-requested a review July 23, 2025 18:24
Copy link
Contributor

@dkwingsmt dkwingsmt left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@huycozy huycozy left a comment

Choose a reason for hiding this comment

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

@albinpk Thanks for adding a test! LGTM!

Nit: Comments are missing final period/punctuation mark/dot :)

albinpk and others added 4 commits July 24, 2025 16:10
Co-authored-by: Huy <huy@nevercode.io>
Co-authored-by: Huy <huy@nevercode.io>
Co-authored-by: Huy <huy@nevercode.io>
@albinpk
Copy link
Contributor Author

albinpk commented Jul 24, 2025

@huycozy I have updated the PR

@huycozy huycozy added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 24, 2025
@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #171718 at sha 0b8a7fb

@huycozy
Copy link
Member

huycozy commented Jul 28, 2025

Looks like golden test was failed. I tried reproducing it locally with test --update-goldens but couldn't see any failures.
@dkwingsmt Can you please take a look at this to push the PR forward?

@huycozy huycozy requested a review from dkwingsmt July 28, 2025 08:57
Copy link
Contributor

@dkwingsmt dkwingsmt left a comment

Choose a reason for hiding this comment

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

LGTM (restamp)

@dkwingsmt
Copy link
Contributor

I think the golden failure has nothing to do with the PR. I've updated the PR and let's see how it goes. I'll monitor its submission.

@flutter-dashboard
Copy link

Golden file changes are available for triage from new commit, Click here to view.

For more guidance, visit Writing a golden file test for package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Changes reported for pull request #171718 at sha ab49411

@dkwingsmt
Copy link
Contributor

Ok after another look I think the golden file changes are related to this PR, possibly antialias misalignments due to being drawn on a new surface. It's largely negligible anyway. I'll approve it.

@dkwingsmt dkwingsmt added autosubmit Merge PR when tree becomes green via auto submit App and removed autosubmit Merge PR when tree becomes green via auto submit App labels Aug 13, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Aug 13, 2025
Merged via the queue into flutter:master with commit 90a8922 Aug 13, 2025
74 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 13, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Aug 14, 2025
flutter/flutter@34c2a3b...f4334d2

2025-08-14 engine-flutter-autoroll@skia.org Roll Dart SDK from 9b4691f35139 to 214a7f829913 (2 revisions) (flutter/flutter#173769)
2025-08-14 engine-flutter-autoroll@skia.org Roll Skia from b3e86773dae1 to dca5f05fee87 (4 revisions) (flutter/flutter#173763)
2025-08-14 engine-flutter-autoroll@skia.org Roll Dart SDK from 73153bdc1459 to 9b4691f35139 (3 revisions) (flutter/flutter#173755)
2025-08-14 engine-flutter-autoroll@skia.org Roll Skia from 5852eddfd404 to b3e86773dae1 (1 revision) (flutter/flutter#173750)
2025-08-14 azat24680@gmail.com Allow empty initial time when using text input mode in showTimePicker dialog (flutter/flutter#172847)
2025-08-13 engine-flutter-autoroll@skia.org Roll Skia from 525e2bf80559 to 5852eddfd404 (2 revisions) (flutter/flutter#173740)
2025-08-13 mdebbar@google.com [web] Popping a nameless route should preserve the correct route name (flutter/flutter#173652)
2025-08-13 ahmedsameha1@gmail.com Make sure that a ChoiceChip doesn't crash in 0x0 environment (flutter/flutter#173322)
2025-08-13 bkonyi@google.com [ Tool ] Fix missing import for widget_preview.dart (flutter/flutter#173731)
2025-08-13 engine-flutter-autoroll@skia.org Roll Skia from f7fdda3cd0e6 to 525e2bf80559 (7 revisions) (flutter/flutter#173727)
2025-08-13 matanlurey@users.noreply.github.com Do not include `:unittests` unless `enable_unittests` (flutter/flutter#173729)
2025-08-13 engine-flutter-autoroll@skia.org Roll Packages from 08a9b2c to 6cb9113 (1 revision) (flutter/flutter#173726)
2025-08-13 56157868+albinpk@users.noreply.github.com fix: selected date decorator renders outside PageView in `DatePickerDialog` dialog (flutter/flutter#171718)
2025-08-13 bkonyi@google.com [ Widget Preview ] Add `--machine` mode (flutter/flutter#173654)
2025-08-13 ahmedsameha1@gmail.com Make sure that a Chip doesn't crash in 0x0 environment (flutter/flutter#173245)
2025-08-13 returnymgstokh@icloud.com feat: Cupertino sheet implement upward stretch on full sheet (flutter/flutter#168547)
2025-08-13 131446187+TheLastFlame@users.noreply.github.com Fix visual overlap of transparent routes barrier when using FadeForwardsPageTransitionsBuilder (flutter/flutter#167032)
2025-08-13 32538273+ValentinVignal@users.noreply.github.com Fix `ChipThemeData` lerp for `BorderSide` (flutter/flutter#173160)

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 louisehsu@google.com,stuartmorgan@google.com 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
SydneyBao pushed a commit to SydneyBao/flutter that referenced this pull request Aug 14, 2025
…ialog` dialog (flutter#171718)

Wraps `PageView` with a transparent `Material` to ensure the selected
date decorator is painted in the correct context, avoiding visual
glitches during transitions.

Fixes flutter#171717 

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] 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.
- [x] All existing and new tests are passing.

---------

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
Co-authored-by: Huy <huy@nevercode.io>
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
…ialog` dialog (flutter#171718)

Wraps `PageView` with a transparent `Material` to ensure the selected
date decorator is painted in the correct context, avoiding visual
glitches during transitions.

Fixes flutter#171717 

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] 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.
- [x] All existing and new tests are passing.

---------

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
Co-authored-by: Huy <huy@nevercode.io>
WillBLogical pushed a commit to WillBLogical/packages that referenced this pull request Aug 20, 2025
flutter/flutter@34c2a3b...f4334d2

2025-08-14 engine-flutter-autoroll@skia.org Roll Dart SDK from 9b4691f35139 to 214a7f829913 (2 revisions) (flutter/flutter#173769)
2025-08-14 engine-flutter-autoroll@skia.org Roll Skia from b3e86773dae1 to dca5f05fee87 (4 revisions) (flutter/flutter#173763)
2025-08-14 engine-flutter-autoroll@skia.org Roll Dart SDK from 73153bdc1459 to 9b4691f35139 (3 revisions) (flutter/flutter#173755)
2025-08-14 engine-flutter-autoroll@skia.org Roll Skia from 5852eddfd404 to b3e86773dae1 (1 revision) (flutter/flutter#173750)
2025-08-14 azat24680@gmail.com Allow empty initial time when using text input mode in showTimePicker dialog (flutter/flutter#172847)
2025-08-13 engine-flutter-autoroll@skia.org Roll Skia from 525e2bf80559 to 5852eddfd404 (2 revisions) (flutter/flutter#173740)
2025-08-13 mdebbar@google.com [web] Popping a nameless route should preserve the correct route name (flutter/flutter#173652)
2025-08-13 ahmedsameha1@gmail.com Make sure that a ChoiceChip doesn't crash in 0x0 environment (flutter/flutter#173322)
2025-08-13 bkonyi@google.com [ Tool ] Fix missing import for widget_preview.dart (flutter/flutter#173731)
2025-08-13 engine-flutter-autoroll@skia.org Roll Skia from f7fdda3cd0e6 to 525e2bf80559 (7 revisions) (flutter/flutter#173727)
2025-08-13 matanlurey@users.noreply.github.com Do not include `:unittests` unless `enable_unittests` (flutter/flutter#173729)
2025-08-13 engine-flutter-autoroll@skia.org Roll Packages from 08a9b2c to 6cb9113 (1 revision) (flutter/flutter#173726)
2025-08-13 56157868+albinpk@users.noreply.github.com fix: selected date decorator renders outside PageView in `DatePickerDialog` dialog (flutter/flutter#171718)
2025-08-13 bkonyi@google.com [ Widget Preview ] Add `--machine` mode (flutter/flutter#173654)
2025-08-13 ahmedsameha1@gmail.com Make sure that a Chip doesn't crash in 0x0 environment (flutter/flutter#173245)
2025-08-13 returnymgstokh@icloud.com feat: Cupertino sheet implement upward stretch on full sheet (flutter/flutter#168547)
2025-08-13 131446187+TheLastFlame@users.noreply.github.com Fix visual overlap of transparent routes barrier when using FadeForwardsPageTransitionsBuilder (flutter/flutter#167032)
2025-08-13 32538273+ValentinVignal@users.noreply.github.com Fix `ChipThemeData` lerp for `BorderSide` (flutter/flutter#173160)

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 louisehsu@google.com,stuartmorgan@google.com 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
mboetger pushed a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
…ialog` dialog (flutter#171718)

Wraps `PageView` with a transparent `Material` to ensure the selected
date decorator is painted in the correct context, avoiding visual
glitches during transitions.

Fixes flutter#171717 

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] 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.
- [x] All existing and new tests are passing.

---------

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
Co-authored-by: Huy <huy@nevercode.io>
korca0220 pushed a commit to korca0220/flutter that referenced this pull request Sep 22, 2025
…ialog` dialog (flutter#171718)

Wraps `PageView` with a transparent `Material` to ensure the selected
date decorator is painted in the correct context, avoiding visual
glitches during transitions.

Fixes flutter#171717 

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] 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.
- [x] All existing and new tests are passing.

---------

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
Co-authored-by: Huy <huy@nevercode.io>
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 12, 2025
lucaantonelli pushed a commit to lucaantonelli/flutter that referenced this pull request Nov 21, 2025
…ialog` dialog (flutter#171718)

Wraps `PageView` with a transparent `Material` to ensure the selected
date decorator is painted in the correct context, avoiding visual
glitches during transitions.

Fixes flutter#171717 

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [x] 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.
- [x] All existing and new tests are passing.

---------

Co-authored-by: Tong Mu <dkwingsmt@users.noreply.github.com>
Co-authored-by: Huy <huy@nevercode.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Selected date decorator renders outside PageView in DatePickerDialog dialog

4 participants