Skip to content

Commit 13cc995

Browse files
GitHub Actionsjmagak
authored andcommitted
Configuring theme-specific company logos for global header and sidebar
1 parent f86260e commit 13cc995

File tree

2 files changed

+86
-1
lines changed

2 files changed

+86
-1
lines changed

assemblies/assembly-configuring-the-global-header.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ By default, the {product-short} global header includes the following components:
1616
include::modules/configuring-the-global-header/proc-customize-rhdh-global-header.adoc[leveloffset=+1]
1717

1818

19-
include::modules/configuring-the-global-header/proc-mount-points.adoc[leveloffset=+1]
19+
include::modules/configuring-the-global-header/proc-mount-points.adoc[leveloffset=+1]
20+
21+
22+
include::modules/configuring-the-global-header/proc-configuring-theme-specific-company-logos-for-global-header.adoc[leveloffset=+1]
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
[id="configuring-theme-specific-company-logos-for-global-header.adoc_{context}"]
2+
= Configuring theme-specific company logos for global header and sidebar
3+
4+
You can configure theme-specific company logos in {product} ({product-very-short}) to align with the company's branding and improve visibility across light and dark themes.
5+
6+
The {product-short} theme update changed the *Sidebar* and *Global Header* to use white backgrounds in the light theme.
7+
Previously, both used black backgrounds in light and dark modes. This change needs theme-aware logos to ensure strong contrast and consistent branding.
8+
9+
.Prerequisites
10+
You have the required permissions to modify RHDH configuration.
11+
12+
.Procedure
13+
14+
.Updating *Global Header* logo
15+
* Use the `red-hat-developer-hub.backstage-plugin-global-header` configuration block:
16+
17+
[source,yaml]
18+
----
19+
red-hat-developer-hub.backstage-plugin-global-header:
20+
mountPoints:
21+
- mountPoint: global.header/component
22+
importName: CompanyLogo
23+
config:
24+
priority: 200
25+
props:
26+
to: '/'
27+
logo: <base64_dark_logo> # Used in dark theme
28+
logoLightTheme: <base64_light_logo> # Used in light theme
29+
----
30+
31+
.Updating *Sidebar* logo
32+
33+
* Configure the sidebar logos in the `app.branding` section:
34+
35+
[source,yaml]
36+
----
37+
app:
38+
branding:
39+
fullLogo: <base64_dark_logo> # Used in dark theme
40+
fullLogoLightTheme: <base64_light_logo> # Used in light theme
41+
----
42+
43+
By default, if you do not provide `fullLogoLightTheme` or `logoLightTheme`, the application uses `logo` or `fullLogo` for both themes.
44+
45+
If `app.sidebar.logo` is set to `true`, you must also configure `app.branding.fullLogoLightTheme` to display the correct logo in light theme.
46+
47+
If you do not configure any logos, the *Sidebar* displays the default RHDH icon for both light and dark themes.
48+
49+
The `CompanyLogo` component and the Sidebar automatically select the correct logo based on the active theme. The application uses the following order of priority:
50+
51+
*Global Header*
52+
53+
* Light theme (highest to Lowest priority):
54+
55+
. `logoLightTheme` (from CompanyLogo props)
56+
. `app.branding.fullLogoLightTheme`
57+
. `logo (from `CompanyLogo` props)
58+
. `app.branding.fullLogo`
59+
. Default RHDH light theme logo
60+
61+
* Dark theme (highest to lowest priority):
62+
63+
. `logo` (from `CompanyLogo` props)
64+
. `app.branding.fullLogo`
65+
. Default RHDH dark theme logo
66+
67+
*Sidebar* (When `app.sidebar.logo` is set to true)
68+
69+
* Light theme:
70+
71+
. `app.branding.fullLogoLightTheme`
72+
. `app.branding.fullLogo`
73+
. Default RHDH light theme icon
74+
75+
* Dark Theme:
76+
77+
. `app.branding.fullLogo`
78+
. Default RHDH dark theme icon
79+
80+
.Verification
81+
. Switch between light and dark themes in the UI.
82+
. Confirm that the correct logo appears in both the *Global Header* and *Sidebar* according to the theme.

0 commit comments

Comments
 (0)