Skip to content

CONSOLE-4404,CONSOLE-4062: Add the ability to specify second logo, favicons #14749

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

Mylanos
Copy link
Contributor

@Mylanos Mylanos commented Feb 10, 2025

After:

Screen.Recording.2025-02-10.at.18.06.06.mov

bridge command used for testing:

./bin/bridge --custom-logo-files Dark=frontend/public/imgs/okd-logo-dark.svg,Light=frontend/public/imgs/okd-logo-light.svg --custom-favicon-files Dark=frontend/public/imgs/okd-favicon.png,Light=frontend/public/imgs/okd-favicon.png

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 10, 2025

@Mylanos: This pull request references CONSOLE-4404 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

TODO

  • remove custom-logo CLI argument? (deprecated or redundant?)
  • Test logo functionality by creating console-custom-logo ConfigMaps.
  • Evaluate what should be done with the logos in img/ folder (Delete, move, or replace?)
  • Fetch favicon and ensure correct application to the DOM.
  • Verify caching behavior for logos.
  • Document this configuration somewhere?

After:
https://github.com/user-attachments/assets/c52d0960-059d-4425-941e-01fa5db46cf4

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 10, 2025
@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 10, 2025
@openshift-ci openshift-ci bot requested review from jhadvig and TheRealJon February 10, 2025 17:21
@openshift-ci openshift-ci bot added component/backend Related to backend component/core Related to console core functionality labels Feb 10, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 10, 2025

@Mylanos: This pull request references CONSOLE-4404 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

TODO

  • remove custom-logo CLI argument? (deprecated or redundant?)
  • Test logo functionality by creating console-custom-logo ConfigMaps.
  • Evaluate what should be done with the logos in img/ folder (Delete, move, or replace?)
  • Fetch favicon and ensure correct application to the DOM.
  • Verify caching behavior for logos.
  • Document this configuration somewhere?

After:
https://github.com/user-attachments/assets/c52d0960-059d-4425-941e-01fa5db46cf4

bridge command used for testing:
./bin/bridge --custom-logo-files='[{"type":"masthead","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-logo-light.svg"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-logo-dark.svg"}]},{"type":"favicon","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-favicon.png"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-favicon.png"}]}]'

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 10, 2025

@Mylanos: This pull request references CONSOLE-4404 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

TODO

  • remove custom-logo CLI argument? (deprecated or redundant?)
  • Test logo functionality by creating console-custom-logo ConfigMaps.
  • Evaluate what should be done with the logos in img/ folder (Delete, move, or replace?)
  • Fetch favicon and ensure correct application to the DOM.
  • Verify caching behavior for logos.
  • Document this configuration somewhere?

After:
https://github.com/user-attachments/assets/c52d0960-059d-4425-941e-01fa5db46cf4

bridge command used for testing:
./bin/bridge --custom-logo-files='[{"type":"masthead","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-logo-light.svg"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-logo-dark.svg"}]},{"type":"favicon","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-favicon.png"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-favicon.png"}]}]'

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 10, 2025

@Mylanos: This pull request references CONSOLE-4404 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

TODO

  • remove custom-logo CLI argument? (deprecated or redundant?)
  • Test logo functionality by creating console-custom-logo ConfigMaps.
  • Evaluate what should be done with the logos in img/ folder (Delete, move, or replace?)
  • Fetch favicon and ensure correct application to the DOM.
  • Verify caching behavior for logos.
  • Document this configuration somewhere?

After:
https://github.com/user-attachments/assets/c52d0960-059d-4425-941e-01fa5db46cf4

bridge command used for testing:

./bin/bridge --custom-logo-files='[{"type":"masthead","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-logo-light.svg"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-logo-dark.svg"}]},{"type":"favicon","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-favicon.png"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-favicon.png"}]}]'

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 10, 2025

@Mylanos: This pull request references CONSOLE-4404 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

TODO

  • remove custom-logo CLI argument? (deprecated or redundant?)
  • Test logo functionality by creating console-custom-logo ConfigMaps.
  • Evaluate what should be done with the logos in img/ folder (Delete, move, or replace?)
  • Fetch favicon and ensure correct application to the DOM.
  • Verify caching behavior for logos.
  • Document this configuration somewhere?

After:
https://github.com/user-attachments/assets/c52d0960-059d-4425-941e-01fa5db46cf4

