-
Notifications
You must be signed in to change notification settings - Fork 142
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
feat(app): Support extensible entity tabs #1173
Conversation
I would argue this Sonarcloud result 😄 |
The image is available at: |
That issue should be sorted now. We'll want to have SonarCloud ignore the |
The image is available at: |
This could do with some more testing on openshift, let's keep this as a draft for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I' not a big fan of having the entityTabs
field directly at the dynamicPlugins
level, because it is still a frontend thing.
I probably would also prefer letting the contribution to a new tab be placed inside a frontend plugin config, like this:
dynamicPlugins:
frontend:
some-plugin-id:
entityTabs:
/quarkus: # catalog sub-route
title: Quarkus # tab title
mountPoint: entity.page.quarkus #tab mount point
mountPoints:
- mountPoint: entity.page.quarkus
It's not my favorite solution either to be honest but given that
Great suggestion! I think I can make this work, I might revise the name choice but I think this is a better direction. Thanks! |
37c1859
to
744bcbe
Compare
e501581
to
fb8f754
Compare
The image is available at: |
The image is available at: |
@gashcrumb About the SonarCould duplication report related to this block: https://github.com/janus-idp/backstage-showcase/pull/1173/files#diff-dc23b2c0e4792453496e74f891819cf0cf5172dd3d6b426bca6b9f85aef4d7e5R67-R128, would it make sense to extract this
I'm not saying it should be done now in this PR, but at least it might be something we want to think about to avoid bypassing the SonarCloud analysis in such cases and having to force-merge. We can also add the corresponding setting directl in the SonarCloud project settings, but I don't have the right permissions, which would be much simpler obviously. cc @kadel Any idea who can do that ? |
I can do that in this PR. I think probably this is the way to go too, as then we've some pointer of these duplicate lines somewhere. Also likely #1202 will also need a similar approach to handle the mapping that needs to be done to match up the API response to the config. |
5a92f2b
to
da4d68a
Compare
The image is available at: |
/lgtm |
This commit adds the ability to customize and extend the default set of tabs available for catalog entity items. The default set of tabs is hard-coded in the entity page but can be reconfigured and extended per plugin using the `entityTabs` property. If multiple plugins target the same entity route, only the first one will be used and a warning will be raised. Signed-off-by: Stan Lewis <[email protected]>
/lgtm |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: davidfestal The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
The image is available at: |
/restest |
/retest |
Description
This commit adds the ability to customize and extend the default set of tabs available for catalog entity items. The default set of tabs is configured as part of the static frontend app configuration, overrides can be applied using the regular backstage config file via the
dynamicPlugins.entityTabs
configuration setting. This commit also fixes a couple rendering warnings that can occur when configuring the same plugin for the same view multiple times.Which issue(s) does this PR fix
PR acceptance criteria
Please make sure that the following steps are complete:
How to test changes / Special notes to the reviewer
With this change a new tab could be added like:
An existing tab can be renamed too, for example:
Visibility of a tab is determined by the availability of items for the configured mount point and the type of catalog entity being displayed. If multiple plugins try and configure the same route, a warning will be raised to the browser console and only the first entry will be used.
Here's a better screenshot with some other plugins enabled:
Which uses this configuration: