-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat: Add option to disable WebGL rendering #2134
Conversation
- Advanced Settings section in the Settings menu, with an option to disable WebGL - Read from the server config for default values - web.webgl: default setting for WebGL being enabled or not - web.webgl.editable: disallow the user from enabling WebGL - Tested by adding the following to the deephaven.prop config: ``` web.webgl=false web.webgl.editable=false client.configuration.list=java.version,deephaven.version,barrage.version,http.session.durationMs,file.separator,web.storage.layout.directory,web.storage.notebook.directory,web.webgl,web.webgl.editable ```
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2134 +/- ##
==========================================
+ Coverage 46.59% 46.62% +0.02%
==========================================
Files 682 685 +3
Lines 38441 38489 +48
Branches 9578 9590 +12
==========================================
+ Hits 17912 17945 +33
- Misses 20519 20534 +15
Partials 10 10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
theme-spectrum-overrides.css
span[class*='spectrum-ToggleSwitch-switch'] {
/* increase contrast of switch in off position */
background: var(--dh-color-gray-500);
}
Is there a follow on ticket for deephaven-express to check this setting? |
@dsmmcken followup ticket: deephaven/deephaven-plugins#612 |
- The Off position blended with the background too much. Add an override so it does not
|
||
span[class*='spectrum-ToggleSwitch-switch'] { | ||
/* increase contrast of switch in off position */ | ||
background: var(--dh-color-gray-500); |
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.
Should we introduce a --dh-toggle-switch-bg: var(--dh-color-gray-500)
to make this overridable?
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.
I don't see why not? @dsmmcken
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.
yes, and actually should double check it in light mode, as I didn't.
Should be added to theme-dark-components.css and theme-light-components.css with appropriate values, that use that variable here.
packages/chart/src/ChartUtils.ts
Outdated
*/ | ||
getPlotlyChartType( | ||
plotStyle: DhType.plot.SeriesPlotStyle, | ||
isBusinessTime: boolean | ||
isBusinessTime: boolean, | ||
allowWebGL: 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.
Should this be mentioned as a BREAKING CHANGE?
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.
I'll just default it to true
to avoid making it a breaking change. I wanted to make sure I caught all the places where it was called from though.
packages/chart/src/ChartUtils.ts
Outdated
@@ -1019,7 +1025,8 @@ class ChartUtils { | |||
|
|||
getChartType( | |||
plotStyle: DhType.plot.SeriesPlotStyle, | |||
isBusinessTime: boolean | |||
isBusinessTime: boolean, | |||
allowWebGL: 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.
Should this be mentioned as a BREAKING CHANGE?
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.
Left a couple of suggestions / questions
- Use typed useSelector - Add css variable for toggle switch background
packages/components/src/theme/theme-dark/theme-dark-semantic.css
Outdated
Show resolved
Hide resolved
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.
1 issue with location of the css variable, but otherwise looks good.
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.
LGTM
packages/components/src/theme/theme-light/theme-light-components.css
Outdated
Show resolved
Hide resolved
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.
LGTM
Screenshot of when it's enabled/editable:
Screenshot of when it's disabled/editable (@dsmmcken I think we may need to change
Switch
styling up here, or the Settings menu background):Screenshot of when it's disabled and not editable on the server: