Vuepress: Feature Request: Highlight current region in sidebar

Created on 24 Apr 2018  路  7Comments  路  Source: vuejs/vuepress

This is a great feature I miss from gitbook. It's also on vuejs.org.

Example: try to scroll in this page: https://vue-loader.vuejs.org/guide/pre-processors.html. No updates on sidebar.

image

contribution welcome feature request

Most helpful comment

I'd love to grab this one 馃槃.

All 7 comments

I'd love to grab this one 馃槃.

Do you have any suggestions for where this should live? I was thinking about using a scroll event in Layout.vue to change the active class. It would be similar to the approach that vuejs.org uses.

@ryanriv yeah, it can probably live in Layout.vue. Although don't use direct DOM manipulation - you just need to update the hash and the classes will update automatically.

It would be better to add throttle control for the scroll event.

Thanks for the great suggestions! I have some initial work done on this here #272

@ryanriv Thanks for the great work again. code merged!

@ryanriv Thanks again for your work 馃憤 This is the only missing feature that kept me from jumping on the train :p

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AleksejDix picture AleksejDix  路  3Comments

shaodahong picture shaodahong  路  3Comments

genedronek picture genedronek  路  3Comments

kid1412621 picture kid1412621  路  3Comments

AMontagu picture AMontagu  路  3Comments