bridge command used for testing:

./bin/bridge --custom-logo-files='[{"type":"masthead","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-logo-light.svg"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-logo-dark.svg"}]},{"type":"favicon","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-favicon.png"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-favicon.png"}]}]'

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 10, 2025

@Mylanos: This pull request references CONSOLE-4404 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

TODO

  • remove custom-logo CLI argument? (deprecated or redundant?)
  • Test logo functionality by creating console-custom-logo ConfigMaps.
  • Evaluate what should be done with the logos in img/ folder (Delete, move, or replace?)
  • Fetch favicon and ensure correct application to the DOM.
  • Verify caching behavior for logos.
  • Document this configuration somewhere?
  • align with API and Operator changes

After:
https://github.com/user-attachments/assets/c52d0960-059d-4425-941e-01fa5db46cf4

bridge command used for testing:

./bin/bridge --custom-logo-files='[{"type":"masthead","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-logo-light.svg"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-logo-dark.svg"}]},{"type":"favicon","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-favicon.png"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-favicon.png"}]}]'

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@@ -110,6 +110,8 @@ func main() {

fBranding := fs.String("branding", "okd", "Console branding for the masthead logo and title. One of okd, openshift, ocp, online, dedicated, azure, or rosa. Defaults to okd.")
fCustomProductName := fs.String("custom-product-name", "", "Custom product name for console branding.")

fCustomLogoFiles := fs.String("custom-logo-files", "", "List of custom product images for console branding. Each entry consist of theme type as a key and path as a value.")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update the info string

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 11, 2025

@Mylanos: This pull request references CONSOLE-4404 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

TODO

  • remove custom-logo CLI argument? (deprecated or redundant?)
  • Test logo functionality by creating console-custom-logo ConfigMaps.
  • Evaluate what should be done with the logos in img/ folder (Delete, move, or replace?)
  • Fetch favicon and ensure correct application to the DOM.
  • Verify caching behavior for logos.
  • Document this configuration somewhere?
  • align with API and Operator changes

After:

Screen.Recording.2025-02-10.at.18.06.06.mov

bridge command used for testing:

./bin/bridge --custom-logo-files='[{"type":"masthead","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-logo-light.svg"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-logo-dark.svg"}]},{"type":"favicon","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-favicon.png"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-favicon.png"}]}]'

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 11, 2025

@Mylanos: This pull request references CONSOLE-4404 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

TODO

  • remove custom-logo CLI argument? (deprecated or redundant?)
  • Test logo functionality by creating console-custom-logo ConfigMaps.
  • Evaluate what should be done with the logos in img/ folder (Delete, move, or replace?)
  • Fetch favicon and ensure correct application to the DOM.
  • Verify caching behavior for logos.
  • Document this configuration somewhere?
  • align with API and Operator changes
  • test backend

After:

Screen.Recording.2025-02-10.at.18.06.06.mov

bridge command used for testing:

./bin/bridge --custom-logo-files='[{"type":"masthead","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-logo-light.svg"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-logo-dark.svg"}]},{"type":"favicon","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-favicon.png"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-favicon.png"}]}]'

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@Mylanos Mylanos changed the title [WIP]CONSOLE-4404: Add the ability to specify second logo [CONSOLE SIDE] [WIP]CONSOLE-4404: Add the ability to specify second logo Feb 11, 2025
serverutils.SendResponse(w, http.StatusBadRequest, serverutils.ApiError{Err: errMsg})
return
}
// logo is a public content and revalidate the each new request before releasing cached files
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// logo is a public content and revalidate the each new request before releasing cached files
// logo is a public content, revalidate each new request before releasing cached files

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 14, 2025

@Mylanos: This pull request references CONSOLE-4404 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

TODO

  • remove custom-logo CLI argument? (deprecated or redundant?)
  • Test logo functionality by creating console-custom-logo ConfigMaps.
  • Evaluate what should be done with the logos in img/ folder (Delete, move, or replace?)
  • Fetch favicon and ensure correct application to the DOM.
  • Verify caching behavior for logos.
  • Document this configuration somewhere?
  • align with API and Operator changes
  • test backend
  • handle different file formats

After:

Screen.Recording.2025-02-10.at.18.06.06.mov

bridge command used for testing:

