FormidableLabs / formidable-oss-landers

MIT License
2 stars 0 forks source link

Header Slug Scrolling #23

Closed erikaannesmith closed 3 years ago

erikaannesmith commented 3 years ago

⚡ fridayfridayfriday already! 🌵

this PR renders link icons next to each header, enabling users to generate a slug for//automatically scroll to that section. this is the way that Victory handles this same functionality, but I'm open to other approaches if anything comes to you!

click around. it's pretty satisfying.

Screen Shot 2020-12-11 at 12 59 33 PM
erikaannesmith commented 3 years ago

also to note! the reasons we need all this crazy logic are: A) sweet scrolling animations B) the fixed header makes us offset the content we're scrolling to, which you would think would be straightforward, but alas..

erikaannesmith commented 3 years ago

weird-scroll

I'm seeing some odd scrolling behavior on the last anchor tag on a page

ah! I think maybe this has to do with them having the same title?! I'll add an index or something and see if that helps :) good catch!

boygirl commented 3 years ago

Looks good! Edge case scroll behavior is captured in https://github.com/FormidableLabs/formidable-oss-landers/issues/24