Skip to content

Commit d46bed6

Browse files
committed
Add the ability to specify a second custom logo for PatternFly 6
1 parent 2890ccc commit d46bed6

File tree

1 file changed

+151
-0
lines changed

1 file changed

+151
-0
lines changed

Diff for: enhancements/console/custom-logos.md

+151
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
---
2+
title: custom-logos
3+
authors:
4+
- "@cajieh"
5+
reviewers:
6+
- "@jhadvig "
7+
- "@spadgett"
8+
- "@everettraven"
9+
- "@JoelSpeed"
10+
approvers:
11+
- "@spadgett"
12+
api-approvers:
13+
- "@JoelSpeed"
14+
creation-date: 2025-02-11
15+
last-updated: 2025-02-11
16+
---
17+
18+
# Custom Logos
19+
20+
## Summary
21+
22+
The OpenShift Container Platform (OCP) web console is currently being upgraded to PatternFly 6. In PatternFly 6, the masthead color changes based on the mode (light or dark). Consequently, a single custom logo may not be suitable for both modes.
23+
24+
Add the ability to specify custom logo features to support light and dark theme modes for the masthead and favicon.
25+
26+
## Background info
27+
28+
The OpenShift Container Platform (OCP) web console is currently being upgraded to PatternFly 6. In PatternFly 6, the masthead color changes based on the mode (light or dark). Consequently, a single custom logo may not be suitable for both modes.
29+
30+
To address this, we need to allow users to add custom logos for both the masthead and favicon that are compatible with light and dark themes. This ensures that the logos are always visible and aesthetically pleasing, regardless of the theme mode.
31+
32+
The custom logos feature will enable users to specify different logos for the masthead and favicon based on the theme mode. This will involve extending the API to support custom logos for both light and dark themes.
33+
34+
## Motivation
35+
36+
The OpenShift Container Platform (OCP) web console is currently being upgraded to PatternFly 6. In PatternFly 6, the masthead color changes based on the mode (light or dark). Consequently, a single custom logo may not be suitable for both modes. This is evident with the existing OKD and OpenShift logos, which assume a dark masthead background and include white text.
37+
38+
### User Stories
39+
40+
* As an OpenShift web console user, I want to be able to add custom logos for light and dark theme modes in the masthead and favicon.
41+
42+
### Goals
43+
44+
This feature should allow users to add custom logos for the masthead and favicon that are compatible with both light and dark theme modes in the OpenShift web console.
45+
46+
### Non-Goals
47+
48+
49+
## Proposal
50+
51+
### Workflow Description
52+
53+
├── spec
54+
│ ├── customization
55+
│ ├── customLogos
56+
│ ├── type
57+
│ ├── themes
58+
│ ├── type
59+
│ ├── file
60+
│ ├── key
61+
│ ├── name
62+
└── ...
63+
64+
### Risks and Mitigations
65+
66+
1. Users could set both the `CustomLogoFile` and `CustomLogos` APIs. When both APIs are set.
67+
68+
To mitigate this challenge, the `CustomLogos` API configuration will take precedence over the old `CustomLogoFile` field.
69+
70+
2. Handling different custom logos for light and dark themes may increase the complexity of the backend and UI logic.
71+
72+
To mitigate this challenge, thoroughly test and validate the new logic, and implement fallback mechanisms to ensure logos are always visible if any are missing.
73+
74+
3. Users might experience confusion with the introduction of new logo configuration options, especially if they are familiar with the old method, which may soon be deprecated.
75+
76+
To mitigate this challenge, provide comprehensive documentation and tools that guide users through the transition. Include clear instructions about the changes and their benefits.
77+
78+
79+
### Drawbacks
80+
81+
N/A
82+
83+
## API Design Details
84+
85+
The configuration for custom logos will include support for both masthead and favicon types, with separate files for light and dark themes:
86+
87+
```yaml
88+
customLogos:
89+
- type: Masthead
90+
themes:
91+
- type: Light
92+
file:
93+
key: logo-light.svg
94+
name: masthead-logo-light
95+
- type: Dark
96+
file:
97+
key: logo-dark.svg
98+
name: masthead-logo-dark
99+
- type: Favicon
100+
themes:
101+
- type: Light
102+
file:
103+
key: favicon-light.ico
104+
name: favicon-logo-light
105+
- type: Dark
106+
file:
107+
key: favicon-dark.ico
108+
name: favicon-logo-dark
109+
```
110+
111+
### Attributes Description
112+
113+
#### customLogos
114+
- `type`: Enumerate which specifies the type of custom logo. Available custom logo types are `Masthead` and `Favicon`.
115+
- `themes`: A list of themes for which the custom logo is defined.
116+
117+
#### themes
118+
- `type`: Enumerate which specifies the type of theme. Available theme types are `Light` and `Dark`.
119+
- `file`: Contains the file details for the custom logo.
120+
121+
#### file
122+
- `key`: The key or path to the logo file.
123+
- `name`: The name identifier for the custom logo.
124+
125+
### Test Plan
126+
127+
### Graduation Criteria
128+
129+
N/A
130+
131+
132+
#### Dev Preview -> Tech Preview
133+
134+
N/A
135+
136+
#### Tech Preview -> GA
137+
138+
N/A
139+
140+
#### Removing a deprecated feature
141+
142+
The current custom logo feature is deprecated and will be removed at some point in the future. Users are encouraged to transition to the new custom logo configuration that supports light and dark theme modes for the masthead and favicon.
143+
144+
N/A
145+
146+
#### Failure Modes
147+
148+
N/A
149+
150+
## Alternatives
151+

0 commit comments

Comments
 (0)