vslinko / obsidian-outliner

Work with your lists like in Workflowy or RoamResearch
MIT License
1.01k stars 60 forks source link

[BUG] Weird things going on with different types of lists #41

Closed I-Pch closed 3 years ago

I-Pch commented 3 years ago

Describe the bug (See screenshot below 😊 )

  1. I can't get the relationship lines in bulleted lists (for some reasons).
  2. When creating a numbered list, the very first number (1. First item) and the next one on the same level are the same color as the background, making them virtually invisible and past the first level, the indent is not rendered in preview.

(Sorry 😔 )

To Reproduce I don't really have steps to reproduce 😕 . I just created those lists (See screenshot below 😊 ) using either : * + Space Test 1 + Enter and then * + Tab + Test 2 + Enter

or

1. + Space + Test 1 + Enter 2. + Tab + Test 2 + Enter

Expected behavior Having nice lists like in the .gif in the Demo 😊 .

Screenshots

Obsidian Outliner

Desktop

Additional context I have no CSS snippets on the vault I tested the Outliner. It's a very new one so it's completely empty. I only have 4 other community plugins enabled and I use solely the default Obsidian Dark Theme. I use Tab to indent (Tab size 3), I fold the headings but not the indent.

I tried everything I could think of :

Nothing worked 😕 .

danieltomasz commented 3 years ago

I could reproduce bug with numbered list. In CSS bullet colour is defined the same as the background, then "bullets" are drawed, it works for * and - and spaces, it apparently treat numbered list as bulleted list too.

With your first problem, did you update the plugin to 1.0.18? There were problems with list indentation earlier, 1.0.18 kind of fixed it.

danieltomasz commented 3 years ago

Putting this code

.cm-s-obsidian span.cm-formatting-list-ol {
  color: var(--text-muted);
}

into line 520 of the file main.js in .obsidian/plugins/obsidian-outliner will solve the problem with formating temporarily, until the developer fixes this. You need to restart Obsidian for that to work.

(you need to put the css above after this fragment in code, which is causing all list to be in color of the backround)

.cm-s-obsidian span.cm-formatting-list {
  letter-spacing: 3px;
  color: var(--background-primary);
}
I-Pch commented 3 years ago

Yes, I'm on the last version of the plugin 😊

Obs-Outliner

The first trouble (with the bulleted lists) seems effectively more or less solved 😊 . Well, I've got the relationship lines now but the bullets are partially rendered (sorry) .

Obs-Outliner 3

As for the numbered list, I'll try 😊 ! Thanks 😊 !

Edit : Thank you very much @danieltomasz for the temporary solution for the numbered list 👍 😁 ! It worked 👍

vslinko commented 3 years ago

@I-Pch Thank you for your contribution! Issue with ordered lists should be fixed in https://github.com/vslinko/obsidian-outliner/releases/tag/1.0.21 (@danieltomasz thank you for the workaround)

What about your last screenshot — It looks like tabs/spaces issue. Such issue could happen if you use tabs for this list, but in Obisidian settings you have switched off "Use tabs" toggle. Please check your settings and tabs. If you think your settings are correct please send screenshot with your tabs/spaces settings and an archive with the file.

I-Pch commented 3 years ago

Hi @vslinko 👋 !

After a very very quick test this morning (after the update of the plugin) I can confirm that the problem with the ordered list is resolved on my side 😁 !

But yes, I agree, there's still something wrong with the unordered list 😕. Unfortunately I won't be able to test further today (sorry 😶 ) as I won't be home, with no access to my desktop 😕 .

As far as my settings go : I use tab to indent (tab size 3) and the smart indent list is also enabled.

I'll share a screenshot with these as soon as I can 😊 and probably a screen recording because the cursor was acting strangely while creating a billeted list...

I've got a question concerning the archive you asked though : what did you mean by that ? Do you want a compressed file of my test note ? Is that it ? 😇

Thank you very much for looking into this 👍 !

danieltomasz commented 3 years ago

Hi @I-Pch

