Skip to content

Fixes inputDecoration sibling explicit child not included in semantic… #170079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 9, 2025

Conversation

chunhtai
Copy link
Contributor

@chunhtai chunhtai commented Jun 5, 2025

…s tree

fixes #169499

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@chunhtai chunhtai requested a review from hannah-hyj June 5, 2025 18:43
@github-actions github-actions bot added a: text input Entering text in a text field or keyboard related problems framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Jun 5, 2025
@chunhtai chunhtai requested a review from justinmc June 5, 2025 20:22
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 took a deep dive into semantics to try to review this PR well, thanks @chunhtai for giving me a crash course. This makes sense that children like prefix/suffix of InputDecorator were dropped before and this includes them, but can you link the PR that caused this regression? Just for my own interest. Otherwise LGTM 👍

@@ -4739,8 +4739,8 @@ class _SemanticsConfigurationProvider {
///
/// This is typically use to recalculate certain properties when mutating
/// [effective] since [effective] may contain stale data from previous update.
/// Examples are [SemanticsConfiguration.isBlockingUserActions] or
/// [SemanticsConfiguration.elevation]. Otherwise, use [effective] instead.
/// Examples are [SemanticsConfiguration.isBlockingUserActions] or. Otherwise,
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this sentence got chopped up weirdly, should it be "An example is ..." and remove the "or"?

Comment on lines +5341 to +5300
for (final _RenderObjectSemantics explicitSiblingChild in siblingMergeGroups
.expand<_SemanticsFragment>((List<_SemanticsFragment> group) => group)
.whereType<_RenderObjectSemantics>()
.expand(
(_RenderObjectSemantics siblingChild) =>
siblingChild.shouldFormSemanticsNode
? <_RenderObjectSemantics>[siblingChild]
: siblingChild._children,
)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I asked @chunhtai offline about possible performance impact here, seems to be minimal as the existence of explicitSiblingChildren is rare.

@chunhtai
Copy link
Contributor Author

chunhtai commented Jun 6, 2025

The previous pr was a big refactor that rewrote the entire semantics compilation #161195

before the refactor the explicit children under the sibling merge group are built and attached to the render object directly, which is still incorrect
here is a diagram explain what happened
image

@chunhtai chunhtai added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 6, 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 #170079 at sha a959602

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label Jun 6, 2025
@justinmc
Copy link
Contributor

justinmc commented Jun 6, 2025

Thanks for the diagram and link!

@auto-submit auto-submit bot added this pull request to the merge queue Jun 9, 2025
Merged via the queue into flutter:master with commit 60cbfb7 Jun 9, 2025
75 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 9, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: text input Entering text in a text field or keyboard related problems 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.

InputDecoration -> suffix Semantics.identifier not showing in Maestro.dev when building with Flutter 3.32.0
2 participants