Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make reusable scroll container with indicator arrows #2995

Merged
merged 5 commits into from
Oct 10, 2024

Conversation

MonkeyDo
Copy link
Member

@MonkeyDo MonkeyDo commented Oct 9, 2024

This PR makes a scroll container we are currently using on the "created for you" page reusable so we don't have to reimplement it elsewhere.
This follows a discussion on the LB channel regarding the artist page and its album grid, which is not very usable on desktop if you don't have a trackpad.
Preparations for https://tickets.metabrainz.org/browse/LB-1652, we can reuse this new component for said album grid allowing for arrows and styled scrollbar underneath.

In the meantime, in this PR it's only moving current functionality around and improving customizability with some extra options (optional scrollbar, optional drag-to-scroll, both active by default, and custom css class names for targeted styling).

Example with arrows and scrollbar:

image

Copied styling and functionality for horizontal scroll with arrows to the left and right from the "created for you" page so it can be reused elsewhere
Remove code that has been refactored and use the new component
Can be turned off with an option, on by default.

Slowly replaces the dragScroll library also used
instead of some randomly chosen prop name that will be confusing
@MonkeyDo MonkeyDo merged commit 3ec6bbd into master Oct 10, 2024
3 checks passed
@MonkeyDo MonkeyDo deleted the monkey-scroll-container branch October 10, 2024 13:02
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.

2 participants