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

@index.tsx inside a route parameter folder shows up in the menu #2885

Open
Legioth opened this issue Oct 31, 2024 · 1 comment
Open

@index.tsx inside a route parameter folder shows up in the menu #2885

Legioth opened this issue Oct 31, 2024 · 1 comment
Labels
bug Something isn't working hilla Issues related to Hilla Impact: High Severity: Minor

Comments

@Legioth
Copy link
Member

Legioth commented Oct 31, 2024

Describe the bug

Both views/a/{id}/@index.tsx and views/a/{id}.tsx would be mapped to the same /a/1234 route. The difference is that views/a/{id}/@index.tsx gets a menu entry with the URL /a/:id which doesn't work.

Expected-behavior

Expected that a view with a required parameter is not included in the menu regardless of which file structure is used.

Reproduction

  1. Create views/a/{id}/@index.tsx with some dummy content
  2. Observe that the view shows up in the menu

System Info

Vaadin 24.5.2

@Legioth Legioth added bug Something isn't working hilla Issues related to Hilla labels Oct 31, 2024
@platosha
Copy link
Contributor

platosha commented Nov 5, 2024

If there's a required parameter anywhere in the route path, we should not use it in the menu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hilla Issues related to Hilla Impact: High Severity: Minor
Projects
None yet
Development

No branches or pull requests

2 participants