Skip to content

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

Conversation

IanMatthewHuff
Copy link
Member

For #9803

  • Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR).
  • Title summarizes what is changing.
  • Has a news entry file (remember to thank yourself!).
  • Appropriate comments and documentation strings in the code.
  • Has sufficient logging.
  • Has telemetry for enhancements.
  • Unit tests & system/integration tests are added/updated.
  • Test plan is updated as appropriate.
  • package-lock.json has been regenerated by running npm install (if dependencies have changed).
  • The wiki is updated with any design decisions/details.

@@ -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 : ''}
Copy link
Member Author

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.

rchiodo
rchiodo previously approved these changes Feb 19, 2020
Copy link

@rchiodo rchiodo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@codecov-io
Copy link

codecov-io commented Feb 19, 2020

Codecov Report

Merging #10222 into master will decrease coverage by 0.04%.
The diff coverage is 0%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/client/datascience/webViewHost.ts 60.54% <ø> (-0.3%) ⬇️
...c/datascience-ui/react-common/settingsReactSide.ts 22.22% <ø> (ø) ⬆️
src/client/datascience/types.ts 100% <ø> (ø) ⬆️
src/client/datascience/codeCssGenerator.ts 8.04% <0%> (ø) ⬆️
src/client/common/utils/platform.ts 76.47% <0%> (ø) ⬆️
src/client/linters/pydocstyle.ts 88.88% <0%> (ø) ⬆️
src/client/datascience/debugLocationTracker.ts 78.12% <0%> (ø) ⬆️
src/client/datascience/datascience.ts 67.6% <0%> (-1.41%) ⬇️
...atascience/interactive-window/interactiveWindow.ts 17.36% <0%> (-1.16%) ⬇️
src/client/datascience/gather/gather.ts 63.15% <0%> (-1.13%) ⬇️
... and 30 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 88f38ec...75cc6ef. Read the comment docs.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@rchiodo rchiodo dismissed their stale review February 20, 2020 00:11

revoking review

Copy link

@rchiodo rchiodo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@IanMatthewHuff
Copy link
Member Author

Pushing over one non-required PR failure. Failure was just HTTP network error in publishing test results, not in tests.

@IanMatthewHuff IanMatthewHuff merged commit 706cd92 into microsoft:master Feb 20, 2020
@IanMatthewHuff IanMatthewHuff deleted the dev/ianhu/honorEditorScrollbarSizes branch February 20, 2020 17:23
@lock lock bot locked as resolved and limited conversation to collaborators Feb 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants