Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-Create a "Table of Content" #67

Open
Daynex opened this issue Apr 1, 2021 · 7 comments
Open

Auto-Create a "Table of Content" #67

Daynex opened this issue Apr 1, 2021 · 7 comments
Labels
Feature Request Notebook UI/ UX User interface or User Experience related

Comments

@Daynex
Copy link

Daynex commented Apr 1, 2021

Is your feature request related to a problem? Please describe.
Longer Notebooks often have many different sections. Getting an overview and navigating around such notebooks can often be time consuming and unpleasant.

Describe the solution you'd like
GitHub recently launched "Table of Contents", which are automatically generated based on the markdown of README files. It would be fantastic to have this feature in the Observable notebooks to get a better first overview as well as to allow to move along the content fast. Maybe the table of content tab could even stick around as one scrolls, kind of like in Google Suite.

Describe alternatives you've considered
Maybe internal linking would be possible. So basically that everyone can build their own table of content?

Additional context

ezgif-6-cb47ee83abe3

EDITED

  • 02/04/2021 - Added a GIF for clarification.
@jrus
Copy link

jrus commented Apr 1, 2021

Current workaround: Use @mbostock/toc or a similar in-notebook table of contents generator.

@mootari
Copy link
Member

mootari commented Apr 1, 2021

@Daynex A table of contents is usually displayed inline, at the top of a document. However, you appear to be asking for a navigation element outside of the notebook body. Can you please add a screenshot of the feature to the description, so that this request can be understood without reviewing the tweet?

@j-f1
Copy link

j-f1 commented Apr 1, 2021

Maybe as another “tab” in the new navigation on next.observablehq.com? that way it could be easily accessible without taking up space.

@Daynex
Copy link
Author

Daynex commented Apr 2, 2021

@Daynex A table of contents is usually displayed inline, at the top of a document. However, you appear to be asking for a navigation element outside of the notebook body. Can you please add a screenshot of the feature to the description, so that this request can be understood without reviewing the tweet?

Than you for the point, @mootari. I added a GIF to the description. Does it clarify?

@CobusT CobusT added Feature Request Notebook UI/ UX User interface or User Experience related labels Aug 3, 2021
@izzues
Copy link

izzues commented Sep 10, 2021

I'd also love to see this feature!

The existing minimap could be augmented to support basic filtering by cell type, then the user could set it to display Markdown titles only. It could also nest titles automatically, similar to the GIF above.

@scarlettlee
Copy link

Is it possible to have a Table of Contents (ToC) on the left of the page?

I have seen the tool to make toc in the page.
import {toc} from "@nebrius/indented-toc"

But what if I want a toc docked on the left of the page which would not move with mouse?

Thanks.
Scarlett

@hellonearthis
Copy link

I wonder if this could be expanded into a custom docking zone. It could be used for TOC or other UI functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Notebook UI/ UX User interface or User Experience related
Projects
None yet
Development

No branches or pull requests

8 participants