Plugin for Bullet Threading

Here it is:
guideline-1

4 Likes

Guess what,
it was a nice challenge.

list-threading list-highlight list-both

I also provide an alternative highlight version with different colors per indentation level. (I find it rather intrusive though, so would either further reduce colors alpha or keep it off edit: I reduced the alpha).

Notes:

  • I’m using the default theme, I haven’t tried with any other themes. It’s up to you if you want to make it work with different styles (edit: seems to work fine with Minimal theme at least);
  • I tried my best to make it work with different font sizes in the default theme though;
  • I only made styles for 6 indentation levels. I wasn’t happy to invent more detailed yet still sequential and relatively distinct gradient. And when you go beyond that - it is likely a time to break down the list into heading sections or files anyway;
  • Turns out using spaces instead of tabs for indentation is kind of broken and most likely impossible to fix due to bad HTML produced by the editor. So, only compatible with tabs, or you have to edit offset variables according to indentation you use.

Until I have a proper place (and time) to share my Obsidian stuff, these CSS snippets will live in a Gist there, so people will always see the most up to date version in case I made any changes:

16 Likes

Ok wow. U definitely aced it. This is great and I love it.

1 Like

I accidentally used a variable from another snippet, causing some issue for those only using mine. Now fixed in the gist above, along with few small other things.

I don’t know how to align threading lines to bullet points/checkboxes both when list item contains tall content such as images and when it contains long wrapped text (or even both). I keep the current behavior, as least bad default in my opinion, but I added calculations for those who might prefer it the other way around - would require swapping the order of commented lines in 3 places.

Hi, love how you’ve managed to integrate bullet threading into Obsidian! Just had a question re: your latest CSS for the same. Could you please elaborate on “the swapping of commented lines in 3 places”?

I mostly work with long-form text and if any of the bulleted points are longer than a line then the threads are not aligned with the bullet, instead converging at the base of the last line of the indented text. Have attached a picture showcasing the same (As you can see the first 3 points align perfectly, the problem only arises with the 4th and 5th blocks, both being longer than a single line).

Cheers

I will likely make the default behavior to prioritize long text – I also realize now that long text is way more common.

I may also try to figure how to make customization easier, probably with Style Settings plugin.

How to do this modification before I get to it:

  • Find 3 places marked with following comments:
      /* priority to wrapped text */
      ... foo ...
      /* priority to images */
      ... bar ...
    
  • Make it look like this (what comes last - wins):
      /* priority to images */
      ... bar ...
      /* priority to wrapped text */
      ... foo ...
    
    or like this:
      /* priority to wrapped text */
      ... foo ...
    
1 Like

Works perfectly now, thanks a ton!

This is beautifully done. thanks.

But I’m running into an issue where points with multiple lines leave a blank line at the top:

image

I tried the fix you provided NKS but it didn’t help in this case. I’ve also tried changing themes and disabling all my snippets other than the ones you provided.

Any idea what’s going on?

edit: see recent post

This is beautifully done. thanks.

But I’m running into an issue where points with multiple lines leave a blank line at the top:

image

I tried the fix you provided NKS but it didn’t help in this case. I’ve also tried changing themes and disabling all my snippets other than the ones you provided.

Any idea what’s going on?

edit: see recent post

Huh. I switched off all plugins and snippets and the bug remains.

BUT this “bug” actually was caused by my use of a single long word “ssssssssssssssssssssssssssssssssssssssssssssss”

It seems to be causing a line skip, which I’ll be honest is kind of weird default behavior. Like, why does it start wrapping subsequent lines but not the first line? Seems like an issue with Obsidian, but I’m not going to take it up with anyone since I don’t have a use case for it.

If I break that line up as if it’s words, it looks fine.