-
Notifications
You must be signed in to change notification settings - Fork 176
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
Route with "" path does not show up with Hilla @layout.tsx #20869
Comments
yup i found this issue when updating to vaadin 24.6.0 place the route link on this index.tsx |
Looks like none of Flow's client side navigation logic is triggered in this case at all. Could not yet find the root cause for this. |
is it possible the issue lies on the hilla side ? The reason I'm asking for a minimal project that shows the problem is that the FS-based routing is heavily based on convention-over-configuration, e.g. suggesting a file containing the layout should be named as @layout.tsx to be picked up by the FS Router. Now, in 24.6, Flow support for automatic Java layouts is added, so it means there's a chance that something in you project may not be as the framework expects. i got this response from @taefi when i open the Issues on hilla |
That's very possible. Unfortunately our documentation does not seem to describe this specific case, so I can't really say if it should work or not. To me it seems like a valid case though. |
The issue could be that when there are no Hilla views but a routes object without Hilla view[
{
"path": "",
"element": {
"key": null,
"ref": null,
"props": {},
"_owner": null,
"_store": {}
},
"handle": {
"title": "Main Layout"
}
},
{
"path": "*",
"element": {
"key": null,
"ref": null,
"props": {},
"_owner": null,
"_store": {}
}
}
] But if you add a Hilla view, then the blank path entry, in addition to the Hilla view, has an entry for routes object with Hilla view[
{
"path": "",
"element": {
"key": null,
"ref": null,
"props": {},
"_owner": null,
"_store": {}
},
"children": [
{
"path": "hilla",
"element": {
"key": null,
"ref": null,
"props": {},
"_owner": null,
"_store": {}
},
"handle": {
"title": "hilla"
}
},
{
"path": "*",
"element": {
"key": null,
"ref": null,
"props": {},
"_owner": null,
"_store": {}
}
},
{
"index": true,
"element": {
"key": null,
"ref": null,
"props": {},
"_owner": null,
"_store": {}
}
}
],
"handle": {
"title": "Main Layout"
}
},
{
"path": "*",
"element": {
"key": null,
"ref": null,
"props": {},
"_owner": null,
"_store": {}
}
},
{
"index": true,
"element": {
"key": null,
"ref": null,
"props": {},
"_owner": null,
"_store": {}
}
}
] If this is confirmed, the issue should be moved to the Hilla repository. |
Description of the bug
If you have only
@layout.tsx
and one Flow view with@Route("")
then the view is not shown.Expected behavior
The view is shown
Minimal reproducible example
remove
@index.tsx
and any other client side view. Leave@layout.tsx
.Add a flow view with
@Route("")
If you add one Hilla view, or leave the created
about-hilla.tsx
in theviews
folder, then the Flow view worksVersions
The text was updated successfully, but these errors were encountered: