-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Honor vscode editor size (undocumented setting) and better default size #10222
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
Honor vscode editor size (undocumented setting) and better default size #10222
Conversation
@@ -62,7 +62,8 @@ export class InteractivePanel extends React.Component<IInteractivePanelProps> { | |||
return ( | |||
<div id="main-panel" ref={this.mainPanelRef} role="Main" style={dynamicFont}> | |||
<div className="styleSetter"> | |||
<style>{this.props.rootCss}</style> | |||
<style>{`${this.props.settingsCss ? this.props.settingsCss : ''} |
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.
Note: So I added this new settingsCss state prop. Initially I was looking at adding it into rootCss, but this setting seemed fundamentally different from rootCss. RootCss is very theme specific and needs to be calculated in the main extension part. The css from this setting is only based on the setting value so no reason to make the UI for it not live in the react UI code. Plus we want it to apply even if we can't parse the theme.
For some other settings like this we use inline styles to apply them like dynamicFont right above here. But react doesn't support pseudo elements in inline styles. So instead create our own snippit of css based on settings and setting changes that we update in our styleSetter along with the rootCss.
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.
Codecov Report
@@ Coverage Diff @@
## master #10222 +/- ##
==========================================
- Coverage 61.31% 61.27% -0.05%
==========================================
Files 567 567
Lines 30770 30832 +62
Branches 4410 4424 +14
==========================================
+ Hits 18868 18893 +25
- Misses 10918 10956 +38
+ Partials 984 983 -1
Continue to review full report at Codecov.
|
Kudos, SonarCloud Quality Gate passed!
|
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.
Pushing over one non-required PR failure. Failure was just HTTP network error in publishing test results, not in tests. |
For #9803
package-lock.json
has been regenerated by runningnpm install
(if dependencies have changed).