docs.page icon indicating copy to clipboard operation
docs.page copied to clipboard

incorrect active item in TOC sidebar menu & last item's content hidden

Open dylancom opened this issue 2 years ago • 4 comments

If I click on an item in the Table of Contents menu, it will "light up" 1 items before, until you scroll a little bit further. It should be active directly after clicking on an item in the menu.

Example: https://docs.page/invertase/react-native-google-ads Click on for e.g. "Configure outbound requests" and the previous item "Setting up Google AdMob" will be highlighted instead. Schermafbeelding 2022-01-10 om 11 46 38

dylancom avatar Jan 10 '22 10:01 dylancom

Yeah the scroll-spy implementation isn't great now. It focuses on the ID which is tied to a heading vs the content. We're currently undergoing a rework of the rendering aspect and ui, and this is something we're going to sort by wrapping sections of content and using the intersection observer.

Ehesp avatar Jan 10 '22 11:01 Ehesp

@dylancom We've just made v2 of docs.page live (lots of general improvements / styling & UI changes) - from what I can tell this seems to be behaving better now - please give it a try :)

Salakar avatar Mar 09 '22 17:03 Salakar

A little better - still not perfect but will look to improve this in future

cabljac avatar Mar 10 '22 09:03 cabljac

@Salakar hmm, not sure if this introduced another bug? The last item, banner ads, are not shown at all: https://docs.page/invertase/react-native-google-mobile-ads/displaying-ads#banner-ads While it does exist within the html...

dylancom avatar Mar 10 '22 17:03 dylancom

Going to close this one. The item will only "light up" if the item has passed the top of the page.

When clicking one on the page, it does correctly activate, however those at the bottom won't since the content never gets to the top. Not sure what to do about this really.

Ehesp avatar Jan 10 '23 10:01 Ehesp