hilla icon indicating copy to clipboard operation
hilla copied to clipboard

Menu route items are not visible

Open abdullahtellioglu opened this issue 1 year ago • 2 comments

Describe the bug

An example project from Copilot and a project downloaded from start do not have any route items in Drawer However frontend/generated/file-routes.ts has the route definitions. Additionally, routes are visible on flow projects.

sidenav-empty

import type { AgnosticRoute } from "@vaadin/hilla-file-router/types.js";
import { createRoute } from "@vaadin/hilla-file-router/runtime.js";
import * as Page0 from "../views/@index.js";
import * as Page1 from "../views/hello-world.js";
import * as Layout2 from "../views/@layout.js";
const routes: readonly AgnosticRoute[] = [createRoute("", Layout2, [createRoute("", Page0), createRoute("hello-world", Page1)])];
export default routes;

Expected-behavior

Routes should be rendered in Sidenav properly.

Reproduction

Download a project from start.vaadin.com or open the project.

my-app (39).zip

System Info

Vaadin version: 24..5-SNAPSHOT OS: MacOS 14.4.1 (23E224)

abdullahtellioglu avatar May 14 '24 07:05 abdullahtellioglu

This is probably because 24.5-SNAPSHOT downgrades hilla npm dependencies from 24.4 beta2 to 24.4 beta1

Artur- avatar May 14 '24 07:05 Artur-

Just a side note: Apart from what the actual cause of this issue is, the menus are populated based on the value of the window.Vaadin.views global object, that in turn is being initialized based on the entries of file-routes.json not the file-routes.ts. However, when there are proper routes imported in the file-routes.ts, it can be assumed that the proper values are also present in the file-routes.json.

taefi avatar May 14 '24 10:05 taefi

Hi @abdullahtellioglu, I gave your attached application a try with beta3 and couldn't reproduce the issue, the output looks like this: Screenshot 2024-05-22 at 14 41 37 Is this still an issue for you or could we close it?

taefi avatar May 22 '24 11:05 taefi

I cannot reproduce it either. Closing the issue as completed 👍 Thanks @taefi

abdullahtellioglu avatar May 22 '24 11:05 abdullahtellioglu