-
Notifications
You must be signed in to change notification settings - Fork 916
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
[Manual Backport 2.x] Feat (core): Make theme settings user-specific and user-configurable (#5652) #6681
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…and user-configurable (opensearch-project#5652) Backport PR: opensearch-project#5652 From opensearch-project#5652 * feat (core): make theme UI settings client-side 1. Add optional `preferBrowserSetting` to UISettings that should be defined client-side 2. Make `theme:darkMode` and `theme:version` prefer browser settings 3. Update UISettings client-side client to check localstorage for settings that prefer browser settings 4. Refactor logos to be responsive to browser-defined theme mode 5. Add a new `startup` script that handles theme/dark mode (injected as blocking script to head) 6. Remove theme/mode-specific logic from injected Styles and Fonts (move logic to `startup` script instead, define all font-faces) 7. Only inject theme values necessary for loading/error screens via `startup` 8. Update branding metadata to pass the correct dark mode 9. Add a new control for admin Enable user control. This setting is enabled as default. When this setting is disabled, admin can disable any user control and we will have the exact previous behavior. --------- Signed-off-by: Josh Romero <rmerqg@amazon.com>
ananzh
requested review from
kavilla,
AMoo-Miki,
ashwin-pc,
joshuarrrr,
abbyhu2000,
zengyan-amazon,
zhongnansu,
manasvinibs,
ZilongX,
Flyingliuhub,
curq,
bandinib-amzn,
SuZhou-Joe,
ruanyl,
BionIT and
xinruiba
as code owners
April 29, 2024 23:16
AMoo-Miki
approved these changes
Apr 29, 2024
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 2.x #6681 +/- ##
==========================================
- Coverage 67.82% 67.75% -0.08%
==========================================
Files 3410 3411 +1
Lines 66751 66814 +63
Branches 10842 10849 +7
==========================================
- Hits 45277 45270 -7
- Misses 18840 18907 +67
- Partials 2634 2637 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
kavilla
approved these changes
Apr 29, 2024
kavilla
added a commit
to kavilla/OpenSearch-Dashboards-1
that referenced
this pull request
May 7, 2024
…pecific and user-configurable (opensearch-project#5652) (opensearch-project#6681)" This reverts commit 815d2bd. Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
kavilla
added a commit
that referenced
this pull request
May 7, 2024
seraphjiang
added a commit
to seraphjiang/OpenSearch-Dashboards
that referenced
this pull request
Jun 7, 2024
Signed-off-by: Huan Jiang <seraphjiang@gmail.com>
BionIT
pushed a commit
that referenced
this pull request
Jun 10, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport PR:
#5652
Description
preferBrowserSetting
to UISettings that should be defined client-sidetheme:darkMode
andtheme:version
prefer browser settingsstartup
script that handles theme/dark mode (injected as blocking script to head)startup
script instead, define all font-faces)startup
Check List
yarn test:jest
yarn test:jest_integration