Skip to content

Conversation

DavidKutu
Copy link

We get them in nativeEditor.tsx and in interactivePanel.tsx
to apply them as styles, but we also need to send them
as props to eventually assign them in the monaco editor.

For #7624

  • 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.

their fontSize and fontFamily from the settings in VS Code.

We get them in nativeEditor.tsx and in interactivePanel.tsx
to apply them as styles, but we also need to send them
as props to eventually assign them in the monaco editor.
@codecov-io
Copy link

codecov-io commented Oct 2, 2019

Codecov Report

Merging #7746 into master will decrease coverage by 0.37%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7746      +/-   ##
==========================================
- Coverage   58.81%   58.43%   -0.38%     
==========================================
  Files         496      496              
  Lines       22115    22158      +43     
  Branches     3558     3565       +7     
==========================================
- Hits        13006    12948      -58     
- Misses       8297     8392      +95     
- Partials      812      818       +6
Impacted Files Coverage Δ
src/client/datascience/webViewHost.ts 11.11% <ø> (ø) ⬆️
src/client/datascience/types.ts 100% <ø> (ø) ⬆️
src/client/testing/serviceRegistry.ts 48.64% <0%> (-46.85%) ⬇️
src/client/testing/codeLenses/main.ts 44.44% <0%> (-33.34%) ⬇️
...t/datascience/jupyter/jupyterDataRateLimitError.ts 66.66% <0%> (-33.34%) ⬇️
src/client/formatters/serviceRegistry.ts 75% <0%> (-25%) ⬇️
src/client/common/utils/icons.ts 83.33% <0%> (-16.67%) ⬇️
src/client/api.ts 78.57% <0%> (-14.29%) ⬇️
src/client/datascience/cellFactory.ts 75.86% <0%> (-13.8%) ⬇️
src/client/providers/providerUtilities.ts 83.33% <0%> (-5.56%) ⬇️
... and 12 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 fb61f24...c6a0f7d. Read the comment docs.

We now get the VS Code styles from the state of the
component, instead of computing a style from an element.
@DavidKutu DavidKutu self-assigned this Oct 3, 2019
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.

🕐

interactivePanel, and put it in the mainStateController
Copy link

@DonJayamanne DonJayamanne left a comment

Choose a reason for hiding this comment

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

I believe the react context would be a better and cleaner fit.
Tomorrow if there's another similar piece of data we'd need to modify a lot again (hypotheticaly - font color - bad example, but you get the idea)

Using a context, we don't have to modify a lot of places just to pass this information (this is contextual and doesn't change) all the way down.

react and change their fonts when the user changes them
in VS Code, instead of having to reload.
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:

David Kutugata added 3 commits October 4, 2019 16:18
two separate props to make it easier to maintain.

React Context was not used to avoid making the reuse of
components more difficult.
@DavidKutu
Copy link
Author

@DonJayamanne I ended up not using React Context, but I addressed your comment by passing an object as a prop instead of an individual value. Commit b7f514a makes that change.

@DavidKutu DavidKutu merged commit b9e8379 into master Oct 5, 2019
@DavidKutu DavidKutu deleted the davidkutu/font_size_fix branch October 7, 2019 19:53
rchiodo pushed a commit that referenced this pull request Oct 10, 2019
…tFamily from the settings in VS Code. (#7746)

* Make interactive window and native editor take
their fontSize and fontFamily from the settings in VS Code.

We get them in nativeEditor.tsx and in interactivePanel.tsx
to apply them as styles, but we also need to send them
as props to eventually assign them in the monaco editor.

* Moved style from react code to common.css

We now get the VS Code styles from the state of the
component, instead of computing a style from an element.

* Removed getting the font from nativeEditor and
interactivePanel, and put it in the mainStateController

* Made the interactiveWindow and the nativeEditor
react and change their fonts when the user changes them
in VS Code, instead of having to reload.

* Changed the font props to be an object instead of
two separate props to make it easier to maintain.

React Context was not used to avoid making the reuse of
components more difficult.

* Removed some unnecesary passing around of the
font prop

* removed unnecesary comments

* fixed a failing test
@lock lock bot locked as resolved and limited conversation to collaborators Oct 14, 2019
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