Skip to content

Commit 486782f

Browse files
authored
RHIDP-5604 Configuring entity tab titles and entity detail tab layout (redhat-developer#903)
* RHIDP-5604 Configuring Entity Page widgets and tabs layout Signed-off-by: Fabrice Flore-Thébault <[email protected]>
1 parent 0ca9df1 commit 486782f

File tree

3 files changed

+98
-0
lines changed

3 files changed

+98
-0
lines changed

assemblies/assembly-customizing-the-appearance.adoc

+6
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ include::modules/customizing-the-appearance/proc-customize-rhdh-branding-logo.ad
2828
include::modules/customizing-the-appearance/proc-customize-rhdh-sidebar-menuitems.adoc[leveloffset=+1]
2929

3030

31+
include::modules/customizing-the-appearance/proc-customizing-entity-tab-titles.adoc[leveloffset=+1]
32+
33+
34+
include::modules/customizing-the-appearance/proc-customizing-entity-detail-tab-layout.adoc[leveloffset=+1]
35+
36+
3137
include::modules/customizing-the-appearance/proc-customize-rhdh-palette.adoc[leveloffset=+1]
3238

3339

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
[id="configuring-entity-detail-tab-layout_{context}"]
2+
= Configuring entity detail tab layout
3+
4+
Each {product} entity detail tab has a default opinionated layout.
5+
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.
6+
7+
.Prerequisites
8+
9+
* 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].
10+
11+
.Procedure
12+
13+
* Copy the plugin default configuration in your `{my-app-config-file}` file, and change the `layout` properties.
14+
+
15+
[source,yaml,subs="+quotes"]
16+
----
17+
global:
18+
dynamic:
19+
plugins:
20+
- package: _<package_location>_
21+
disabled: false
22+
pluginConfig:
23+
dynamicPlugins:
24+
frontend:
25+
_<plugin_name>_:
26+
mountPoints:
27+
- mountPoint: _<mount_point>_
28+
importName: _<import_name>_
29+
config:
30+
layout:
31+
gridColumn:
32+
lg: span 6
33+
xs: span 12
34+
----
35+
`package`::
36+
Enter your package location, such as `./dynamic-plugins/dist/backstage-community-plugin-tekton`.
37+
38+
`_<plugin_name>_`::
39+
Enter your plugin name, such as: `backstage-community.plugin-tekton`.
40+
41+
`mountPoint`::
42+
Copy the mount point defined in the plugin default configuration, such as: `entity.page.ci/cards`.
43+
44+
`importName`::
45+
Copy the import name defined in the plugin default configuration, such as: `TektonCI`.
46+
47+
`layout`:: Enter your layout configuration.
48+
The tab content is displayed in a responsive grid that uses a 12 column-grid and supports different breakpoints (`xs`,
49+
`sm`, `md`, `lg`, `xl`) that can be specified for a CSS property, such as `gridColumn`.
50+
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).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[id="configuring-entity-tab-titles_{context}"]
2+
= Configuring entity tab titles
3+
4+
{product} provides a default opinionated tab set for catalog entity views.
5+
For consistency with your organization needs, you can rename, reorder, remove, and add tab titles.
6+
7+
.Procedure
8+
* For each tab to modify, enter your desired values in the `entityTabs` section in your `{my-app-config-file}` file:
9+
+
10+
[source,yaml,subs="+quotes"]
11+
----
12+
upstream:
13+
backstage:
14+
appConfig:
15+
dynamicPlugins:
16+
frontend:
17+
_<plugin_name>_:
18+
entityTabs:
19+
- mountPoint: _<mount_point>_
20+
path: _<path>_
21+
title: _<title>_
22+
priority: _<priority>_
23+
----
24+
25+
`_<plugin_name>_`::
26+
Enter the plugin name, such as `backstage-community.plugin-topology`.
27+
28+
`mountPoint`::
29+
Enter the tab mountpoint, such as `entity.page.topology`.
30+
31+
`path`::
32+
Enter the tab path, such as `/topology`.
33+
`title`::
34+
Enter the tab title, such as `Topology`.
35+
36+
`priority`::
37+
Optional.
38+
+
39+
To reorder tabs, enter the tab priority, such as `42`.
40+
Higher priority appears first.
41+
+
42+
To remove a tab, enter a negative value, such as `-1`.

0 commit comments

Comments
 (0)