Skip to content

Add code for updating focusedChild when removing grandchildren from scope - #136771

Merged
auto-submit[bot] merged 3 commits into
flutter:masterfrom
gspencergoog:update_focused_child
Oct 18, 2023
Merged

auto-submit[bot] merged 3 commits into
flutter:masterfrom
gspencergoog:update_focused_child

Conversation

@gspencergoog

Copy link
Copy Markdown
Contributor

Description

This adds code to make sure that grandchildren are removed from the focusedChild of a scope when the child is detached.

Related Issues

Tests

  • Added regression test.

@github-actions github-actions Bot added framework flutter/packages/flutter repository. See also f: labels. f: focus Focus traversal, gaining or losing focus labels Oct 17, 2023
@gspencergoog

Copy link
Copy Markdown
Contributor Author

cc @saintmac-google

@gspencergoog gspencergoog changed the title Add code for updating focusedChild when removing grandchildren from scope Add code for updating focusedChild when removing grandchildren from scope Oct 17, 2023
@gspencergoog
gspencergoog requested review from chunhtai and removed request for HansMuller October 18, 2023 21:11

@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

@gspencergoog gspencergoog added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 18, 2023
@auto-submit
auto-submit Bot merged commit 2492242 into flutter:master Oct 18, 2023
@gspencergoog gspencergoog added the revert Autorevert PR (with "Reason for revert:" comment) label Oct 19, 2023
@auto-submit auto-submit Bot removed the revert Autorevert PR (with "Reason for revert:" comment) label Oct 19, 2023
auto-submit Bot pushed a commit that referenced this pull request Oct 19, 2023
auto-submit Bot added a commit that referenced this pull request Oct 19, 2023
…dren from scope" (#136862)

Reverts #136771
Initiated by: gspencergoog
This change reverts the following previous change:
Original Description:
## Description

This adds code to make sure that grandchildren are removed from the `focusedChild` of a scope when the child is detached.

## Related Issues
 - Fixes #136758

## Tests
 - Added regression test.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 19, 2023
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Oct 19, 2023
flutter/flutter@189196d...c2bd2c1

2023-10-19 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Fixes ability to call nextFocus() on a node to focus its descendant" (flutter/flutter#136894)
2023-10-19 [email protected] Roll Flutter Engine from d0d7b4d61265 to 28cb2508b8e0 (1 revision) (flutter/flutter#136878)
2023-10-19 [email protected] Roll Flutter Engine from 8d51b64e9440 to d0d7b4d61265 (13 revisions) (flutter/flutter#136872)
2023-10-19 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Add code for updating `focusedChild` when removing grandchildren from scope" (flutter/flutter#136862)
2023-10-19 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Use Layer.toImage for golden tests on CanvasKit" (flutter/flutter#136860)
2023-10-18 [email protected] Bump flutter_lints to 3.0 (flutter/flutter#136841)
2023-10-18 [email protected] Add code for updating `focusedChild` when removing grandchildren from scope (flutter/flutter#136771)
2023-10-18 [email protected] Use Layer.toImage for golden tests on CanvasKit (flutter/flutter#135249)
2023-10-18 [email protected] Roll Flutter Engine from b67edb05d3f7 to 8d51b64e9440 (4 revisions) (flutter/flutter#136846)
2023-10-18 [email protected] Roll Flutter Engine from 6caee3236d37 to b67edb05d3f7 (5 revisions) (flutter/flutter#136844)
2023-10-18 [email protected] Null-assert the value given to a Completer expecting a non-null value (flutter/flutter#136776)

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],[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
@gspencergoog

Copy link
Copy Markdown
Contributor Author

I'm going to re-land this: it doesn't appear that it was the cause of the build failure.

creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
flutter/flutter@189196d...c2bd2c1

2023-10-19 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Fixes ability to call nextFocus() on a node to focus its descendant" (flutter/flutter#136894)
2023-10-19 [email protected] Roll Flutter Engine from d0d7b4d61265 to 28cb2508b8e0 (1 revision) (flutter/flutter#136878)
2023-10-19 [email protected] Roll Flutter Engine from 8d51b64e9440 to d0d7b4d61265 (13 revisions) (flutter/flutter#136872)
2023-10-19 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Add code for updating `focusedChild` when removing grandchildren from scope" (flutter/flutter#136862)
2023-10-19 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Use Layer.toImage for golden tests on CanvasKit" (flutter/flutter#136860)
2023-10-18 [email protected] Bump flutter_lints to 3.0 (flutter/flutter#136841)
2023-10-18 [email protected] Add code for updating `focusedChild` when removing grandchildren from scope (flutter/flutter#136771)
2023-10-18 [email protected] Use Layer.toImage for golden tests on CanvasKit (flutter/flutter#135249)
2023-10-18 [email protected] Roll Flutter Engine from b67edb05d3f7 to 8d51b64e9440 (4 revisions) (flutter/flutter#136846)
2023-10-18 [email protected] Roll Flutter Engine from 6caee3236d37 to b67edb05d3f7 (5 revisions) (flutter/flutter#136844)
2023-10-18 [email protected] Null-assert the value given to a Completer expecting a non-null value (flutter/flutter#136776)

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],[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
bisor0627 pushed a commit to bisor0627/packages that referenced this pull request Jun 19, 2026
flutter/flutter@189196d...c2bd2c1

2023-10-19 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Fixes ability to call nextFocus() on a node to focus its descendant" (flutter/flutter#136894)
2023-10-19 [email protected] Roll Flutter Engine from d0d7b4d61265 to 28cb2508b8e0 (1 revision) (flutter/flutter#136878)
2023-10-19 [email protected] Roll Flutter Engine from 8d51b64e9440 to d0d7b4d61265 (13 revisions) (flutter/flutter#136872)
2023-10-19 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Add code for updating `focusedChild` when removing grandchildren from scope" (flutter/flutter#136862)
2023-10-19 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Use Layer.toImage for golden tests on CanvasKit" (flutter/flutter#136860)
2023-10-18 [email protected] Bump flutter_lints to 3.0 (flutter/flutter#136841)
2023-10-18 [email protected] Add code for updating `focusedChild` when removing grandchildren from scope (flutter/flutter#136771)
2023-10-18 [email protected] Use Layer.toImage for golden tests on CanvasKit (flutter/flutter#135249)
2023-10-18 [email protected] Roll Flutter Engine from b67edb05d3f7 to 8d51b64e9440 (4 revisions) (flutter/flutter#136846)
2023-10-18 [email protected] Roll Flutter Engine from 6caee3236d37 to b67edb05d3f7 (5 revisions) (flutter/flutter#136844)
2023-10-18 [email protected] Null-assert the value given to a Completer expecting a non-null value (flutter/flutter#136776)

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],[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
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: focus Focus traversal, gaining or losing focus framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assert triggered in focus_manager

2 participants