Skip to content

Commit 2f73462

Browse files
docs(global-header): add initial tech docs (#413)
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
1 parent f35b797 commit 2f73462

5 files changed

Lines changed: 70 additions & 5 deletions

File tree

workspaces/global-header/app-config.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,15 +99,14 @@ catalog:
9999
locations:
100100
# Local example data, file locations are relative to the backend process, typically `packages/backend`
101101
- type: file
102-
target: ../../examples/entities.yaml
102+
target: ../../catalog-info.yaml
103103

104-
# Local example template
104+
- type: file
105+
target: ../../examples/entities.yaml
105106
- type: file
106107
target: ../../examples/template/template.yaml
107108
rules:
108109
- allow: [Template]
109-
110-
# Local example organizational data
111110
- type: file
112111
target: ../../examples/org.yaml
113112
rules:

workspaces/global-header/catalog-info.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ metadata:
55
title: RHDH Global Header plugin
66
description: The global header plugins provides an extendable way for the RHDH header. It provides a set of default components and also allow other plugins can contribute components to the header.
77
annotations:
8+
backstage.io/techdocs-ref: dir:.
89
github.com/project-slug: redhat-developer/rhdh-plugins
910
github.com/team-slug: redhat-developer/rhdh-plugins-contributers
1011
#sonarqube.org/project-key: redhat-developer_rhdh-plugins
@@ -14,7 +15,7 @@ metadata:
1415
- plugin
1516
spec:
1617
type: backstage-plugin
17-
lifecycle: development
18+
lifecycle: production
1819
owner: rhdh-ui-team
1920
system: rhdh
2021
subcomponentOf: rhdh-plugins
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Global header
2+
3+
Red Hat Developer Hub includes a new configable and highly extendable global header plugin starting with RHDH 1.5.
4+
5+
By default it includes a Search input field, Create, Support[^1] and Notifications[^2] icon buttons and a user profile dropdown.
6+
7+
[^1]: Only when the Support URL is configured in the `app-config.yaml`.
8+
[^2]: Only when the notification plugin is installed.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
site_name: RHDH Global Header
2+
3+
plugins:
4+
- techdocs-core
5+
6+
nav:
7+
- About: index.md
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Configuration
2+
3+
The Red Hat Developer Hub Global Header can be configured via [dynamic plugins](https://github.com/redhat-developer/rhdh/blob/main/docs/dynamic-plugins/index.md) and [dynamic plugin mount points](https://github.com/redhat-developer/rhdh/blob/main/docs/dynamic-plugins/frontend-plugin-wiring.md).
4+
5+
It is the RHDH default "[application header](https://github.com/redhat-developer/rhdh/blob/main/docs/dynamic-plugins/frontend-plugin-wiring.md#adding-application-header)" implementation that customers can extend or replace.
6+
7+
There are multiple level of extension points (mount points) involved.
8+
9+
1. Red Hat Developer Hub loads all "application headers"
10+
2. The Global Header plugin is loaded by default (it's of only header implementation)
11+
- The header itself can be extended with additional buttons, dropdowns via dynamic plugins
12+
- Also the Create and Profile Dropdowns can be extended with additional options
13+
14+
## Disabling the Global Header
15+
16+
The RHDH Global Header can be disabled competely by disabling the right plugin:
17+
18+
```yaml
19+
# Disabling global header
20+
- package: ./dynamic-plugins/dist/red-hat-developer-hub-backstage-plugin-global-header
21+
disabled: true
22+
```
23+
24+
## Replacing the Global Header with your own header
25+
26+
To replace the RHDH Global Header with a completly custom header, the default should be disabled as well (see above).
27+
28+
After that customers can implement and install their own header as a dynamic plugin and include a configuration like this:
29+
30+
```yaml
31+
# Custom header implementation
32+
- package: <npm or oci package-reference>
33+
disabled: false
34+
pluginConfig:
35+
dynamicPlugins:
36+
frontend:
37+
<package_name>:
38+
mountPoints:
39+
- mountPoint: application/header
40+
importName: <Header component name>
41+
config:
42+
layout:
43+
position: above-main-content
44+
```
45+
46+
<!--
47+
## Disable Global Header features
48+
49+
## Add custom components to the Global Header
50+
-->

0 commit comments

Comments
 (0)