Table of content / outline navigation on the side

Hey this is awesome. Got back here after a while and really happy that it’s getting alot of traction. It’s also tagged as “Next Release”! :smiley:
By the way in regards to your demo, currently I am on the stable release: 0.47.5
Do I need to download the “pre-release” version to test this out?
Cheers!

Yes, for some reason the table of contents feature is not yet included in 0.47.5. If you’re curious, it’s definitely worth checking out at least the current beta version (0.47.21-beta).
I think the table of contents is really nicely implemented.
According to my personal taste I’ve added some custom CSS because I like smooth scrolling, want the icon lines to be a little bigger, have a larger reactive area and want to have the top link highlighted.

/* Table of Contents - Larger icon */
.editorWrapper .editor .tableOfContents .inner {
    width: 26px;
    gap: 10px 0px;
}

/* Table of Contents - Larger reactive area on top and on bottom of the icon */
.editorWrapper .editor .tableOfContents {
    padding: 50px 16px 50px 16px;
}

/* Table of Contents - Highlight top link in modal window and right sidebar */
.menuTableOfContents #item-title,
#sidebarRight #item-title .label {
    font-weight: bold;
}

/* Table of Contents - Smooth scrolling */
html.bodyMain,
#popupPage-innerWrap {
    scroll-behavior: smooth;
}

Thanks for the CSS.

Do you thin smooth scrolling is something Anytype can implement into the TOC to happen by default, or is it too complicated on their end? I’m don’t know code.

Actually, I have no idea why they don’t seem to like smooth scrolling. This is why I love custom CSS in Antytype!
Notion, Affine, Capacities (in some way) have smooth scrolling in their TOC. Maybe it’s coming for Anytype too one day.

However, as I can see, the downside of smooth scrolling via CSS is that currently the scroll speed when selecting or moving objects on large pages with the mouse is negatively affected (the page scrolls too slow when the mouse cursor approaches the edge of the page).

I must say, I like the vanilla table of content, well done!

@visualNotes Oh my gosh, I noticed this and it was driving me crazy with how slow it was going!

Thank you for calling this out! You are a true bug detective :saluting_face: