Skip to content

Conversation

@dmitri-saricev-3pillargloball
Copy link

@dmitri-saricev-3pillargloball dmitri-saricev-3pillargloball commented Nov 27, 2025

https://perconadev.atlassian.net/browse/PMM-14560

  • Publish ThemeChangedEvent after CSS loads for better sync
  • Subscribe to ThemeChangedEvent in SharedPreferences dropdown
  • Add CSS load error handling to prevent stuck UI state
  • Fix TypeScript types to use GrafanaTheme2 properly

Fixes visual lag between theme dropdown and content rendering.

What is this feature?

[Add a brief description of what the feature or update does.]

Why do we need this feature?

[Add a description of the problem the feature is trying to solve.]

Who is this feature for?

[Add information on what kind of user the feature is for.]

Which issue(s) does this PR fix?:

Fixes #

https://github.com/user-attachments/assets/88dc5014-8ed4-4bdf-9fb9-0320a8291a60
Special notes for your reviewer:

FB:
Percona-Lab/pmm-submodules#4131
https://pmm.cd.percona.com/blue/organizations/jenkins/pmm3-submodules/detail/pmm3-submodules/1990/pipeline/

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

- Publish ThemeChangedEvent after CSS loads for better sync
- Subscribe to ThemeChangedEvent in SharedPreferences dropdown
- Add CSS load error handling to prevent stuck UI state
- Fix TypeScript types to use GrafanaTheme2 properly

Fixes visual lag between theme dropdown and content rendering.
- Fixed all tests (12/12 passing)
- Added @percona comments as requested by Matej
- Fixed test structure to use proper GrafanaTheme2 format
- Added proper test cleanup and act() wrappers
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.

3 participants