./bin/bridge --custom-logo-files='[{"type":"masthead","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-logo-light.svg"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-logo-dark.svg"}]},{"type":"favicon","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-favicon.png"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-favicon.png"}]}]'

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 14, 2025

@Mylanos: This pull request references CONSOLE-4404 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

TODO

  • remove custom-logo CLI argument? (deprecated or redundant?)
  • Test logo functionality by creating console-custom-logo ConfigMaps.
  • Evaluate what should be done with the logos in img/ folder (Delete, move, or replace?)
  • Fetch favicon and ensure correct application to the DOM.
  • Verify caching behavior for logos.
  • Document this configuration somewhere?
  • align with API and Operator changes
  • test backend
  • handle different file formats

After:

Screen.Recording.2025-02-10.at.18.06.06.mov

bridge command used for testing:

./bin/bridge --custom-logo-files='[{"type":"masthead","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-logo-light.svg"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-logo-dark.svg"}]},{"type":"favicon","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-favicon.png"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-favicon.png"}]}]'

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 14, 2025

@Mylanos: This pull request references CONSOLE-4404 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

TODO

  • remove custom-logo CLI argument? (deprecated or redundant?)
  • Test logo functionality by creating console-custom-logo ConfigMaps.
  • Evaluate what should be done with the logos in img/ folder (Delete, move, or replace?)
  • Fetch favicon and ensure correct application to the DOM.
  • Verify caching behavior for logos.
  • Document this configuration somewhere?
  • align with API and Operator changes
  • test backend
  • handle different file formats

After:

Screen.Recording.2025-02-10.at.18.06.06.mov

bridge command used for testing:

./bin/bridge --custom-logo-files='[{"type":"masthead","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-logo-light.svg"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-logo-dark.svg"}]},{"type":"favicon","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-favicon.png"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-favicon.png"}]}]'

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 14, 2025

@Mylanos: This pull request references CONSOLE-4404 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

TODO

  • remove custom-logo CLI argument? (deprecated or redundant?)
  • Test logo functionality by creating console-custom-logo ConfigMaps.
  • Evaluate what should be done with the logos in img/ folder (Delete, move, or replace?)
  • Fetch favicon and ensure correct application to the DOM.
  • Verify caching behavior for logos.
  • Document this configuration somewhere?
  • align with API and Operator changes
  • test backend
  • handle different file formats

After:

Screen.Recording.2025-02-10.at.18.06.06.mov

bridge command used for testing:

./bin/bridge --custom-logo-files='[{"type":"masthead","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-logo-light.svg"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-logo-dark.svg"}]},{"type":"favicon","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-favicon.png"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-favicon.png"}]}]'

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 14, 2025

@Mylanos: This pull request references CONSOLE-4404 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

TODO

  • remove custom-logo CLI argument? (deprecated or redundant?)
  • Test logo functionality by creating console-custom-logo ConfigMaps.
  • Evaluate what should be done with the logos in img/ folder (Delete, move, or replace?)
  • Verify caching behavior for logos.
  • Document this configuration somewhere?
  • align with API and Operator changes
  • test backend
  • handle different file formats

After:

Screen.Recording.2025-02-10.at.18.06.06.mov

bridge command used for testing:

./bin/bridge --custom-logo-files='[{"type":"masthead","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-logo-light.svg"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-logo-dark.svg"}]},{"type":"favicon","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-favicon.png"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-favicon.png"}]}]'

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 17, 2025

@Mylanos: This pull request references CONSOLE-4404 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

TODO

  • remove custom-logo CLI argument? (deprecated or redundant?)
  • Test logo functionality by creating console-custom-logo ConfigMaps.
  • Evaluate what should be done with the logos in img/ folder (Delete, move, or replace?)
  • Verify caching behavior for logos.
  • Document this configuration somewhere?
  • align with API and Operator changes
  • test backend
  • handle different file formats

After:

Screen.Recording.2025-02-10.at.18.06.06.mov

bridge command used for testing:

./bin/bridge --custom-logo-files='[{"type":"masthead","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-logo-light.svg"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-logo-dark.svg"}]},{"type":"favicon","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-favicon.png"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-favicon.png"}]}]'

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 17, 2025

@Mylanos: This pull request references CONSOLE-4404 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

