Skip to content

Remove annotations from the features section of each element #3268

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 4 commits into from
Dec 13, 2022

Conversation

srawlins
Copy link
Member

@srawlins srawlins commented Dec 10, 2022

Fixes #3265

There is a lot of cruft around the templates but here is the gist:

  • In model_element.dart, features used to contain both "features" like covariant, read-only, etc, and annotations. As our annotations have grown, these really should be separated. I remove annotations from features. They should not be included in this collection.
  • Fix various templates:
    • Rename _annotations partial to _container_annotations. This partial was only used for containers, which list annotations in their relationships section (implementors etc), and uses different HTML from the other annotation lists.
    • Add a new _annotations partial for non-container annotation lists.
    • In _accessor_getter, _accessor_setter, property, and top_level_property templates, add a render for _annotations.
  • Add annotations template render tests for properties, methods, and enums. More testing is needed, but this is a good start for this fix.

@srawlins srawlins force-pushed the fix-annotations-features branch from d2627c2 to 4afd3eb Compare December 12, 2022 17:10
@srawlins srawlins requested review from keertip and scheglov December 12, 2022 17:15
Copy link
Member

@pq pq left a comment

Choose a reason for hiding this comment

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

LGTM!

@srawlins srawlins merged commit eb90a44 into dart-lang:master Dec 13, 2022
@srawlins srawlins deleted the fix-annotations-features branch December 13, 2022 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

annotations appears twice
2 participants