withastro / astro.build

https://astro.build
335 stars 131 forks source link

Improve DB intersection observer logic #1079

Closed natemoo-re closed 2 weeks ago

natemoo-re commented 2 weeks ago

The IntersectionObserver logic added to /db in #1059 consistently skipped highlighting the Features section.

This PR refactors the logic to track the delta between ratios rather than using a naive entry.isIntersecting check.

Tiny perf improvement by hoisting the selector variable up, too.

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
astro-build ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 26, 2024 8:04pm