generated from redhat-developer/new-project-template
-
Notifications
You must be signed in to change notification settings - Fork 44
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
RHIDP-5604 Configuring entity tab titles and entity detail tab layout #903
Open
themr0c
wants to merge
13
commits into
redhat-developer:main
Choose a base branch
from
themr0c:RHIDP-5604-entity-page-widgets-and-tabs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+148
−0
Open
Changes from 9 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
32a7413
RHIDP-5604 Configuring Entity Page widgets and tabs layout
themr0c 4890a04
Merge branch 'main' into RHIDP-5604-entity-page-widgets-and-tabs
themr0c 371acb4
modularization step 1
themr0c 7db0659
modularization continued
themr0c 80228c2
added to the outline
themr0c 9aebd99
Update modules/customizing-the-appearance/proc-customizing-entity-det…
themr0c f9e9562
Update modules/customizing-the-appearance/proc-customizing-entity-tab…
themr0c 9209bbc
Update modules/customizing-the-appearance/proc-customizing-entity-tab…
themr0c 3078da2
Update modules/customizing-the-appearance/proc-customizing-entity-tab…
themr0c 66b89d1
Update modules/customizing-the-appearance/proc-customizing-entity-tab…
themr0c a46d89f
Update modules/customizing-the-appearance/proc-customizing-entity-tab…
themr0c c8c5adc
Update modules/customizing-the-appearance/proc-customizing-entity-tab…
themr0c 3c22bda
Update modules/customizing-the-appearance/proc-customizing-entity-tab…
themr0c File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
modules/customizing-the-appearance/proc-customizing-entity-detail-tab-layout.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[id="configuring-entity-detail-tab-layout_{context}"] | ||
= Configuring entity detail tab layout | ||
|
||
Each {product} entity detail tab has a default opinionated layout. | ||
For consistency with your organization needs, you can change the entity detail tab content when the plugin that contributes the tab content allows a configuration. | ||
|
||
.Prerequisites | ||
|
||
* The plugin that contributes the tab content allows a configuration, such as https://github.com/redhat-developer/rhdh/blob/release-{product-version}/dynamic-plugins.default.yaml[{product-short} plugins defining a default configuration in a `config` section]. | ||
|
||
.Procedure | ||
|
||
* Copy the plugin default configuration in your `{my-app-config-file}` file, and change the `layout` properties. | ||
+ | ||
[source,yaml,subs="+quotes"] | ||
---- | ||
global: | ||
dynamic: | ||
plugins: | ||
- package: _<your_package_location>_ # <1> | ||
disabled: false | ||
pluginConfig: | ||
dynamicPlugins: | ||
frontend: | ||
_<your_plugin_name>_: # <2> | ||
mountPoints: | ||
- mountPoint: entity.page.ci/cards # <3> | ||
importName: TektonCI # <4> | ||
config: | ||
layout: # <5> | ||
gridColumn: | ||
lg: span 6 | ||
xs: span 12 | ||
if: | ||
allOf: | ||
- isTektonCIAvailable | ||
---- | ||
<1> `package:` Enter your package location, such as `./dynamic-plugins/dist/backstage-community-plugin-tekton`. | ||
<2> `_<your_plugin_name>_:` Enter your plugin name, such as: `backstage-community.plugin-tekton`. | ||
<3> `mountPoint:` Copy the mount point defined in the plugin default configuration, such as: `entity.page.ci/cards`. | ||
<4> `importName:` Copy the import name defined in the plugin default configuration, such as: `TektonCI`. | ||
<4> `layout:` Enter your layout configuration. | ||
The tab content is displayed in a responsive grid that uses a 12 column-grid and supports different breakpoints (`xs`, | ||
`sm`, `md`, `lg`, `xl`) that can be specified for a CSS property, such as `gridColumn`. | ||
The example uses 6 of the 12 columns to show two Tekton CI cards side-by-side on large (`lg`) screens (`span 6` columns) and show them among themselves (`xs` and above `span 12` columns). |
95 changes: 95 additions & 0 deletions
95
modules/customizing-the-appearance/proc-customizing-entity-tab-titles.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
[id="configuring-entity-tab-titles_{context}"] | ||
= Configuring entity tab titles | ||
|
||
{product} provides an default opinionated tab set for catalog entity views. | ||
For consistency with your organization needs, you can rename, reorder, remove, and add tab titles. | ||
|
||
.Procedure | ||
|
||
. To rename the default tabs, add the following `entityTabs` section in your `{my-app-config-file}` file, and change the `title` values. | ||
+ | ||
[source,yaml] | ||
---- | ||
upstream: | ||
backstage: | ||
appConfig: | ||
dynamicPlugins: | ||
frontend: | ||
backstage-community.plugin-topology: | ||
entityTabs: | ||
- mountPoint: entity.page.topology | ||
path: /topology | ||
title: Changed Topology | ||
- mountPoint: entity.page.lighthouse | ||
path: /lighthouse | ||
title: Changed Lighthouse | ||
- mountPoint: entity.page.api | ||
path: /api | ||
title: Changed Api | ||
- mountPoint: entity.page.dependencies | ||
path: /dependencies | ||
title: Changed Dependencies | ||
- mountPoint: entity.page.docs | ||
path: /docs | ||
title: Changed Docs | ||
- mountPoint: entity.page.overview | ||
path: / | ||
title: Changed Overview | ||
backstage.plugin-kubernetes: | ||
entityTabs: | ||
- mountPoint: entity.page.kubernetes | ||
path: /kubernetes | ||
title: Changed Kubernetes | ||
---- | ||
|
||
. To reorder tabs, set the `priority` value. Higher priority appears first. | ||
themr0c marked this conversation as resolved.
Show resolved
Hide resolved
|
||
For example to set the *Topology* tab priority to `42`: | ||
+ | ||
[source,yaml,subs="+quotes"] | ||
---- | ||
upstream: | ||
backstage: | ||
appConfig: | ||
dynamicPlugins: | ||
frontend: | ||
backstage-community.plugin-topology: | ||
entityTabs: | ||
- mountPoint: entity.page.topology | ||
path: /topology | ||
title: Topology | ||
priority: 42 | ||
---- | ||
|
||
. To remove a tab, set the tab `priority` to a negative value: | ||
+ | ||
[source,yaml,subs="+quotes"] | ||
---- | ||
upstream: | ||
backstage: | ||
appConfig: | ||
dynamicPlugins: | ||
frontend: | ||
entity-tabs-customization: | ||
entityTabs: | ||
- path: _<tab_path>_ | ||
title: _<tab_title>_ | ||
themr0c marked this conversation as resolved.
Show resolved
Hide resolved
|
||
mountPoint: _<tab_mount_point>_ | ||
priority: -1 | ||
---- | ||
|
||
. To add a new tab, add a new list item in the `entityTabs` section, and define the `path`, `title`, `mountPoint`, and `priority` values: | ||
themr0c marked this conversation as resolved.
Show resolved
Hide resolved
|
||
+ | ||
[source,yaml,subs="+quotes"] | ||
---- | ||
upstream: | ||
backstage: | ||
appConfig: | ||
dynamicPlugins: | ||
frontend: | ||
entity-tabs-customization: | ||
themr0c marked this conversation as resolved.
Show resolved
Hide resolved
|
||
entityTabs: | ||
- path: _<your_tab_path>_ | ||
title: _<your_tab_title>_ | ||
mountPoint: _<your_tab_mount_point>_ | ||
priority: _<your_tab_priority>_ | ||
---- |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
You could mention how you did in the other files
Donot want the customers to get an impression that they can do this only with topology/k8s plugin
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.
Could you provide an example that helps the user configure all the tabs in a default install? (No additional plugins)
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 think you can use this same example that you have used above
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.
Yes, but what are the expected values for <your_package_location> and <your_plugin_name>?