fern icon indicating copy to clipboard operation
fern copied to clipboard

[Bug] Side Nav not updating when link is followed to different page

Open davidkonigsberg opened this issue 1 year ago • 1 comments

Describe the bug

When a link is clicked and redirects to a different page, the side-nav still shows the original page selected even though the user is now on a different page.

To reproduce

  1. Go to these preview docs: https://sayari-analytics-preview-8d472466-ecb5-423d-88b4-fcc2ee310a0a.docs.buildwithfern.com/
  2. Navigate to "Sayari Library" -> "Ontology" -> "Entities"
  3. Click attributes link "additional_information"
  4. Done, you are now on the attributes page, but entities is still selected in the side nav

Expected behavior

The side nav should reflect the page currently being displayed

Screenshots

Screenshot 2024-01-17 at 10 12 39 AM

Version

"0.16.33"

Additional context

N/A

davidkonigsberg avatar Jan 17 '24 14:01 davidkonigsberg

I find that this only happens when the link is to a named anchor or id on a page. That is, when it's a link like /something#heading_id. Otherwise, the side nav updates as expected.

You can see an example of this on Fern's own docs. Go to https://docs.buildwithfern.com/generate-sd-ks/generators/type-script-browser-sdk and scroll to the bottom. Click the link there to /generate-sd-ks/generators/type-script-node-js-sdk#configuration-options and see that the side nav does not switch to the TypeScript NodeJS SDK.

minaelee avatar Feb 02 '24 09:02 minaelee