Skip to content
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

[BUG] User Theme Selection doesn't retain theme selection #7689

Open
virajsanghvi opened this issue Aug 12, 2024 · 4 comments
Open

[BUG] User Theme Selection doesn't retain theme selection #7689

virajsanghvi opened this issue Aug 12, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@virajsanghvi
Copy link
Collaborator

Describe the bug

After selecting a theme from the user themes selector in the header, the theme gets applied, but the popover doesn't retain the setting. This is because browser based settings don't override persisted settings when the component gets the current value of the setting.

To Reproduce
Steps to reproduce the behavior:

  1. Open theme selector in header
  2. Select a theme that isn't next/v8.
  3. theme will be applied, but if you reopen theme selector, next/v8 will be selected

Expected behavior
The theme selector shows the currently selected theme.

OpenSearch Version
N/A

Dashboards Version
OSD/main (unreleased feature)

Plugins

N/A

Screenshots

N/A

Host/Environment (please complete the following information):
all

Additional context

N/A

@joshuali925
Copy link
Member

i'm not able to reproduce this on current main
Aug-19-2024 16-23-16

@virajsanghvi
Copy link
Collaborator Author

Turn off user based preferences, set another theme in advanced settings as an admin, and then turn on user based preferences - i think you should be able to repro.

@virajsanghvi
Copy link
Collaborator Author

I think the issue is that it treats browser based settings as a default (

this.cache = defaultsDeep(this.cache, this.getBrowserStoredSettings());
), so if the admin has already selected a value, the admin configured value is returned when calling uiSettingsClient.get()

@joshuali925
Copy link
Member

thanks for the details, i'm able to reproduce now

ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Aug 23, 2024
ananzh added a commit to ananzh/OpenSearch-Dashboards that referenced this issue Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants