Skip to content

Conversation

@fzyzcjy
Copy link
Contributor

@fzyzcjy fzyzcjy commented Sep 13, 2022

The Offstage has strong relationship with debugVisitOnstageChildren: When using Offstage widget, the widget subtree of debugVisitOnstageChildren is changed, and widget testers will not find an offstage widget. In addition, when we are talking about the word "offstage", we may need to refer to both pages, because they have slightly different meanings.

This origins partially from #111479 (comment). Indeed, when talking about "offstage widgets", I quickly remembered and opened Offstage page, but never realize there is another page about debugVisitOnstageChildren, which even has a bit different explanation from Offstage. This PR fixes this problem.

List which issues are fixed by this PR. You must list at least one issue.

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

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

@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Sep 13, 2022
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

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

Can you check the failing tests here? Thaks!

@Piinks Piinks added d: api docs Issues with https://api.flutter.dev/ documentation labels Sep 14, 2022
@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Sep 15, 2022

@Piinks green now :)

/// subtly).
/// * [TickerMode], which can be used to disable animations in a subtree.
/// * The [catalog of layout widgets](https://flutter.dev/widgets/layout/).
/// * [Element.debugVisitOnstageChildren], for non-offstage children
Copy link
Contributor

Choose a reason for hiding this comment

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

It isn't clear here why this is being linked. Is this something users would want to use in a test? Why would onstage children be important here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because "offstage" is a term in Flutter. But when I search "flutter offstage", I only get Offstage widget, and then I think Offstage widget's definition is all about "offstage". However, we know that its real definition is in debugVisitOnstageChildren's doc, which is broader.

P.S. searching result

image

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks! I was referring to the context on which a developer reading the api docs would understand this reference. What does this mean to the user? Can you add more context? When would they use it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the reply, I will go back to this pr later

Copy link
Contributor

Choose a reason for hiding this comment

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

@fzyzcjy will you be returning to this PR? Or should we close it for now?

@fzyzcjy
Copy link
Contributor Author

fzyzcjy commented Oct 26, 2022

Anyway this is not a big problem, so I will close it now since have a lot of other more important PRs remaining for me to improve :)

@fzyzcjy fzyzcjy closed this Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

d: api docs Issues with https://api.flutter.dev/ framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants