Skip to content

[material_ui] Make tests independent of the default scroll cache extent - #13715

Merged
auto-submit[bot] merged 2 commits into
flutter:mainfrom
LouiseHsu:material-ui-cache-extent-tests
Nov 21, 2026
Merged

auto-submit[bot] merged 2 commits into
flutter:mainfrom
LouiseHsu:material-ui-cache-extent-tests

Conversation

@LouiseHsu

@LouiseHsu LouiseHsu commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

flutter/flutter#195722 changes the default viewport cache extent from 250 pixels to 0.8 x the viewport extent. A few material_ui tests depend on exactly which off-screen children are built under the old default. Make them independent of the default (pinning scrollCacheExtent where the test checks exact semantics/children, and lengthening the list in the InkWell keep-alive test) so they pass on both stable and master, before and after that change lands.

This is test only change.

Pre-Review Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [AI contribution guidelines] and understand my responsibilities, or I am not using AI tools.
  • I read the [Tree Hygiene] page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran [the auto-formatter].
  • I signed the [CLA].
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I [linked to at least one issue that this PR fixes] in the description above.
  • I followed [the version and CHANGELOG instructions], using [semantic versioning] and the [repository CHANGELOG style], or I have commented below to indicate which documented exception this PR falls under[^1].
  • I updated/added any relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or I have commented below to indicate which [test exemption] this PR falls under[^1].
  • All existing and new tests are passing.

@github-actions github-actions Bot added p: material_ui triage-design Should be looked at in design triage labels Nov 18, 2026
@LouiseHsu LouiseHsu added the CICD Run CI/CD label Nov 18, 2026
@LouiseHsu
LouiseHsu marked this pull request as ready for review November 18, 2026 23:47

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates several test files to pin the cache extent of scrollable widgets and adds a sized box in ink_well_test.dart. The review feedback correctly identifies that scrollCacheExtent and ScrollCacheExtent do not exist in Flutter, and suggests replacing them with cacheExtent: 250.0 across the modified test files.

@LouiseHsu
LouiseHsu requested a review from chunhtai November 18, 2026 23:48

@chunhtai chunhtai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since we own these code, can we give them the new default value and fix the test and have a todo to remove them when the flutter/flutter default value change is in minimum sdk

flutter/flutter#195722 changes the default viewport cache extent from 250
pixels to 0.8 x the viewport extent. A few material_ui tests depend on
exactly which off-screen children are built under the old default. Make
them independent of the default (pinning scrollCacheExtent where the test
checks exact semantics/children, and lengthening the list in the InkWell
keep-alive test) so they pass on both stable and master, before and after
that change lands.

Test-only change.
Per review: give the affected tests the new default
(ScrollCacheExtent.viewport(0.8)) and update their expectations to match
flutter/flutter#195722, with a TODO to remove the pin once the minimum
Flutter SDK includes the new default.
@LouiseHsu
LouiseHsu force-pushed the material-ui-cache-extent-tests branch from 46af99c to f9a616e Compare November 20, 2026 23:53
@LouiseHsu

Copy link
Copy Markdown
Contributor Author

Since we own these code, can we give them the new default value and fix the test and have a todo to remove them when the flutter/flutter default value change is in minimum sdk

okay, i pinned it to ScrollCacheExtent.viewport(0.8), if thats what you mean + some todos

@chunhtai chunhtai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@LouiseHsu LouiseHsu added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 21, 2026
@auto-submit
auto-submit Bot merged commit 8a3ceab into flutter:main Nov 21, 2026
13 checks passed
YeungKC pushed a commit to YeungKC/flutter that referenced this pull request Nov 23, 2026
…r#197216)

flutter/packages@898818d...5b93485

2026-11-22 [email protected] Roll Flutter from
5423f94 to 685f4cf (3 revisions) (flutter/packages#13754)
2026-11-22 [email protected]
[cupertino_ui] Adopt code excerpts in README (flutter/packages#13400)
2026-11-21 [email protected] Roll Flutter from
b34b017 to 5423f94 (24 revisions) (flutter/packages#13747)
2026-11-21 [email protected] [material_ui] Make tests independent of
the default scroll cache extent (flutter/packages#13715)
2026-11-20 [email protected] Roll Flutter (stable) from
ab29120 to ae9b586 (13 revisions) (flutter/packages#13738)
2026-11-20 [email protected] [camera_android_camerax] Only set the
ImageCapture flash mode when it changes (flutter/packages#13468)
2026-11-20 [email protected] Roll Flutter from
e8cc6f3 to b34b017 (36 revisions) (flutter/packages#13737)

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

To file a bug in Flutter:
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
auto-submit Bot pushed a commit to flutter/tests that referenced this pull request Nov 24, 2026
Picks up flutter/packages#13715, which updates material_ui tests for the new default scroll cache extent in flutter/flutter#195722.

Next up - I shall bump dev/customer_testing/tests.version in flutter/flutter. flutter/flutter#197266

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

> [!IMPORTANT]
> This repository is a testing suite that contains references to tests (in the `registry` directory) that are run with every commit to Flutter
> to verify that no breaking changes have been introduced (in the "customer_testing" shards). Your merged PR is _not_ automatically run in the
> Flutter CI tree.
>
> After merging this PR, you must send another PR to flutter/flutter updating `dev/customer_testing/tests.version` in that repo with the latest git commit SHA of the flutter/test repo.
>
> See <flutter/flutter#162048> for details.
LouiseHsu added a commit to LouiseHsu/flutter that referenced this pull request Nov 24, 2026
Picks up flutter/tests#513, which bumps flutter/packages to include
flutter/packages#13715 (material_ui tests updated for the new default
scroll cache extent in flutter#195722).
tyotyo pushed a commit to tyotyo/flutter that referenced this pull request Nov 25, 2026
…lutter#197266)

Picks up flutter/tests change that bumps flutter/packages to include
flutter/packages#13715 (material_ui tests updated for the new default
scroll cache extent in flutter#195722).

Should land after flutter/tests#513
## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [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.
- [x] I updated/added relevant in-code documentation (doc comments with
`///`).
- [x] If this PR introduces a new feature or capability, I created and
linked a website documentation issue or PR in [flutter/website] (or
verified none is needed).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
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 CICD Run CI/CD p: material_ui triage-design Should be looked at in design triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants