|
| 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). |
0 commit comments