TODO

  • what to do with custom-logo CLI argument? (deprecated or redundant?)
  • Test logo functionality by creating console-custom-logo ConfigMaps.
  • Evaluate what should be done with the logos in img/ folder (Delete, move, or replace?)
  • Verify caching behavior for logos.
  • Document this configuration somewhere?
  • align with API and Operator changes
  • test backend
  • handle different file formats

After:

Screen.Recording.2025-02-10.at.18.06.06.mov

bridge command used for testing:

./bin/bridge --custom-logo-files='[{"type":"masthead","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-logo-light.svg"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-logo-dark.svg"}]},{"type":"favicon","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-favicon.png"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-favicon.png"}]}]'

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@Mylanos Mylanos force-pushed the CONSOLE-4404-add-ability-for-second-logo-in-PF6 branch from d88af9e to b13008b Compare February 17, 2025 16:23
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 17, 2025

@Mylanos: This pull request references CONSOLE-4404 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

TODO

  • what to do with custom-logo CLI argument? (deprecated or redundant?)
  • Test logo functionality by creating console-custom-logo ConfigMaps.
  • Evaluate what should be done with the logos in img/ folder (Delete, move, or replace?)
  • Verify caching behavior for logos.
  • Document this configuration somewhere?
  • align with API and Operator changes
  • test backend
  • handle different file formats

After:

Screen.Recording.2025-02-10.at.18.06.06.mov

bridge command used for testing:

./bin/bridge --custom-logo-files='[{"type":"masthead","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-logo-light.svg"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-logo-dark.svg"}]},{"type":"favicon","logos":[{"theme":"light-theme","path":"frontend/public/imgs/okd-favicon.png"},{"theme":"dark-theme","path":"frontend/public/imgs/okd-favicon.png"}]}]'

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@Mylanos Mylanos force-pushed the CONSOLE-4404-add-ability-for-second-logo-in-PF6 branch from b13008b to d65b514 Compare February 28, 2025 11:37
@rhamilto
Copy link
Member

Gonna close and reopen to kick CI.

Well that didn't work. 🤔

@rhamilto
Copy link
Member

Gonna close and reopen to kick CI.

Well that didn't work. 🤔

Right as I posted that it refreshed. 🥇

@Mylanos
Copy link
Contributor Author

Mylanos commented Apr 15, 2025

Found one bug in backend and one go.mod issue
will update asap

@Mylanos Mylanos force-pushed the CONSOLE-4404-add-ability-for-second-logo-in-PF6 branch from 3e78d08 to 2a5c1d9 Compare April 15, 2025 21:16
fCustomLogoFile := fs.String("custom-logo-file", "", "Custom product image for console branding.")

customLogoFlags := serverconfig.LogosKeyValue{}
fs.Var(&customLogoFlags, "custom-logo-files", "List of custom product images used for console branding. Each entry consist of theme type (Dark | Light | Default) as a key and path to image file as value.")
Copy link
Contributor

@yapei yapei Apr 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spec.customization.customLogoFile field is still valid for consoles.operator configuration although only one of spec.customization.customLogoFile and spec.customization.logos can take effect, shall we keep flag -custom-logo-file ?

Copy link
Contributor Author

@Mylanos Mylanos Apr 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I understand, even though spec.customization.customLogoFile is marked as deprecated console.operator had to keep the configuration for backwards compatibility, so we won't affect customers still having the customLogoFile OpenShift API configured. In reality what CO does in case there is a customLogoFile OpenShift configuration still present is that it just feeds it to the new Logos API to configure the Masthead type custom logo for all themes ( light and dark currently). So in the end console.operator will always pass the customLogo configuration to bridge/console via the new Logos API inside the console-config.

I think we have decided to remove this configuration from bridge, due to its nature of being only a secondary API to console.operator, meaning this configuration is meant for developers of the bridge/console only and no real customer should be dependent on this.

cc @jhadvig @TheRealJon to confirm or deny.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense, thank you @Mylanos