I've got a question concerning the archive you asked though : what did you mean by that ? Do you want a compressed file of my test note ? Is that it ? innocent

I think that the archive may mean zip file, GitHub should allow for including zip files as attachments and adding it in the comments

I-Pch commented 3 years ago

I think that the archive may mean zip file, GitHub should allow for including zip files as attachments and adding it in the comments

Noted @danieltomasz 😊 ! Thank you 😊 !

I-Pch commented 3 years ago

So, here I'm 😊 :

Here are the settings I use :

Settings 1 Settings 2

And here are the tests I ran this morning after the update of the plugin to 1.0.25 😊 .

Concerning the Unordered lists the cursor seem to create more vertical space than it should, creating unwanted space between the very last item in the list and the previous indent one, as seen on the screenshot I already shared before :

Obs-Outliner 3

When increasing the indent (using Tab), the bullet doesn't render, as if the indent was not really recognize in the Editor (the asterisks * are not rendered as bullets past the first level).

If you look closely at this first screen recording, when adding a new line to the list, the cursor is "taller" than on a normal line and is kind of weirdly placed vertically (too "high" compared to the text on the line).

https://user-images.githubusercontent.com/77828085/113478128-2a883f00-9487-11eb-9ef5-f6b63f58b7ef.mp4

https://user-images.githubusercontent.com/77828085/113478145-455ab380-9487-11eb-8eb4-93e3215c98d9.mp4

Outliner 1-1 Outliner 2-1

And it seems to be the same with the Ordered lists (problem with the full rendering of list past the first level).

https://user-images.githubusercontent.com/77828085/113478238-ec3f4f80-9487-11eb-8040-a7c3c62b9117.mp4

Outliner 3-1 Outliner 3-2

And, on Ordered lists, I was also unable to increase the indent (using Tab) if the cursor is at the end of the line (but it works on Unordered lists). This might just be no supported yet though (I don't exactly know what changed in this update of the plugin 😊 )

https://user-images.githubusercontent.com/77828085/113478324-72f42c80-9488-11eb-96b8-f80c2484bfcb.mp4

https://user-images.githubusercontent.com/77828085/113478328-7a1b3a80-9488-11eb-9854-c310b731b1fc.mp4

Also, here is the .zip of the 2 notes I used to for the tests above 😊 : Outliner Test Notes.zip

Other than those small troubles, it seems to do its job 👍 ! Thank you very much for creating this very useful plugin 😁 👍 !

vslinko commented 3 years ago

@I-Pch Thank you for such detailed comment! It's amazing!

I investigated the case and found an issue. Problem is in how codemirror handles other-but-4-spaces-tabs. It handles it like you see — just like regular lines. So, I can't fix it without much effort.

But I added a notice in a status bar if you enabled better styles and configured non-4-spaced-tabs. See https://github.com/vslinko/obsidian-outliner/releases/tag/1.0.27

And, on Ordered lists, I was also unable to increase the indent (using Tab) if the cursor is at the end of the line (but it works on Unordered lists). This might just be no supported yet though (I don't exactly know what changed in this update of the plugin 😊 )

Yes, ordered lists are unsupported right now. Please follow #46

Closing this issue since I don't know what to do else. If you want you could add "3-spaces-tabs support" into plugin ideas.

I-Pch commented 3 years ago

Hi @vslinko 😊 !

Thank you for investing this 👍 !

Problem is in how codemirror handles other-but-4-spaces-tabs.

Well, if it's a problem with CodeMirror and there's no easy fix, don't bother 😉 . I've just reset the Tab size in my settings to its default value (4) and it works 😊 !

If you want you could add "3-spaces-tabs support" into plugin ideas.

Yes, it could be an enhancement for the future 😉 . I'll create a discussion a little bit later 😉 .

Closing this issue since I don't know what to do else.

I can confirm that there's nothing else you can do 😉 . As far as I'm concern, you've done your job 👍 and every problem I had has been solved 😁 .

Thank you 😁 👍 !!!

Edit: Created the discussion 💡 here https://github.com/vslinko/obsidian-outliner/discussions/60#discussion-3305728