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

docs: document MenuConfiguration #3770

Open
wants to merge 2 commits into
base: latest
Choose a base branch
from
Open

Conversation

tltv
Copy link
Member

@tltv tltv commented Oct 7, 2024

Renamed menu-registry to menu-configuration. Updated content to match with new simpler public API of MenuConfiguration. MenuRegistry was changed to internal API and only new public API is documented.

RelatedTo: vaadin/flow#20063

Renamed menu-registry to menu-configuration. Updated content to match with new simpler public API of MenuConfiguration. MenuRegistry was changed to internal API and only new public API is documented.

RelatedTo: vaadin/flow#20063
@github-actions github-actions bot added the Language unchecked English language check has not been done label Oct 7, 2024

For a Flow application, any route annotated with [annotationname]`@Menu` is eligible for automatic collection.

To get the available menu routes, call the static method `MenuConfiguration.getMenuEntries()`. This returns a [classname]`List<MenuEntry>`. It would make creating a simple menu using [classname]`Anchor` look like this:
Copy link
Contributor

Choose a reason for hiding this comment

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

This should/could perhaps mention that the returned list is ordered by order+alphabetically.

@tltv tltv marked this pull request as ready for review October 8, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language unchecked English language check has not been done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants