feat: Theme Plugin Loading#1524
Merged
bmingles merged 42 commits intodeephaven:mainfrom Oct 5, 2023
Merged
Conversation
30e890e to
135d2ba
Compare
mofojed
requested changes
Sep 25, 2023
66ec40b to
64d4db6
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1524 +/- ##
==========================================
- Coverage 46.36% 46.32% -0.04%
==========================================
Files 564 569 +5
Lines 35787 35877 +90
Branches 8959 8982 +23
==========================================
+ Hits 16591 16620 +29
- Misses 19144 19205 +61
Partials 52 52
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
mattrunyon
requested changes
Sep 27, 2023
17c6085 to
93b5184
Compare
dec7d96 to
0e24329
Compare
mattrunyon
requested changes
Oct 3, 2023
Collaborator
mattrunyon
left a comment
There was a problem hiding this comment.
Looking good. Just 1 tiny thing and a suggestion
mattrunyon
approved these changes
Oct 4, 2023
mofojed
approved these changes
Oct 5, 2023
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
theme_default_dark.scssandtheme_default_light.scss--dh-background-color. This is only consumed in a few places and is set to the original#1a171acolor in theme_default_dark, so shouldn't result in any display changes by default.ThemePlugintype. 2 sample themes can be found in this DRAFT PR: DRAFT: Sample ThemePlugins deephaven-plugins#65Testing
Setup Theme Plugins Locally
e.g
START_OPTS=-Xmx4g -Ddeephaven.jsPlugins.resourceBase=/plugin-devand map a volume/Users/jdoe/code/deephaven-plugins/plugins:/plugin-devdocker-compose up(note, this has to be restarted any time plugins config changes)Run web ui locally
div id="root"element.<style data-theme-key="default-dark">...<body>el. There should be some--dh-color-xxxCSS variables loaded in the inspector.deephaven.themeCache{"themeKey":"default-dark","preloadStyleContent":":root{--dh-accent-color:#4c7dee;--dh-background-color:#1a171a}"}localStorage.setItem('deephaven.themeCache', '{"themeKey":"default-light"}')and reload pageNote: On the first page refresh, there will be a moment where the background shows the previously applied theme. Refreshing the page again should show the right color the entire time. This is due to how we are setting things via the console but won't be an issue once users can select themes from the UI.
<style data-theme-key="default-light">...<body>el. There should be some--dh-color-xxxCSS variables loaded in the inspector.deephaven.themeCache{"themeKey":"default-light","preloadStyleContent":":root{--dh-accent-color:#4c7dee;--dh-background-color:#fdfdfd}"}localStorage.setItem('deephaven.themeCache', '{"themeKey":"default-dark"}')and reload page. Should see things go back to initial load stateThere should be 4 custom themes provided by the plugins repo. They can be selected via the following:
localStorage.setItem('deephaven.themeCache', '{"themeKey":"theme-multi-example_acme-dark"}')localStorage.setItem('deephaven.themeCache', '{"themeKey":"theme-multi-example_acme-light"}')localStorage.setItem('deephaven.themeCache', '{"themeKey":"theme-multi-example_acme-cool"}')localStorage.setItem('deephaven.themeCache', '{"themeKey":"theme-single-example_single-dark"}')styletags under thediv id="root". The first will be either the dark or light base theme. The 2nd will correspond to the custom theme variables:root { ... }css variables for the custom theme just above the base theme variables{"themeKey":"theme-multi-example_acme-light","preloadStyleContent":":root{--dh-accent-color:#4c7dee;--dh-background-color:#fdfdfd}"}corresponding to the current theme.resolves #1530