guopenghui / obsidian-quiet-outline

Improving experience of outline in Obsidian
MIT License
295 stars 17 forks source link

[Feature request] Remember collapsed heading state #117

Open eblanshey opened 1 year ago

eblanshey commented 1 year ago

I don't use the auto-expand feature, and keep all headings expanded by default. Some notes have headings that I don't need to look at, such as "Archive" sections which I usually collapse. When I switch to another page and come back, it'd be really nice to reload the previous expanded header state.

Thank you for the plugin!

smkbhd2018 commented 1 year ago

I am really with you man, Having option to remember what are expanded and what are collapsed for each page is really helpful that keeps me ton of time,

now without this feature each time I switch between notes I need to manually fold and unfold some heading to get only headings I need to see in each file, this is really frustrating

by the way thank you for your great plugin🥳🥳

jiewangjs commented 5 months ago

Is this functionality implemented yet? On the plugin readme page, it seems to claim this function is already built-in, but after several try, I feel it is not there yet. I am a little confused.

guopenghui commented 5 months ago

Is this functionality implemented yet? On the plugin readme page, it seems to claim this function is already built-in, but after several try, I feel it is not there yet. I am a little confused.

State will be memorized when switching between two opened notes.

So if you close one then reopen it, state is already deleted.

jiewangjs commented 5 months ago

Thanks for the clarification, Guo! My previous move including reopen the app, now I see why it is not working as what I expected. BTW, Since now it can remember states between different notes, can it be stored in some middleware file and auto imported by the reloaded app note to recover its previous state? Seems like a feasible way to me.

guopenghui commented 5 months ago

Thanks for the clarification, Guo! My previous move including reopen the app, now I see why it is not working as what I expected. BTW, Since now it can remember states between different notes, can it be stored in some middleware file and auto imported by the reloaded app note to recover its previous state? Seems like a feasible way to me.

When you open a new note, or reload app, obsidian will show show the note from top. If quiet-outline resumes last expand state, this will be inconsistent with note position, which is a good implementation. So the core problem is obsidian itself doesn't remember note read/edit position.

eblanshey commented 5 months ago

If quiet-outline resumes last expand state, this will be inconsistent with note position

It needs to resume last expanded state but not necessarily the last highlighted note (current position.)

Anyhow, I do use a plugin to restore the last open position in the note too :) Sounds like a good feature to integrate here, since it'll match the highlighted note, as well.