pub-dev icon indicating copy to clipboard operation
pub-dev copied to clipboard

Add "Table of Content" to the Readme tab

Open jayoung-lee opened this issue 4 years ago • 3 comments

In a recent user study, participants searched within a package's documentation to find a specific feature (e.g., Ctrl+F to search “highlight” within the documentation of “markdown” package). They usually did this when they failed to find useful information after quickly scanning the documentation. They also tried multiple keywords to make sure that they didn't miss any information (e.g., “highlight”, “syntax”, “code”). It showed that search was an easy way to find information from large data, but it could be difficult to find a good keyword.

But when the feature of interest was listed under “Features” section, users didn’t have to search again. It suggests that a standardized Readme format with better navigation UI (e.g., table of contents) might save some time for participants.

We can consider adding table of contents that's similar to the one on Go's package site:

image

jayoung-lee avatar Dec 22 '20 02:12 jayoung-lee

We probably want this in a side-bar.

On mobile this could be omitted or dragged in from the side.

sigurdm avatar Jun 16 '22 09:06 sigurdm

Github does this as a drop-down menu: image We could consider something similar

sigurdm avatar Feb 29 '24 10:02 sigurdm

Before it gets (hopefully) implemented into pub itself, here's a Firefox extension that achieves the same thing.

wrbl606 avatar Jul 30 '24 18:07 wrbl606