Skip to content
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

Support transient editor configs #7611

Merged
merged 1 commit into from Dec 11, 2019

Conversation

ajbozarth
Copy link
Contributor

References

Fixes #7295 as (re)discovered in #7350

Code changes

Currently when global file editor settings are changed the transient editor-specific settings are reset to their default global values.

Now the transient editor-specific configs are skipped when any global settings updates are applied to each editor's configs.

User-facing changes

Now when users change setting such as tab size or font size the settings for line numbers, match brackets and line wrap wont reset to their default

Backwards-incompatible changes

N/A

Currently when global file editor settings are changed the transient
editor specifc settings are reset to thier default global values.

Now the transient editor specific configs are skipped when the global
settings updates are applied to each editor's configs
@jupyterlab-dev-mode
Copy link

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

@ajbozarth
Copy link
Contributor Author

This is my third and most successful version addressing this problem. As discussed at the in-person sprint, I did not go forward with just making the three affected setting global, since having those setting be transient and editor specific is closer to expected behavior (ala IDEs). I then tried setting the configs to their current editor value in the updateSettings function, this is the code I had when we last discussed in-person. But upon testing I found that that "fix" caused all the open editors to match the current editors transient settings on global changes, and not just the current one.

That left me with this solution, instead of trying to change the settings I updated the function that updated each editor's config with the latest global values to skip the three transient configs.

Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@blink1073 blink1073 added this to the 2.0 milestone Dec 11, 2019
@blink1073 blink1073 merged commit 3ba40d8 into jupyterlab:master Dec 11, 2019
@ajbozarth ajbozarth deleted the editor-configs branch December 11, 2019 19:04
@lock lock bot added the status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion. label Jan 10, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:resolved-locked Closed issues are locked after 30 days inactivity. Please open a new issue for related discussion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Line numbers in file editor reappear when changing font or tab size
2 participants