Outline formatting is misleading/misaligned when only some nodes have children (heading indentation)

Feature request? why? this is a regression

4 Likes

We appreciate the feedback but we don’t see it a bug.

And I’m only 5’8"

I don’t see myself as short :neutral_face:

3 Likes

This is definitely a bug, not a feature. But if this is the Obsidian developers’ quirky way to prioritize, then I guess, so be it.

3 Likes

Commenting here as I made a post on the same issue, but I also noted that the File Explorer has the same issue.

1 Like

This is seriously confusing. And at least on Mac and iOS, it also goes against the system standard (see how Finder and Files does it). (EDIT, 2023-02-27: Actually, I think Files — and maybe iOS — just doesn’t use expanding folders.)

Here’s a link to Ruq’s closed post on the issue:

2 Likes

today I found a article shows a way to use only css to achieve the good align tree view:

maybe someone good at css can work out a custom css sniplet with it, to give us peace of mind before this bug been fixed by obsidian team.

The problem seems to be fixed in note bodies, but not in the file explorer.

Here’s the snippet I was using. I’ve been meaning to try to adapt it to the file explorer, but maybe someone else (preferably the developers) will get to it first.

/* Move folding arrows out of the flow so items on the same level have the same indentation. */
/* Source: sailKite @ https://discord.com/channels/686053708261228577/702656734631821413/1034243460930207774 */

.tree-item-inner:first-child {
    position: relative;
    padding-left: calc(2 * var(--size-2-3));
}
.tree-item-inner:first-child::before {
    content: "";
    position: absolute;
    height: calc(100% + (2 * var(--size-4-1)) + 1px);
    left: 0px;
    top: calc(-1 * var(--size-4-1) - 1px);
    width: 2px;
    border-left: var(--nav-indentation-guide-width) solid var(--nav-indentation-guide-color);
}
.is-collapsed + .tree-item .tree-item-inner:first-child::before,
:is(.is-collapsed + .tree-item) ~ .tree-item .tree-item-inner:first-child::before {
    content: none;
}

It goes against how the file explorer does it on Windows, too.

[Merged from “Bug reports”/“Wrong indent for same level titles in outline view”]

Steps to reproduce

Type

## section-1
### sub-section
## section-2
## section-3
### sub-section

Expected result

Same level title should have the same indent

Actual result

image
image

Environment

  • Operating system: Win11 Home Edition
  • Debug info:
SYSTEM INFO:
	Obsidian version: v1.1.9
	Installer version: v0.15.8
	Operating system: Windows 10 Home China 10.0.22000
	Login status: not logged in
	Insider build toggle: off
	Live preview: on
	Legacy editor: off
	Base theme: dark
	Community theme: none
	Snippets enabled: 0
	Restricted mode: off
1 Like

Are there any plans to change this in future updates, or does this post’s relocation to FR imply it was intentional and here to stay?

In my opinion, the outline has lost some of its value as a quick reference.

In theory, left-justifying the text of #H1 with the dropdown arrow of #H2 seems reasonable as you’re aligning the first character of each row, but that discounts the effects of visual perception. The text chunks are perceptually grouped because they share similar qualities (shape, spacing, color, etc) and those groups are interpreted as vertical lines… lines which are no longer straight, which doesn’t accurately convey the hierarchy.

2 Likes

The devs use a narrow definition of “bug”. There’s no guarantee this will be addressed, or addressed soon, but if they rejected the idea it would be closed, archived, or moved to Help.

+1 for confusing outline.

Yes, I would like for this outline layout to be less confusing.

This has been hurting my brain recently. I made a mockup to show a potential solution:

I really hope this can be fixed BEFORE Obsidian Publish is updated to match the new v1.0 default theme - I foresee this being very confusing to my readers.


Current situation:

Problems with current situation:

  • Ccc (h3) should be on same level as Eee, Ggg, and Iii, but instead, Ccc’s arrow icon is aligned with those headings, which IMO is very visually confusing:

  • Slicing it another way: Bbb, Eee, Fff, Ggg, Hhh, and Iii are all almost aligned, even though they are a mix of h2 and h3. Meanwhile, Ccc, another h3, is way out on its own (and it’s almost aligned with Ddd, an h4…):

Solution:

  • Move the arrow icon to the right side, make the indent levels wider overall, and align them by their first character:

3 Likes

I was just about to post about this issue.
As others have said, it is terribly confusing.

Yes, please fix this before Feb 23, so the same bug doesn’t get incorporated into the new Publish theme. :pray:

1 Like

I’d also love to see this changed - it’s very confusing.

Great suggested fix.

Use case or problem

I recently started to use Obsidian as a university note-taking tool. What I always did with other tools was to use the index of each document as a unique source of truth, and rely on its hierarchical structure to describe its content.

My mental representation of the documents is often related to this structure. Just by looking at the index, I can quickly understand the content and quickly find information. This also helps me indirectly with memorization.

I’m struggling to have the same experience with obsidian since I found the current index Layout very confusing.

Up to now, if a heading is composed of some sub-headings, a small arrow appears on its left to represent if these sub-headings are currently hidden or visible in the index.

This arrow forces the text to be shifted to the right, making the parent heading aligned with the sub-headings. Visually, this introduces a lot of friction when iItry to scan the index.

Here’s a visual example of obsidian compared to Microsoft Word

Word image

Obsidian image

Here we can see how “Appendix A” is shifted, making it seems like a sub-heading of “Conclusion”, at the same level as “Objectives, Approach…”.

Proposed solution

Take the same approach as Microsoft Word, and align the headings.

3 Likes