Skip to content

Conversation

@nate-thegrate
Copy link
Contributor

@nate-thegrate nate-thegrate commented Sep 25, 2024

Write Test, Find Bug

When you fix a bug, first write a test that fails, then fix the bug and verify the test passes.


When Theme.of(context) is called in a build() method, the widget is rebuilt each frame during an AnimatedTheme transition.

I wanted to create a way for RenderObjects to be updated directly, so I wrote a test:

testWidgets('InheritedWidgets can trigger RenderObject updates', (WidgetTester tester) async {
  // ...
});

…and it passed.



As it turns out, no change is needed at all!

This PR resolves #155852 by adding the "InheritedWidgets can trigger RenderObject updates" test, to ensure that this awesome capability doesn't break in the future.

@github-actions github-actions bot added the framework flutter/packages/flutter repository. See also f: labels. label Sep 25, 2024
@nate-thegrate nate-thegrate force-pushed the render-object-dependencies branch from a5fc0a4 to f7d97d5 Compare September 25, 2024 17:52
@nate-thegrate nate-thegrate requested a review from Hixie September 25, 2024 20:37
@nate-thegrate
Copy link
Contributor Author

Copy-pasting a Discord excerpt for reference:

looks fine to me, but i'm out of date on framework test patterns (i've been focused on a personal project for a few months)

Hopefully we'll get it stamped by Tuesday!

@nate-thegrate nate-thegrate removed the request for review from Hixie September 27, 2024 19:30
@chunhtai chunhtai self-requested a review October 1, 2024 22:06
Copy link
Contributor

@chunhtai chunhtai left a comment

Choose a reason for hiding this comment

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

LGTM

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 3, 2024
@auto-submit auto-submit bot merged commit 500285d into flutter:master Oct 3, 2024
@nate-thegrate nate-thegrate deleted the render-object-dependencies branch October 4, 2024 01:32
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 4, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 4, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 4, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 5, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 6, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 6, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 8, 2024
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Oct 8, 2024
Manual roll requested by [email protected]

flutter/flutter@ec2e12b...0917e9d

2024-10-05 [email protected] Roll Flutter Engine from 2068577e510b to 01de9dcf6bbf (1 revision) (flutter/flutter#156274)
2024-10-05 [email protected] Roll Flutter Engine from 6d6bc39fe8b1 to 2068577e510b (1 revision) (flutter/flutter#156267)
2024-10-05 [email protected] Roll Flutter Engine from 92b5b318190b to 6d6bc39fe8b1 (4 revisions) (flutter/flutter#156266)
2024-10-05 [email protected] Roll Flutter Engine from fd6082ab6693 to 92b5b318190b (1 revision) (flutter/flutter#156261)
2024-10-05 [email protected] Roll Flutter Engine from bc5f9fc80b06 to fd6082ab6693 (4 revisions) (flutter/flutter#156258)
2024-10-04 [email protected] Roll Flutter Engine from eece6c3ec63a to bc5f9fc80b06 (2 revisions) (flutter/flutter#156252)
2024-10-04 [email protected] Roll pub packages (flutter/flutter#156254)
2024-10-04 [email protected] Roll Flutter Engine from 9fa363bdde20 to eece6c3ec63a (1 revision) (flutter/flutter#156250)
2024-10-04 [email protected] Roll Flutter Engine from d38f5e560a98 to 9fa363bdde20 (1 revision) (flutter/flutter#156249)
2024-10-04 [email protected] remove bringup from Windows tool_integration_tests_* (flutter/flutter#156179)
2024-10-04 [email protected] Roll Flutter Engine from 205484009711 to d38f5e560a98 (4 revisions) (flutter/flutter#156239)
2024-10-04 [email protected] Normalize `ThemeData.cardTheme` (flutter/flutter#153254)
2024-10-04 [email protected] Roll Packages from 429650f to 05bf1d4 (5 revisions) (flutter/flutter#156225)
2024-10-04 [email protected] Roll Flutter Engine from e0109f0fd5b2 to 205484009711 (1 revision) (flutter/flutter#156216)
2024-10-04 [email protected] Roll pub packages (flutter/flutter#156215)
2024-10-04 [email protected] Roll Flutter Engine from c2a9fb051bd0 to e0109f0fd5b2 (1 revision) (flutter/flutter#156213)
2024-10-04 [email protected] Roll Flutter Engine from 66d397dff87a to c2a9fb051bd0 (5 revisions) (flutter/flutter#156206)
2024-10-04 [email protected] Roll Flutter Engine from 20369c5d2b93 to 66d397dff87a (5 revisions) (flutter/flutter#156188)
2024-10-03 [email protected] Roll Flutter Engine from de1762dbc5cc to 20369c5d2b93 (7 revisions) (flutter/flutter#156174)
2024-10-03 [email protected] Refactor devfs_web_ddc_modules_test.dart (flutter/flutter#155609)
2024-10-03 [email protected] Allow arrow keys to navigate `MenuAnchor` independently of global shortcut definition (flutter/flutter#155728)
2024-10-03 [email protected] Inherited Theme: zero rebuilds (flutter/flutter#155699)
2024-10-03 [email protected] Roll Flutter Engine from 247bc68c578e to de1762dbc5cc (4 revisions) (flutter/flutter#156160)
2024-10-03 [email protected] Roll pub packages (flutter/flutter#156159)
2024-10-03 [email protected] pattern-matching refactor (flutter/flutter#154753)
2024-10-03 [email protected] Add autocorrect and enableSuggestions to SearchDelegate (flutter/flutter#154932)
2024-10-03 [email protected] Roll Packages from 7c97c88 to 429650f (6 revisions) (flutter/flutter#156155)
2024-10-03 [email protected] Move some tools test ownership to Ben (flutter/flutter#156123)
2024-10-03 [email protected] further shard the Windows tool_integration_tests* targets (flutter/flutter#156121)

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 Dec 11, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Dec 12, 2024
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 framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support RenderObject dependency updates

2 participants