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

Indention glitches for long sections #8

Open
Thejungleee opened this issue Jun 15, 2023 · 18 comments
Open

Indention glitches for long sections #8

Thejungleee opened this issue Jun 15, 2023 · 18 comments
Labels
bug Something isn't working

Comments

@Thejungleee
Copy link

Hi, first of all - thank you for this amazing plugin! It literally changed the way I use the Obsidian and amazing work!

I have noticed a bug when scrolling through the longer section of a heading. When given heading is very long (expands below the screen space), it starts glitching when the user is scrolling further (indention is changing). I'm uploading a video showing the problem here. Your help with resolving of this issue would be greatly appreciated.

PS. any news regarding the implementation of this feature into the Live Preview mode? Can't wait to see this happening!

Thanks :)

@svonjoi
Copy link
Owner

svonjoi commented Jun 29, 2023

hi, thanks you bro. the plugin is basically a set of patches and the margins are set on the viewport so the glitch you see its just the margins applying when viewport is changing :D

I added it to roadmap. It's really annoying

@svonjoi svonjoi added the enhancement New feature or request label Jun 29, 2023
@jerviscui
Copy link

jerviscui commented Oct 10, 2023

The class changes during scrolling and margin-left becomes 0.

image

scrolling

image

@ryran
Copy link

ryran commented Jan 22, 2024

This happens with all my docs. I know you're just one person... I wish the Obsidian team would implement this as a core feature.

@HippyCraig
Copy link

I am having the same issue, has this been addressed yet? if not can it be bumped up the list a bit :)

@jerviscui
Copy link

I am having the same issue, has this been addressed yet? if not can it be bumped up the list a bit :)

Instead of using the plugin, I modified the css

@BeverlyLaurelBLVD
Copy link

I am having the same issue, has this been addressed yet? if not can it be bumped up the list a bit :)

Instead of using the plugin, I modified the css

Interesting. How would I go about that? What do I need to put in?

@jerviscui
Copy link

@HippyCraig
Copy link

I was using the debug tools and noticed that the classes for headers and the following div tags are dynamicaly changed. So just before the larger text is changed I can see the margins set, but when you move past the threashold where everthing left aligns again, the classes are dynamicaly changed with no margins. Just thought this would help in troubleshooting.

@svonjoi
Copy link
Owner

svonjoi commented May 30, 2024

indentation in preview mode is a little bit optimized. If you want test it, u can download the latest release with BRAT, specifing version the 2.0.0 version

Also now there is support for editing mode, i for example do not use reading mode anymore

@HippyCraig
Copy link

I just downloaded the manifest and main and replaced them in my plugins directory overtop the ones there

It still has the same behavior in reading mode where if it’s a long entry under a heading half way down its starts to left align not honoring the indent anymore on that heading.

also is there a way to adjust the text under a heading to line up with the heading instead of indenting that as well

@svonjoi
Copy link
Owner

svonjoi commented May 30, 2024

It still has the same behavior in reading mode where if it’s a long entry under a heading half way down its starts to left align not honoring the indent anymore on that heading.

this bug still present in reading mode, but not in editing XD. the only thing was donde in reading is speed up a little bit the indent itself

also is there a way to adjust the text under a heading to line up with the heading instead of indenting that as well

in reading mode this kind of indent you can do with just a css. Maybe ill make a option in settings that will do this instead. Just didn't know somebody prefer this way of indent

@HippyCraig
Copy link

Ok cool I didn’t know if editing and reading mode behave the same as far as rendering div tags like I and @jerviscui mentioned.

I have tried a lot of different css and couldn’t get that to work at all this plugin has made it a lot easier

Also thanks for considering adding the extra indent. That will be exciting.

@svonjoi
Copy link
Owner

svonjoi commented May 30, 2024

Ok cool I didn’t know if editing and reading mode behave the same as far as rendering div tags like I and @jerviscui mentioned.

also they behave completely different. editing mode is embedded codemirror editor with batteries, while reading mode is purely obsidian feature where all stuff is rendered into "sections". In reading mode its easy to apply any styles. The problem is that the content under this "sections" lacks of anything that points out about which heading is come after. So the way this plugin identify the heading of the content is adding classes to the content sections so you can also set your own css. This classes are added on-the-fly based on current viewport, so if the content under a heading is huge, it losses the last heading from the viewport and the plugin eats shit as this issue point out. The reason why is done this way is that in editing mode the content lacks of this information as well, so we cannot "transfer" this information in rendering of reading view, as other plugin does. But with editing mode support i think it is possible so when it will be done i'll give it a try and maybe no more on-the-fly shit will be needed

also, meanwhile you can solve current issue using live-preview if you dont care about the other bugs on editing mode that are not solved yet

@HippyCraig
Copy link

Thanks for the info, I use two modes, edit and read. I only use the edit mode to make modifications to the content. everthing esle I use my notes for is in reading mode. Hopefully you can find a solution to this, if you need me to test anything let me know

@svonjoi
Copy link
Owner

svonjoi commented May 30, 2024

I have tried a lot of different css and couldn’t get that to work at all

did u tried this css snippet? is working on both modes well, i just found out

@HippyCraig
Copy link

I tried and the css didn’t work for me. I even turned off and back on your plugin but it still didn’t go.

@svonjoi
Copy link
Owner

svonjoi commented May 31, 2024

try disable another snippets and plugins

@rodrigoaraujoti
Copy link

Maybe it's been caused after spellcheck occurrences.
Try to add this words to dictionary and check if it fix your notes.

I open another issue detailing it: #21

@svonjoi svonjoi added bug Something isn't working and removed enhancement New feature or request labels Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants