Skip to content
This repository has been archived by the owner on May 20, 2020. It is now read-only.

Top Level Collapsible Tree View of a Crate (and standard library) #168

Open
echochamber opened this issue Sep 5, 2017 · 5 comments
Open

Comments

@echochamber
Copy link

echochamber commented Sep 5, 2017

I would really like for a better table of contents to exist in rustdoc. A collapsible tree-view navigation, where

  • non-leaf nodes are modules
  • leaf nodes are either a struct, trait, or macro.

I see there being a few stories around navigating stdlib/crate docs and api references:

  • I am searching for docs on a specific type I already know. (use search feature)
  • I am not sure what the exact type I am looking for is, but I have a general idea. ex: I need a re-sizable, searchable data structure. (current navigation works for this).
  • I want a top level view to understand the structure of this crate. Maybe to evaluate it. Maybe to build my intuition on it. (this is the story I think this suggestion helps most for).
@steveklabnik
Copy link
Owner

Are there any comparable things that exist now that I could check out?

@mgattozzi
Copy link
Contributor

Maybe something like scribble which is Racket's documentation tool?

@echochamber
Copy link
Author

@steveklabnik Sorry, didn't have a real world example in mind when I made the suggestion. A little googling and I found this which is more or less what I was envisioning.

Not sure if it would make for a better experience to have it start collapsed or not, but I definitely think it could use a collapse/expand all button similar to what rustdoc currently provides for collapsing/expanding the methods that exist for a type.

@mgattozzi
Copy link
Contributor

Given the fact we already have a sidebar with modules and types in it on current Rustdoc I see no reason we couldn't flesh it out a bit on the left to be a bit more tree like.

@echochamber
Copy link
Author

@mgattozzi Good idea and it makes sense to me.

Updating the top post to include some user stories.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants