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
923 stars 57 forks source link

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

Open Legioth opened 3 weeks ago

Legioth commented 3 weeks 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 2 weeks ago

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