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

[Feature Request] Table Of Contents for easier skimming #778

Closed
Darkle opened this issue Nov 13, 2022 · 2 comments · Fixed by #818
Closed

[Feature Request] Table Of Contents for easier skimming #778

Darkle opened this issue Nov 13, 2022 · 2 comments · Fixed by #818
Labels
good first issue Tasks that are good for newcomers to the codebase help wanted Tasks that are up for grabs!

Comments

@Darkle
Copy link

Darkle commented Nov 13, 2022

When browsing the https://fsharp.github.io/fsharp-core-docs/ docs I find it takes a while to scroll through a page to find what I want. For example the Array api page is fairly large and can be laborious to scroll through to find what you want (especially if you are new to F# and dont know what to use yet)

I think it would be a good idea to have a Table Of Contents at the top of api pages which link to their respective api section anchor, so you can more easily skim through to see what you want/need without having to scroll through a long page.

I created a userscript here to do what i want FWIW: https://greasyfork.org/en/scripts/454708-fsharp-library-docs-easy-skim-toc

Here are some screenshots of what it could look like:

script-ss-1

Showing summaries:

script-ss-2

The "Show Summaries" button would be an optional "nice to have" i guess; this feature request is mostly about having a Table Of Contents.

@baronfel baronfel added help wanted Tasks that are up for grabs! good first issue Tasks that are good for newcomers to the codebase labels Dec 27, 2022
@baronfel
Copy link
Collaborator

This would be good to have - multiple people have requested this. In an ideal world the ToC would be collapsible as well.

@nhirschey
Copy link
Collaborator

I think a fairly simple way to implement this would be to wrap the description in a <details> tag, using the function or member summary as the html <summary>. Here's a gif showing a quick and dirty result via me manually editing the array page using brower tools.

I prefer the "details" option because then you don't have to scroll back and forth between a large table of contents at the top of the page and the content at the bottom bottom of the page. <details> allows you to scroll through the documentation, expanding and collapsing the function description as needed.

details

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Tasks that are good for newcomers to the codebase help wanted Tasks that are up for grabs!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants