Can Supernotes not handle ordered lists with indentations?

I was trying to create an ordered list that has indentations and when I noticed that when I indent, the count doesn’t start over. And when I was done editing I noticed that the list didn’t have any indentations. It works with unordered lists, but how does this not work with ordered lists?

Also, for ordered lists, if one of the list’s text is long and wraps, the text on the new line doesn’t start at the same indentation level of the first line. It wraps underneath the number. But this works in unordered lists.

Hi @marlonr,

Yes we do support indented ordered lists, try and copy-paste the markdown below:

1. An item
    1. A subitem
    2. Another subitem
          1. A fine detail about (b)
          2. Another fine detail
2. Another item
    1.  Yet another subitem 
    2. You get it now, I imagine
        1. A fine detail about (b)
        2. Another fine detail
3. Final item

It should render as the following in display mode:

This is how it pastes in Supernotes

Ah strange that it’s pasted without line breaks. Feel free to join the original card here and view the markdown for yourself.

Checking it out now

Shouldn’t I be able to create an indented list like so:

  1. type “1.” followed by a space and then the text for that first item
  2. Then hit return which would create "2. " on the next line
  3. Then press tab to indent – which should turn the number into a "1. " from "2. "

…and so on?

1 Like

I see what you mean now, thanks for clarifying. You’re right this behaviour isn’t ideal with indentation as the number doesn’t reset to 1. causing it to break in display mode. I’ve made a note to fix / improve this behaviour in an upcoming minor release.

And with regards to wrapping, we’ve intentionally made the numbers in an ordered list be inline rather than maintaining an indentation level for the whole list item. The reason for this is that the numbers have variable widths compared to unordered lists. As well as allowing for a better viewing experience for lists with large numbers with our card format e.g. a list of years.

A shame that this fix did not show up in 3.0

1 Like

Good news! We’ve finally addressed this in Supernotes 3.1, so now ordered lists will be automatically re-numbered if you indent/outdent lines. It should also work if you move lines around using option + arrow keys.

1 Like

It doesn’t work for me …

this:

renders like this:

1 Like

Yeah, unfortunately it won’t do anything for cards you’ve already made, but if you try de-denting that “2.” line with shift+tab and then re-indenting it with tab, it should automatically renumber everything correctly, at which point it will render properly. And then for any composition you do in the future it should do the right thing the first time around, so you won’t have to do this dedent/redent dance.

It was a new card.
I tried the de-dent/indent step and that worked.

Hmm. That’s strange. Do you remember the order you created this list in? In general, if you are in a list and indent it to make a sublist it should automatically re-number itself to start over from 1, so you shouldn’t really end up in the situation like the above under normal usage scenarios. But it’s entirely possible I’ve overlooked something so do let me know how if you can reproduce.

No matter what I do when creating a list on mobile, 'll always end up in the scenario described by @isaiur

Same on web, where there is the presumably related issue that the following steps reproducably lead to an immediate vanishing of a newly created card

  1. Create a new card
  2. Add line 1. Asdf
  3. Press enter (a new line with leading 2. appears)
  4. Add some text
  5. Press enter

The current card is then removed from the noteboard and nowhere to be found.

The order was:

  • I started with 1. and wrote the text
  • Then I hit enter
  • The “2.” automatically showed up and I hit tab, inserted text and hit enter
  • When “5” appeared I hit shift and tab to de-dent … but with hitting shift and tab the parent got highlighted too

Ah yes, indeed. It looks like having the list item be the very last content in the card (with no more line breaks or whitespace or anything afterwards) is breaking the auto-list logic with the somewhat unfortunate side-effect of breaking editor focus as well. Whoops.

Thanks for helping me debug this everyone, will get it fixed in 3.1.2.

3 Likes

For me, indented items in numbered lists require 4 spaces of indentation, or they will be rendered as a top level item.

At the same time, bullet-point list items require only 2 leading items. On mobile, long-pressing the arrow button in the tool bar also adds 2 spaces. This makes me think this is actually a bug.

Yeah, we’ve considered removing the 2-space indentation option entirely, as it seems to cause more issues than it is worth.

Different indentation types has also made it much harder to implement any sort of list guides as well.

I have also noticed the 4 space requirement for nested indentation, and thought it might be a bug :thinking: Is it intentional then? It’s not the end of the world, but kind of counter intuitive from my experience with other markdown editors

1 Like

So we’ve come up with a potential solution to the indentation issue which we’d like to run by you and hear your thoughts on @fuzzy.beach, @isaiur, @freisatz and @marlonr.

Supporting three different types of indentation (2 spaces, 4 spaces and tabs) is prone to errors and also makes collaboration difficult, since one of you might prefer using 4 spaces and the other tabs.

Our proposed solution is that typing two spaces at the beginning of the line will automatically be replaced by a tab character. This means that you can either press space twice or tab, to indent a line (when at the start of the line). This will also make 4-spaces obsolete.

There may be some side effects where previous cards, might need to be adjusted if you edit them again, but we will try to minimise this. What do you think?