jupyterlab / jupyterlab

JupyterLab computational environment.
https://jupyterlab.readthedocs.io/
Other
13.81k stars 3.12k forks source link

Fix changing font size in text editor #16261

Closed FoSuCloud closed 1 week ago

FoSuCloud commented 2 weeks ago

References

Fixes: https://github.com/jupyterlab/jupyterlab/issues/16182

Code changes

packages/fileeditor-extension/src/commands.ts 截屏2024-04-28 21 47 53

User-facing changes

no

Backwards-incompatible changes

no

jupyterlab-probot[bot] commented 2 weeks ago

Thanks for making a pull request to jupyterlab! To try out this branch on binder, follow this link: Binder

FoSuCloud commented 1 week ago

Thanks @FoSuCloud

I spotted a small glitch that the gutter line number is not updated right away when changing the font size; example when increasing the font size

image

CodeMirror does update the font size of the gutter if I switch back and forth to the file editor. I guess forcing an update after updating the font size may smooth the user experience.

Thanks for knowing the problem, I will force update the number of lines after updating the font size

FoSuCloud commented 1 week ago

It seems that the "should Decrease Content Font Size" and "should Increase Content Font Size" test cases failing have nothing to do with the pr here

krassowski commented 1 week ago

@meeseeksdev please backport to 4.1.x