backstage / demo

The Backstage demo deployment
Apache License 2.0
101 stars 217 forks source link

home / root / catalog confusion #528

Closed zwilias closed 3 weeks ago

zwilias commented 1 month ago

Currently, the demo-site is set up to:

When directing my browser to https://demo.backstage.io, I somewhat expected to land on the homepage. It may very well be a conscious choice not to do so, but I do want to call out that it seems somewhat expected, especially given it's the very first navigation item.

What happens instead is that I'm redirected to the catalog on /catalog (also fine!) but no navigation items are active. I imagine this is simply because https://github.com/backstage/demo/blame/1fcb20399e8ddfa5d697029d538eda236a12295f/packages/app/src/components/Root/Root.tsx#L87 we link to / in the sidebar nav.

I think that should be changed to link to /catalog, if only to make the nav highlight correctly.

Further, I'd also argue that the homepage plugin can/should be mounted on / instead of /home. That is a bit more opinionated, but it also doesn't seem "weird" to have the homepage be the entry point.

I can follow up with 2 PR's:

  1. link to /catalog in the sidebar "Catalog" item to get the nav highlighting correctly. This should be rather uncontroversial.
  2. serve the homepage on / instead of /home. Since it's a bit more of an opinionated take, having it be a separate PR makes it easier to have focused discussion, without blocking the fix for the nav.

Does that sounds alright to y'all?

awanlin commented 1 month ago

Hi @zwilias, this is by design. One of the things we try to balance with this Demo site is what the experience will be like when potential Adopters create their first Backstage instance. We want it to mimc that and currently Catalog is where you land and there is no Home. This compromise allows us to show other features like the Home Page. I did also note that in the PR - https://github.com/backstage/demo/pull/186 - when I added the Home plugin.

Hope that helps?

zwilias commented 1 month ago

Gotcha, that makes sense. How would you feel about pointing the catalog sidebar item to /catalog?

That would retain everything the way it is now (given / navigates to the catalog) but allow the item to be highlighted.

awanlin commented 1 month ago

Sure, if you feel like it really needs to change, feel free to submit a PR for that 👍

awanlin commented 3 weeks ago

Going to close this, if you want to follow up with a PR feel free.