Dear Obsidian Devs,
I think I’ve found a UI bug with gutters on v1.0.
- Create new vault with a simple git repository setup (or reuse an existing one).
- it doesn’t need to be able to push. just local commits and branch setup suffice
git init && echo "hello" > README.md && git add README.md && git commit -m "1st"
- Install Obsidian Git plugin.
- Install the
styles.cssfrom v4.zip (development branch of git-annotate in Obsidian) into
- Restart Obsidian
- Activate line author information (e.g. via Command Palette “Toggle line author information”.
- (optional) Deactivate line numbers, if they are being shown.
README.mdand look at the line gutters showing the line author information.
What I saw before v1.0:
What I see with v1.0:
- Operating system: Linux, Ubuntu
- Debug info:
Obsidian version: v1.0.0
Installer version: v1.0.0
Operating system: #144-Ubuntu SMP Tue Sep 20 11:00:04 UTC 2022 5.4.0-128-generic
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: light
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 1
Plugins enabled: 1
1: Obsidian Git v2.6.0
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.
I created and added a new CodeMirror6 gutter and before v1.0 it was shown correctly. However, with v1.0 it only renderes correctly if the line numbers are also rendered.
Otherwise it falsely has a too large margin on the left side, which makes it overlap with the actual editor content. It turns out, that by deactivating the
margin-left style on the
.cm-gutters fixes the spacing.
Could you a look into it? It feels like, the margin-left property shouldn’t be there in the first place, as it messes things up. Adding a simple CM6 gutter shouldn’t lead to this problem.
Interestingly, if one activates the line numbers - everything works fine and as intended. Deactivating the margin-left now even adds extra space on the left. In this perspective, it seems like having it turned off is the right thing.
What do the devs think about this? I would be nice, if adding a gutter consistently produced the correct results.
I don’t think, that my gutter element styling messes these things up, as the above happens with the container element and not the gutter elements themselves. I use these styles .