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

Fix changing font size in text editor #16261

Merged
merged 3 commits into from May 6, 2024

Conversation

FoSuCloud
Copy link
Contributor

References

Fixes: #16182

Code changes

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

User-facing changes

no

Backwards-incompatible changes

no

Copy link

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

Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

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.

@@ -103,4 +103,42 @@ ut elit.`
const tabHandle = await page.activity.getPanelLocator(DEFAULT_NAME);
expect(await tabHandle?.screenshot()).toMatchSnapshot(imageName);
});

test.describe('Changing a text editor font-size', () => {
Copy link
Member

Choose a reason for hiding this comment

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

Thanks a lot for adding a test for this ❤️

@FoSuCloud
Copy link
Contributor Author

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
Copy link
Contributor Author

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 krassowski added this to the 4.2.0 milestone May 6, 2024
@krassowski krassowski changed the title Fix text-editor font-size not work Fix changing font size in text editor May 6, 2024
@krassowski krassowski modified the milestones: 4.2.0, 4.1.x May 6, 2024
@krassowski krassowski merged commit 8a17ca6 into jupyterlab:main May 6, 2024
82 checks passed
@krassowski
Copy link
Member

@meeseeksdev please backport to 4.1.x

meeseeksmachine pushed a commit to meeseeksmachine/jupyterlab that referenced this pull request May 6, 2024
krassowski pushed a commit that referenced this pull request May 7, 2024
Co-authored-by: FoSuCloud <49218295+FoSuCloud@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Increase/Decrease Text Editor Font Size not working
3 participants