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
Command Palette: Maintain page state when changing theme #59787
Conversation
@@ -7,11 +7,10 @@ import { contextSrv } from '../core'; | |||
|
|||
import { PreferencesService } from './PreferencesService'; | |||
|
|||
export async function toggleTheme(runtimeOnly: boolean) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would we want to rename this file too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome! It looks like this approach avoids the bugs you see when toggling themes with keybindings (c t
, c r
)as well.
Hmm yeah it is using the same code but I still see the partial theme on the home screen using the keybindings and not the command palette. |
@gelicia is that using command palette and |
Ah got it, didn't realize there was a distinction between the keybindings. Thanks! |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-59787-to-v9.3.x origin/v9.3.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 46adfb596ddb09e6d003e4845eb4a3be6473f8f6
# Push it to GitHub
git push --set-upstream origin backport-59787-to-v9.3.x
git switch main
# Remove the local backport branch
git branch -D backport-59787-to-v9.3.x Then, create a pull request where the |
* use same function as the change theme keybindings * rename toggleTheme service to just theme (cherry picked from commit 46adfb5)
…) (grafana#59841) * use same function as the change theme keybindings * rename toggleTheme service to just theme (cherry picked from commit 46adfb5)
What is this feature?
Why do we need this feature?
Who is this feature for?
Which issue(s) does this PR fix?:
Fixes #56840
Special notes for your reviewer: