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

API for getting main menu entries #19321

Closed
platosha opened this issue May 7, 2024 · 0 comments · Fixed by #19355
Closed

API for getting main menu entries #19321

platosha opened this issue May 7, 2024 · 0 comments · Fixed by #19355
Assignees
Labels
enhancement hilla Issues related to Hilla

Comments

@platosha
Copy link
Contributor

platosha commented May 7, 2024

Hilla provides the createMenuItems() function that allows listing the menu entries collected from routes for populating the main menu. There is no such API in Flow yet.

Let us create a Flow API for this purpose.

The implementation could reuse the logic of Hilla's RouteUnifyingIndexHtmlRequestListener.

Note that ClientRouteRegistry is already providing Hilla client-side routes to Flow, but the security info is not applied.

A reload is acceptable for updating the menu.

The goal is that a hybrid application (with both Hilla and Flow views) would have the same menu, regardless of whether the main layout is implemented with Flow or Hilla.

@platosha platosha added hilla Issues related to Hilla enhancement labels May 7, 2024
@caalador caalador self-assigned this May 8, 2024
caalador added a commit that referenced this issue May 13, 2024
Create MenuRegistry for getting
automatic menu views for population.

Fixes #19321
caalador added a commit that referenced this issue May 15, 2024
Create MenuRegistry for getting
automatic menu views for population.

Fixes #19321
caalador added a commit that referenced this issue May 21, 2024
Add filtering of menu client
routes by checking authentication
and roles.

Do not check for routes in
ClientRoutesProvider as the results
are generated from the same source
data as the data read/generated by
MenuRegistry.

Part of #19321
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement hilla Issues related to Hilla
Projects
Development

Successfully merging a pull request may close this issue.

2 participants