You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can use dynamic plugins to extend the global header with additional buttons and customize the order and position of icons and features. For more information on enabling dynamic plugins, see link:{installing-and-viewing-dynamic-plugins-url}[{installing-and-viewing-dynamic-plugins-title}].
4
+
You can use the `red-hat-developer-hub.backstage-plugin-global-header` dynamic plugin to extend the global header with additional buttons and customize the order and position of icons and features. Additionally, you can create and integrate your custom dynamic header plugins using the mount points provided by this new header feature, allowing you to further tailor to suit your needs.
5
+
For more information on enabling dynamic plugins, see link:{installing-and-viewing-dynamic-plugins-url}[{installing-and-viewing-dynamic-plugins-title}].
To extend the functionality of the default global header, include any the following attributes in your global header entry:
7
79
@@ -11,7 +83,7 @@ Specifies the location of the header. Use `application/header` to specify it as
11
83
`importName`::
12
84
Specifies the component exported by the global header plugin.
13
85
+
14
-
The following header components are possible values for the `config` field in the `dynamic-plugins.default.yaml` file:
86
+
The `red-hat-developer-hub.backstage-plugin-global-header` package (enabled by default) offers the following header components as possible mount point values:
15
87
16
88
- **`SearchComponent`**: Adds a search bar (enabled by default).
17
89
- **`Spacer`**: Adds spacing in the header to position buttons at the end. Useful when you disable `SearchComponent`.
@@ -30,12 +102,24 @@ The following header components are possible values for the `config` field in th
30
102
Specifies the position of the header. Supported values are `above-main-content` and `above-sidebar`.
31
103
32
104
.Prerequisites
33
-
* You have configured the support URL in the `{my-app-config-file}` file.
34
-
* You have installed the notifications plugin.
105
+
* You must configure the support URL in the `{my-app-config-file}` file to display the *Support* button in the header.
106
+
* You must install the notifications plugin to display the *Notifications* button in the header.
35
107
36
108
.Procedure
37
109
38
-
. Install your custom header as a dynamic plugin by adding your custom plugin configuration to your `dynamic-plugins.default.yaml` file. For example:
110
+
. Copy the default configuration and modify the field values to suit your needs. You can adjust the `priority` value of each header component to control its position. Additionally, you can enable or disable components by adding or removing them from the configuration. To ensure that the remaining header icon buttons align with the end of the header before the profile dropdown button, set `config.props.growFactor` to `1` in the `Spacer` mount point to enable the `Spacer` component. For example:
111
+
+
112
+
[source,yaml]
113
+
----
114
+
- mountPoint: global.header/component
115
+
importName: Spacer
116
+
config:
117
+
priority: 100
118
+
props:
119
+
growFactor: 1
120
+
----
121
+
122
+
. To use your custom header, you must install it as a dynamic plugin by adding your plugin configuration to your `app-config-dynamic.yaml` file. For example:
39
123
+
40
124
[source,yaml,subs="+attributes,+quotes"]
41
125
----
@@ -47,9 +131,17 @@ Specifies the position of the header. Supported values are `above-main-content`
0 commit comments