openshift-evangelists / workshopper

Workshop content rendering tool
63 stars 41 forks source link

Add scroll to "table of contents" #48

Closed jorgemoralespou closed 6 years ago

jorgemoralespou commented 6 years ago

In order to look into following modules, I need to scroll current to the end, so that table of contents also scrolls.

image

The database lab is a good example as it's long. Also, when you select it, the table of contents showing current lab can be out of the "viewport".

image

marekjelen commented 6 years ago

Updated, the menu is statically placed at the top.

jorgemoralespou commented 6 years ago

@marekjelen Looks good, but this is what I was thinking: https://kiosk-dot-codelabs-site.appspot.com/codelabs/firebase-monetization-tips/index.html?index=..%2F..%2Findex#0

marekjelen commented 6 years ago

What is the benefit? The link has client side rendering, which we do not. We reload the whole page.

Make your browser window small in height. When I am on the last item visible and click next, then the selected item does not get scrolled into the view and is hidden. It's possible to have 100% height scrollable area a and have some logic to always keep the current item in view, but not sure it's worth the effort.

Or let me ask differently, what do you want to achieve?

jorgemoralespou commented 6 years ago

As the title of the issue says: "Add scroll to table of contents" and when I say Scroll, I meant scrollbar.

marekjelen commented 6 years ago

Closing as it's too much work with no real benefit.

If there is some easy solution or somebody wants to contribute, I will be happy to accept.