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

Desktop: Resolves #11279: Remove left/right edge margin around editor content when disabled in settings #11290

Conversation

personalizedrefrigerator
Copy link
Collaborator

@personalizedrefrigerator personalizedrefrigerator commented Oct 29, 2024

Summary

This pull request resolves #11279 by:

  1. Removing left and right margins from the editor.
  2. Removing CodeMirror's 2px left-edge padding unless the editor has a gutter.
    • Gutters include line numbers, fold/unfold markers, and certain types of other content added by plugins.
    • Without the "unless the editor has a gutter" exception, gutters leave no space between the note text and the gutter's content:
      screenshot: Line number gutter is touching editor content
      Gutters can be added by plugins with, for example, the CodeMirror lineNumbers extension.

Screenshot comparison

Note: Desktop screenshots are from Fedora 41/Linux.
Note: Web screenshots are from Chromium 130 on Fedora 41.

Description Before After
Desktop: No plugins image editor text now is left-aligned with the toolbar
Desktop: Small editor maximum width image appears roughly identical to before
Desktop: Plugin that adds line numbers image similar to before, but less horizontal space between line numbers and editor content
Web: No plugins image roughly identical to before
Web: With a plugin that adds line numbers image roughly identical to before

Resolves laurent22#11279

Note: With this change, there is still a 2px left-edge margin.
This removes a slight remaining misalignment.
@personalizedrefrigerator personalizedrefrigerator changed the title Desktop: Remove left/right edge margin around editor content when disabled in settings Desktop: Resolves #11279: Remove left/right edge margin around editor content when disabled in settings Oct 29, 2024
@laurent22 laurent22 merged commit 2974465 into laurent22:release-3.1 Oct 30, 2024
10 checks passed
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.

2 participants