janus-idp / backstage-showcase

This repo is moving to https://github.com/redhat-developer/red-hat-developer-hub
https://showcase.janus-idp.io
Apache License 2.0
112 stars 149 forks source link

Add new tab EntityPage for the QuarkusConsole page #1147

Open cmoulliard opened 7 months ago

cmoulliard commented 7 months ago

Provide a clear and concise description of the feature request

We cannot until now use our QuarkusConsole page

Screenshot 2024-03-28 at 15 58 10

as the EntityPage on RHDH/showcase only supports the following mountPoints and no tab exists here for Quarkus

cmoulliard commented 7 months ago

When is the triage scheduled ?

cmoulliard commented 7 months ago

Apparently, it is only needed to add the following code to the index.tsx file of EntityPage, to update the README doc file of dynamic plugin like the file to use locally backstage: app-config.dynamic-plugins.yaml

...
{tab({
      path: '/quarkus',
      title: 'Quarkus',
      mountPoint: 'entity.page.quarkus',
    })}

Screenshot 2024-04-02 at 18 52 18

Remark: I will submit a PR

davidfestal commented 7 months ago

Sorry, I didn't see this issue previously.

Let me repeat here what I commented on the PR:

With dynamic plugins, we should not require changing the source code of the frontend application in order to wire a dynamic plugin in a new tab dedicated to this dynamic plugin.

That seems like an anti-pattern.

Users of the showcase who need to bring their own external plugins in a dedicated tab will usually not be able to change the showcase container image. That's the whole point of dynamic plugins: always use the same container image without requiring any change to the application code.

@tumido @gashcrumb Any idea about how to contribute a new tab ? I assume we should have something, right ?

tumido commented 7 months ago

See my comment here please:

https://github.com/janus-idp/backstage-showcase/pull/1154#issuecomment-2034036152

The way @cmoulliard contributes a new tab is totally ok, however there should be someone else driving this decision (IMO)...

davidfestal commented 7 months ago

See my comment here please:

#1154 (comment)

The way @cmoulliard contributes a new tab is totally ok, however there should be someone else driving this decision (IMO)...

FTR let me post here as well the answer I did to the @tumido comment above:

The fact that you can't just add a new tab by the dynamic plugins mechanism is 100% intentional

I think that even this assertion should be validated by PM / UX. It might be that the availability of such an option (to place a dynamic plugin in a new tab) would still be required, even though not the default or the recommended way.

cc @christophe-f

gashcrumb commented 7 months ago

I also understood our current tab approach as an intentional decision. There's a limit to how many tabs should be used in the tab component and it doesn't currently deal well with lots of tabs. Making this list dynamic is certainly possible, but really needs to be done after working out a strategy to deal with more complicated navigation structures for entity pages.

cmoulliard commented 7 months ago

Nevertheless this is important for RHDH & Red Hat to include a Runtime tab (aka what Tanzu TAP also proposes) for our customers.

Alternatively (if this is doable) we could also decide to merge what we would like to do with the Quarkus/Runtime tab and the existing entity Overview tab

davidfestal commented 7 months ago

Alternatively (if this is doable) we could also decide to merge what we would like to do with the Quarkus/Runtime tab and the existing entity Overview tab

If that's what you mean, this is already possible to add your cards of you Quarkus tab in the Overview tab.

gashcrumb commented 6 months ago

1173 will add the ability to configure new tabs as needed. You'll be able to add new sub-paths to catalog entity pages and define the mount points that will be rendered at those sub-paths.