Jay, currently, I see (on web app) that
# Heading 1
Text under Heading 1
## Heading 2
Text under Heading 2
is not equivalent to
# Heading 1
Text under Heading 1
## Heading 2
Text under Heading 2
because the breadcrumb/path of ## Heading 2
is Root > ## Heading 2
instead of Root > # Heading 1 > ## Heading 2
. And when I move some item to a heading, e.g. move Moved item
to # Heading 1
, it doesn’t go below Text under Heading 2
nor below Text under Heading 1
, but goes directly to right below # Heading 1
with indentation, like this:
# Heading 1
Moved item
Text under Heading 1
## Heading 2
Text under Heading 2
Inspecting the exported JSON, I see clearly that # Heading 1
has only one child, Moved item
, while all other items, like Text under Heading 1
and ## Heading 2
, are still children of the Root
item.
==> So, the “inferred hierarchy” is just a “fake” hierarchy! Currently, it seems just “cheat” in folding algorithm 🫣!
I think headings should have real hierarchy, and the unindented display of headings’ children are just a matter of (default) style, like studgeek suggested. In that way, their behavior will be consistent, unlike the current status of inconsistency (when copy, cut, move, in breadcrumb, in display style, etc.).
To be consistent, all headings should have highest order in the hierarchy, i.e. headings cannot be children of non-heading items.
- Let’s define order with a natural number N, with #1 is the highest (visible) order, actually Root = #0 is the highest, but invisible. Heading 1 = #1,… heading 6 = #6, non-heading items = #7+.
- When editing, adding a heading #N (order N) will puts it under the heading #M for M closest to N such that N > M.
- When moving a heading #N under an item iM of order M, don’t simply set #N a child of iM, but must check if N > M. If N <= M, then #N must be reduced order (increased value) to #{M+1}, i.e. it can be reduced to non-heading (#7+) when moved under a non-heading item.
- When
Tab
/Shift Tab
, the heading level can be easily adjusted, even no indentation change appears (in default style). With Shift Tab
, we can promote a non-heading to H6 right from the left margin (no indent in default style).
- Then,
Ctrl Shift H
is used for quickly set heading at a right level, i.e. #{M+1} under the last heading #M above, instead of H1.
Currently, a heading when moved under a bullet item still keeps its heading level. This is very inconsistent, not only about logic, but also about visual appearance!
Before Alt-M to move Heading under plain text:
After Alt-M to move Heading under plain text:
Moreover, I think that there should be some indicator for the level of heading, which only shown at mouse/caret focus, to make it clear. Currently, even with the option “Show markdown formatting”, there’s no way to know exactly which level a heading is. Some thing like this: