Skip to content

Conversation

@rak-phillip
Copy link
Member

@rak-phillip rak-phillip commented Oct 30, 2025

Summary

This updates when the brand image is shown so that it will render only when not on a cluster route.

Fixes #15673

Occurred changes and/or fixed issues

  • Render the brand image when the route is not cluster

Technical notes summary

currentCluster is set to undefined before receiving a new value when navigating between different clusters, this is the root cause of the "flashing" behavior. Updating the conditional rendering for the brand image so that it's based off of the route helps to remediate this issue.

Areas or cases that should be tested

Navigation throughout dashboard. The correct header image should be shown.

Areas which could experience regressions

There might be some scenarios where the brand image was shown for a cluster route.

Screenshot/Video

2025-10-30.15-56-15.mp4

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes
  • The PR has been reviewed in terms of Accessibility
  • The PR has considered, and if applicable tested with, the three Global Roles Admin, Standard User and User Base

`currentCluster` is set to `undefined` before receiving a new value when navigating between different clusters, this is the root cause of the "flashing" behavior. Updating the conditional rendering for the brand image so that it's based off of the route helps to remediate this issue.

Signed-off-by: Phillip Rak <[email protected]>
Copy link
Member

@codyrancher codyrancher left a comment

Choose a reason for hiding this comment

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

I had a question and a note here.

  • In what scenario do we actually want to render the image on line 501? While clicking through it seems we never actually render it. It makes me wonder if we could delete this all together. The brand image on line 542 appears to be the one we actually render everywhere.
  • There isn't a scenario that I found where this didn't work, however, it relies on convention and there's nothing stopping us or extension developers from completely changing the route naming conventions.

@rak-phillip
Copy link
Member Author

I had a question and a note here.

* In what scenario do we actually want to render the image on line 501? While clicking through it seems we never actually render it. It makes me wonder if we could delete this all together. The brand image on line 542 appears to be the one we actually render everywhere.

I think it's just the home layout - we originally specified simple via layouts:

https://github.com/rancher/dashboard/pull/2730/files#diff-e7ced6fc7ab620b59c02c41687323bfaaf4269f2c8c50abc1b38e37a48470c7a

And now in templates (plain.vue & fail-whale.vue as well):

https://github.com/rancher/dashboard/blob/master/shell/components/templates/home.vue#L76

It could be a vestige.. the history isn't super clear.

* There isn't a scenario that I found where this didn't work, however, it relies on convention  and there's nothing stopping us or extension developers from completely changing the route naming conventions.

I understand the risk of making this change. Maybe we can try to assess other approaches to better guard against. The existing approach of relying on the current cluster isn't working, so my thought process was that we could use the cluster routes as a stand-in.

@codyrancher
Copy link
Member

I understand the risk of making this change. Maybe we can try to assess other approaches to better guard against. The existing approach of relying on the current cluster isn't working, so my thought process was that we could use the cluster routes as a stand-in.

I say go ahead and merge

@rak-phillip rak-phillip merged commit 32fba2f into rancher:master Oct 31, 2025
83 of 95 checks passed
@rak-phillip rak-phillip deleted the bugfix/15673-logo-flash branch October 31, 2025 15:57
@a110605
Copy link
Member

a110605 commented Nov 3, 2025

@rak-phillip , @codyrancher , this PR changes causes rancher logo to display over the imported harvester logo.

Screenshot 2025-11-03 at 2 59 14 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rancher logo "flashes" when navigating betwen pages

3 participants