Skip to content
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

Inline AbstractNode into SemanticsNode and Layer #128467

Merged
merged 6 commits into from Jun 14, 2023

Conversation

goderbauer
Copy link
Member

@goderbauer goderbauer commented Jun 7, 2023

The goal is to ultimately remove AbstractNode from the code base.

Next up: Removing it from RenderObject.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

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.

@github-actions github-actions bot added a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) framework flutter/packages/flutter repository. See also f: labels. labels Jun 7, 2023
@goderbauer goderbauer force-pushed the removeAbstractNodeFromSemantics branch from 1f939f1 to 56312a9 Compare June 7, 2023 23:15
@goderbauer goderbauer force-pushed the removeAbstractNodeFromSemantics branch from 56312a9 to c6d4b45 Compare June 13, 2023 17:43
@goderbauer goderbauer changed the title Inline AbstractNode into SemanticsNode Inline AbstractNode into SemanticsNode and Layer Jun 13, 2023
Copy link
Member

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM

much better than the approach I had taken of trying to make it generic.

/// [depth] will still be 2. Whenever a new node is added to the tree or a node
/// is moved around in the tree, [redepthChild] must be called to re-calculate
/// the [depth] of the child and its children.
mixin DepthNode {
Copy link
Contributor

Choose a reason for hiding this comment

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

this is such a small amount of trivial code that i would just inline it into the various class hierarchies that use it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good, inlined it all. Can you take another look?

@goderbauer goderbauer requested a review from Hixie June 13, 2023 22:39
@goderbauer goderbauer added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 13, 2023
@goderbauer goderbauer merged commit 16e6be8 into flutter:master Jun 14, 2023
72 checks passed
@goderbauer goderbauer deleted the removeAbstractNodeFromSemantics branch June 14, 2023 16:36
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 14, 2023
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jun 14, 2023
…4214)

Manual roll requested by tarrinneal@google.com

flutter/flutter@09b7e56...95be76a

2023-06-14 mdebbar@google.com [web] Migrate framework away from dart:html and package:js (flutter/flutter#128580)
2023-06-14 77465135+cruiser-baxter@users.noreply.github.com Fixed slider value indicator not disappearing after a bit on desktop platform when slider is clicked not dragged (flutter/flutter#128137)
2023-06-14 goderbauer@google.com Inline AbstractNode into SemanticsNode and Layer (flutter/flutter#128467)
2023-06-14 engine-flutter-autoroll@skia.org Roll Flutter Engine from 727b4413fe6f to 2d8d5ecfe4a8 (5 revisions) (flutter/flutter#128842)
2023-06-14 engine-flutter-autoroll@skia.org Roll Flutter Engine from 66a5761412f9 to 727b4413fe6f (10 revisions) (flutter/flutter#128841)
2023-06-14 engine-flutter-autoroll@skia.org Roll Flutter Engine from b6bf3a6f1ccd to 66a5761412f9 (1 revision) (flutter/flutter#128813)
2023-06-13 william.oprandi+github@gmail.com Fix syntax error in docstring (flutter/flutter#128692)
2023-06-13 36861262+QuncCccccc@users.noreply.github.com Update unit tests in material library for Material 3 (flutter/flutter#128725)
2023-06-13 christopherfujino@gmail.com [flutter_tools] Suppress git output in flutter channel (flutter/flutter#128475)
2023-06-13 katelovett@google.com Fix ensureVisible and default focus traversal for reversed scrollables (flutter/flutter#128756)
2023-06-13 engine-flutter-autoroll@skia.org Roll Flutter Engine from f9a0a0dafeea to b6bf3a6f1ccd (2 revisions) (flutter/flutter#128797)
2023-06-13 36861262+QuncCccccc@users.noreply.github.com Update rest of the unit tests in material library for Material 3 (flutter/flutter#128747)
2023-06-13 36861262+QuncCccccc@users.noreply.github.com Update tests in material library for Material 3 by default (flutter/flutter#128300)
2023-06-13 hans.muller@gmail.com Update misc tests for Material3 (flutter/flutter#128712)

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 rmistry@google.com,stuartmorgan@google.com,tarrinneal@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://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
gnprice added a commit to gnprice/flutter that referenced this pull request Jul 17, 2023
These methods and/or their docs were recently copied (in flutter#128467
and flutter#128973) from their classes' former shared base class AbstractNode.
Their wording was fittingly abstract there, but that abstraction is a
bit puzzling for a reader finding them on these more concrete classes
and not aware of the AbstractNode history.  So make them more
concrete, in similar terms to the other methods around them.

Also copy some useful points between corresponding methods on
different classes (like that the parent of the root is null),
and try to clean up the prose on [RenderObject.depth].

We focus on the more outward-facing parts of the API, letting
methods like `redepthChildren` continue to talk generically
about "nodes".
auto-submit bot pushed a commit that referenced this pull request Jul 17, 2023
…130689)

These methods and/or their docs were recently copied (in #128467 and #128973) from their classes' former shared base class AbstractNode. Their wording was fittingly abstract there, but that abstraction is a bit puzzling for a reader finding them on these more concrete classes and not aware of the AbstractNode history.  So make them more concrete, in similar terms to the other methods around them.

Also copy some useful points between corresponding methods on different classes (like that the parent of the root is null), and try to clean up the prose on [RenderObject.depth].

We focus on the more outward-facing parts of the API, letting methods like `redepthChildren` continue to talk generically about "nodes".
LouiseHsu pushed a commit to LouiseHsu/flutter that referenced this pull request Jul 31, 2023
…lutter#130689)

These methods and/or their docs were recently copied (in flutter#128467 and flutter#128973) from their classes' former shared base class AbstractNode. Their wording was fittingly abstract there, but that abstraction is a bit puzzling for a reader finding them on these more concrete classes and not aware of the AbstractNode history.  So make them more concrete, in similar terms to the other methods around them.

Also copy some useful points between corresponding methods on different classes (like that the parent of the root is null), and try to clean up the prose on [RenderObject.depth].

We focus on the more outward-facing parts of the API, letting methods like `redepthChildren` continue to talk generically about "nodes".
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: accessibility Accessibility, e.g. VoiceOver or TalkBack. (aka a11y) 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.

None yet

3 participants