customLogoFlags := serverconfig.LogosKeyValue{}
fs.Var(&customLogoFlags, "custom-logo-files", "List of custom product images used for console branding. Each entry consist of theme type (Dark | Light | Default) as a key and path to image file as value.")
customFaviconFlags := serverconfig.LogosKeyValue{}
fs.Var(&customFaviconFlags, "custom-favicon-files", "List of custom product images used for console branding. Each entry consist of theme type (Dark | Light | Default) as a key and path to image file as value.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we update the help message for -custom-favicon-files flag? It's exactly the same as -custom-logo-files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, will update.

@yapei
Copy link
Contributor

yapei commented Apr 17, 2025

In my testing, I don't see favicon is updated when switching between Light and Dark theme via web console(switching via browser works), see recording

favicon-remains-same.mov

and here is my configuration

$ oc create configmap custom-logo-dark-name --from-file=/Users/yapei/Desktop/custom-logo-dark.svg -n openshift-config
configmap/custom-logo-dark-name created
$ oc create configmap custom-logo-light-name --from-file=/Users/yapei/Desktop/custom-logo-light.svg -n openshift-config
configmap/custom-logo-light-name created
$ oc create configmap custom-favicon-light-name --from-file=/Users/yapei/Desktop/custom-favicon-light.svg -n openshift-config
configmap/custom-favicon-light-name created
$ oc create configmap custom-favicon-dark-name --from-file=/Users/yapei/Desktop/custom-favicon-dark.svg -n openshift-config
configmap/custom-favicon-dark-name created
$ oc get console.operator cluster -o json | jq .spec.customization.logos
[
  {
    "themes": [
      {
        "mode": "Light",
        "source": {
          "configMap": {
            "key": "custom-logo-light.svg",
            "name": "custom-logo-light-name"
          },
          "from": "ConfigMap"
        }
      },
      {
        "mode": "Dark",
        "source": {
          "configMap": {
            "key": "custom-logo-dark.svg",
            "name": "custom-logo-dark-name"
          },
          "from": "ConfigMap"
        }
      }
    ],
    "type": "Masthead"
  },
  {
    "themes": [
      {
        "mode": "Light",
        "source": {
          "configMap": {
            "key": "custom-favicon-light.svg",
            "name": "custom-favicon-light-name"
          },
          "from": "ConfigMap"
        }
      },
      {
        "mode": "Dark",
        "source": {
          "configMap": {
            "key": "custom-favicon-dark.svg",
            "name": "custom-favicon-dark-name"
          },
          "from": "ConfigMap"
        }
      }
    ],
    "type": "Favicon"
  }
]

@yanpzhan
Copy link
Contributor

Another issue: any time user refreshs console page, it will show default masthead logo and favicon for a while, then custom masthead logo and favicon shows up. It's better not show default logo.
AwesomeScreenshot-4_17_2025,3_40_44PM.webm

@rhamilto
Copy link
Member

In my testing, I don't see favicon is updated when switching between Light and Dark theme via web console(switching via browser works), see recording

This is expected. The favicon should only change when the system preference is changed. Why? That's what results in the browser's tab color changing. Note there is a known limitation because of this behavioral difference: if the user preference is set to Light or Dark and the user changes the system preference, the favicon will not change until the browser is refreshed (you'll note it does change if the user preference is System default).

@rhamilto
Copy link
Member

Another issue: any time user refreshs console page, it will show default masthead logo and favicon for a while, then custom masthead logo and favicon shows up. It's better not show default logo. AwesomeScreenshot-4_17_2025,3_40_44PM.webm

This should only happen if custom product name is not set, which should be less common since we instruct users to set both.

Mylanos added 4 commits April 17, 2025 18:44
…tion if there is a favicon or customLogo customization
…ic logos when custom logos have not been fetched yet.

Used the newly introduced SERVER_FLAGS customFaviconsConfigured and customLogosConfigured in a logic that prevents attempts to fetch custom logo type that is not configured.
@Mylanos Mylanos changed the title [WIP]CONSOLE-4404,CONSOLE-4062: Add the ability to specify second logo, favicons CONSOLE-4404,CONSOLE-4062: Add the ability to specify second logo, favicons Apr 17, 2025
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 17, 2025
Copy link
Contributor

openshift-ci bot commented Apr 18, 2025

@Mylanos: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/okd-scos-e2e-aws-ovn 940f17d link false /test okd-scos-e2e-aws-ovn
ci/prow/analyze 940f17d link true /test analyze
ci/prow/frontend 940f17d link true /test frontend
ci/prow/e2e-gcp-console 940f17d link true /test e2e-gcp-console
ci/prow/backend 940f17d link true /test backend

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@TheRealJon
Copy link
Member

@Mylanos @rhamilto There seems to be an issue rendering svg masthead logos. When I use svg files, the logo is rendered at 0 height and width. Maybe an issue with one of the PF components?

@rhamilto
Copy link
Member

@Mylanos @rhamilto There seems to be an issue rendering svg masthead logos. When I use svg files, the logo is rendered at 0 height and width. Maybe an issue with one of the PF components?

Do the SVGs have width and height attributes defined (e.g., https://github.com/openshift/console/blob/main/frontend/public/imgs/openshift-logo.svg?short_path=340083c#L1)? I'm guessing they don't.

@rhamilto
Copy link
Member

@Mylanos @rhamilto There seems to be an issue rendering svg masthead logos. When I use svg files, the logo is rendered at 0 height and width. Maybe an issue with one of the PF components?

Do the SVGs have width and height attributes defined (e.g., https://github.com/openshift/console/blob/main/frontend/public/imgs/openshift-logo.svg?short_path=340083c#L1)? I'm guessing they don't.

If you use the same logos on the PatternFly web site, do they show up?

@yanpzhan
Copy link
Contributor

@Mylanos @rhamilto The issue was that I saw empty masthead log when I only set custom masthead logo for one theme(light or dark). Eg, when I set custom masthead logo for dark theme, I could see the new masthead logo in dark theme, at the meanwhile I will see empty masthead log in light theme.

# oc get consoles.operator.openshift.io cluster -o json | jq '.spec.customization.logos'
[
  {
    "themes": [
      {
        "mode": "Dark",
        "source": {
          "configMap": {
            "key": "masthead-dark-logo.png",
            "name": "custom-logos-masthead-dark"
          },
          "from": "ConfigMap"
        }
      }
    ],
    "type": "Masthead"
  }
]
AwesomeScreenshot-4_21_2025.3_54_20PM.webm

@TheRealJon
Copy link
Member

@yanpzhan Do you mind if we move forward with merging this and openshift/console-operator#963 and open a bug to address the above issue?

@rhamilto
Copy link
Member

@Mylanos @rhamilto The issue was that I saw empty masthead log when I only set custom masthead logo for one theme(light or dark). Eg, when I set custom masthead logo for dark theme, I could see the new masthead logo in dark theme, at the meanwhile I will see empty masthead log in light theme.

# oc get consoles.operator.openshift.io cluster -o json | jq '.spec.customization.logos'
[
  {
    "themes": [
      {
        "mode": "Dark",
        "source": {
          "configMap": {
            "key": "masthead-dark-logo.png",
            "name": "custom-logos-masthead-dark"
          },
          "from": "ConfigMap"
        }
      }
    ],
    "type": "Masthead"
  }
]

AwesomeScreenshot-4_21_2025.3_54_20PM.webm

IMO, this is expected behavior. I do not think we should make assumptions about a user's intent. It'll make troubleshooting much easier.

@TheRealJon
Copy link
Member

@Mylanos @rhamilto There seems to be an issue rendering svg masthead logos. When I use svg files, the logo is rendered at 0 height and width. Maybe an issue with one of the PF components?

Do the SVGs have width and height attributes defined (e.g., https://github.com/openshift/console/blob/main/frontend/public/imgs/openshift-logo.svg?short_path=340083c#L1)? I'm guessing they don't.

They didn't have height or width attributes. Went back and reproduced with the original customLogoFile API, and the same thing happens. Disregard.

@yanpzhan
Copy link
Contributor

There is not blocking issue for current feature, we can discuss any confusion later, so approve the pr now.
/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Apr 22, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Apr 22, 2025

@Mylanos: This pull request references CONSOLE-4404 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

This pull request references CONSOLE-4062 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

After:

Screen.Recording.2025-02-10.at.18.06.06.mov

bridge command used for testing:

./bin/bridge --custom-logo-files Dark=frontend/public/imgs/okd-logo-dark.svg,Light=frontend/public/imgs/okd-logo-light.svg --custom-favicon-files Dark=frontend/public/imgs/okd-favicon.png,Light=frontend/public/imgs/okd-favicon.png

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@Mylanos
Copy link
Contributor Author

Mylanos commented Apr 22, 2025

/retest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/backend Related to backend component/core Related to console core functionality jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants