React-styleguidist: Highlight currently selected page on sidebar

Created on 25 Oct 2018  路  7Comments  路  Source: styleguidist/react-styleguidist

The problem

On styleguides with a lot of content, it easy to get lost on where you were on the sidebar.

Proposed solution

A minimum useful solution would be highlighting (e.g. using background color) the currently selected page.

Alternative solutions

Related solutions would be

  • Supporting collapsible sections to enable better browsing of the main sections only.
  • Scrolling the sidebar to right position when user arrives to the page using direct link.
enhancement help wanted

Most helpful comment

Feel free to send a pull request for that! ;-)

All 7 comments

Feel free to send a pull request for that! ;-)

@jkarttunen @sapegin according to this pull request https://github.com/styleguidist/react-styleguidist/pull/1195 it should be highlighting the sidebar. Did this merged pull request get removed at some point?

There's something funky going on on line https://github.com/styleguidist/react-styleguidist/blob/master/src/client/rsg-components/ComponentsList/ComponentsListRenderer.js#L51. Probably the link/href format has changed since then? You can temporarily fix this bit by overwriting the ComponentsListRenderer and changing this bit of the functionality.

are you guys using pagePerSection? it doesn't seem to work with that option properly

@nathanmarks Yep, that was it.

Closing as a duplicate of #1375

Was this page helpful?
0 / 5 - 0 ratings

Related issues

crobinson42 picture crobinson42  路  3Comments

eduardoinnorway picture eduardoinnorway  路  3Comments

dzimmerman902 picture dzimmerman902  路  3Comments

sapegin picture sapegin  路  3Comments

gscottolson picture gscottolson  路  3Comments