Skip to content

Conversation

@VanAnderson
Copy link
Contributor

Closes https://github.com/github/primer/issues/183

useScrollFlash takes in a ref and implements https://adxlv.computer/projects/flash-scrollers/

The issue implies that this should be a global solution for overlay components, but I think we will want to implement it in the specific use cases of Overlay being used - this is because the scrollable container itself is implemented in the specific use cases of Overlay rather than globally on overlay itself.

Looking at the issue, it seems the primary place where this was needed was SelectPanel, but we can easily put it elsewhere just by using the hook!

Screenshots

scroll-flash

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

@changeset-bot
Copy link

changeset-bot bot commented Jun 2, 2021

⚠️ No Changeset found

Latest commit: bc4b4b1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Jun 2, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/primer/primer-components/6mK5FhKzNUt7CH8b64SRDZb5cb4o
✅ Preview: https://primer-components-git-vananderson-scroll-flash-primer.vercel.app

Copy link
Member

@smockle smockle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple comments re: code cleanup. I like the overall direction of this—nice idea, making it a hook! ✨

@vercel vercel bot temporarily deployed to Preview June 3, 2021 20:48 Inactive
@VanAnderson VanAnderson requested a review from smockle June 3, 2021 22:13
@vercel vercel bot temporarily deployed to Preview June 7, 2021 14:21 Inactive
Copy link
Member

@smockle smockle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! LGTM! ✨

@VanAnderson VanAnderson merged commit 47ce6ec into main Jun 7, 2021
@VanAnderson VanAnderson deleted the VanAnderson/scroll-flash branch June 7, 2021 17:00
@vdepizzol
Copy link
Contributor

This is awesome! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants