vaadin / hilla

Build better business applications, faster. No more juggling REST endpoints or deciphering GraphQL queries. Hilla seamlessly connects Spring Boot and React to accelerate application development.
https://hilla.dev
Apache License 2.0
922 stars 58 forks source link

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

Open Legioth opened 1 week ago

Legioth commented 1 week ago

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

platosha commented 4 days ago

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