janus-idp / backstage-showcase

Enterprise-ready Backstage distribution
https://showcase.janus-idp.io
Apache License 2.0
105 stars 140 forks source link

fix(ui): update config at runtime to apply branding #1381

Closed ciiay closed 1 week ago

ciiay commented 2 weeks ago

Description

Currently app.branding.iconLogo is not being injected during runtime, which leads favicon not updating from customization. This PR added a ConfigUpdater component to take the config at runtime so that customized iconLogo will be picked up as favicon.

Which issue(s) does this PR fix

PR acceptance criteria

Please make sure that the following steps are complete:

How to test changes / Special notes to the reviewer

Test data:

data: 
  app-config-rhdh.yaml: |
    app: 
      branding: 
        iconLogo: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAADAFBMVEVHcEyWcCiolEdoUSP+4DD7xRX8zBe4qVCtjDKtiCL+94mkgSWpiy6tmDmogyC1mzGvnkCjgCaypUW2pTvjuzbhuzfMvD2viBzWwjfYqBW2rU360R+3jRnz2jPg1ETmvzTPsCvZsDn8yhrvuR31ySL+7ETsxC68lCK2jyDhujrFmhq5sVPYrBzerS3zwh+9kBj3yBxWORf+5jL91CF/XB3swizdtTjrrRTitTD1yCO5sFfjujbnvS9KOi3DkBTovC/WqDKLcVr8yyP5yhzEiB+NYxj+81CMWx3q4VfjoxZ+Sg1XNRL7wRK2sF7itzGibhXFjRDQpDbl3VzcsDO/hBDyqQ7cnRXkqyLyuxr+6DuyeRPYoCXKgA/ZlRjbggq1r2XOoTBcOiBfPCMNBQTWz2TwrBnKmCXCvWr+60XFli5ySiTPiQouEQYlDgd8QAvl4XvHixe3s2y+kCn7zit+VhF1WheZgDnbuCGffSXYlBHDvnCsfRhzYRfGtURxWQrz1y6EYAjVwkbX03fw3kLRylf+93HEvWjp5X65smrAtGPt6XW7sGTx7oTd12H91hz91Bv8xRLjjAr96D791xz8yRf90B/91ib80R7+4y/91Rn90Bz9zyH+4jX9zRn92yT91iD6yBn8xxT8wxb+8EP6uw/0pQz+81r+82782TT+9Hz98VP++IXy30HnshTwuRX1uRL+5jb+7Tz+6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image

Note: Dynamically loads favicon is not supported by Safari yet.

github-actions[bot] commented 2 weeks ago

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1381!

ciiay commented 2 weeks ago

/retest

github-actions[bot] commented 2 weeks ago

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1381!

ciiay commented 2 weeks ago

/test e2e-tests

ciiay commented 2 weeks ago

/retest

github-actions[bot] commented 2 weeks ago

The image is available at: quay.io/janus-idp/backstage-showcase:pr-1381!

openshift-ci[bot] commented 1 week ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gashcrumb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/janus-idp/backstage-showcase/blob/main/OWNERS)~~ [gashcrumb] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
divyanshiGupta commented 1 week ago

/cherry-pick 1.2.x

openshift-cherrypick-robot commented 1 week ago

@divyanshiGupta: new pull request created: #1424

In response to [this](https://github.com/janus-idp/backstage-showcase/pull/1381#issuecomment-2238538987): >/cherry-pick 1.2.x Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.