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

[WIP] Annotator tree (Step 1) #52904

Closed
wants to merge 10 commits into from
Closed

[WIP] Annotator tree (Step 1) #52904

wants to merge 10 commits into from

Conversation

dkwingsmt
Copy link
Contributor

@dkwingsmt dkwingsmt commented Mar 19, 2020

Description

An annotator tree is a tree built during painting, consisting of annotators, which can generate annotations when searched. This replaces the existing layer-based annotations.

For background, reasoning, and detailed design, see https://flutter.dev/go/annotator-tree.

As the first of the two steps of the annotator tree, this PR introduces the following changes:

  • Adds the annotator API
    • Push an annotator during RenderObject.paint using PaintingContext.pushAnnotator()
    • Find an annotation between frames using RenderView.search() and RenderView.searchFirst()
  • Deprecates legacy APIs
    • Layer.find
    • Layer.findAnnotations
    • Layer.findAll
    • Layer.findAllAnnotations
    • PlatformViewLayer.{constructor}.hoverAnnotation
    • PlatformViewLayer.hoverAnnotation
    • AnnotatedRegionLayer
  • Introduces several APIs that are born deprecated

Most behaviors should be compatible, except for some trivial APIs. However, everything marked deprecated should be fixed soon as they will be removed in step 2.

#41194 is not solved for now due to compatibility, but will be solved in step 2.

Related Issues

Tests

I added the following tests:

  • Tests

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

  • Yes, this is a breaking change.
    • I wrote a design doc: https://flutter.dev/go/annotator-tree
    • I got input from the developer relations team, specifically from: Replace with the names of who gave advice
    • I wrote a migration guide: Replace with a link to your migration guide

@fluttergithubbot fluttergithubbot added a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels. labels Mar 19, 2020
@dkwingsmt dkwingsmt changed the title Annotator tree (Step 1) [WIP] Annotator tree (Step 1) Mar 19, 2020
@dkwingsmt
Copy link
Contributor Author

Close it for now until the comments for the design review has been resolved.

@dkwingsmt dkwingsmt closed this Mar 26, 2020
@tvolkert tvolkert deleted the annotator-tree branch March 29, 2020 21:02
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: tests "flutter test", flutter_test, or one of our tests framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants