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

Ideas for other modifiers #85

Open
elwayman02 opened this issue May 11, 2020 · 6 comments
Open

Ideas for other modifiers #85

elwayman02 opened this issue May 11, 2020 · 6 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@elwayman02
Copy link
Owner

What other scroll-based modifiers would you like to see added?

The obvious one is did-scroll - what other contextual interactions would be useful? Maybe modifier that is tailored to generating impressions? e.g. when an element scrolls into the visible viewport, it calls the handler to note that an impression was registered, configurable with different % visibility thresholds.

@elwayman02 elwayman02 added help wanted Extra attention is needed good first issue Good for newcomers enhancement New feature or request and removed good first issue Good for newcomers labels May 11, 2020
@ygongdev
Copy link
Collaborator

How about a simple functional one like scroll-to that will scroll in a certain direction by a certain amount or even to an element?
Or can break it into scroll-left, scroll-right, scroll-up, scroll-down for amount if we want be more explicit?

@elwayman02
Copy link
Owner Author

I think that's a great idea. scroll-to could take an x and y axis and use positive/negative numbers for different directions.

@ygongdev
Copy link
Collaborator

Yeah it'll just wrap around https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTo.

We can have another one for scrollIntoView maybe?

@elwayman02
Copy link
Owner Author

I like it. Do you want to just make a separate issue for each modifier you want to propose? Then you can outline what the external API would look like, as well as the high level implementation details of which browser APIs you would leverage. That way, we can go through each of them and proceed from there, using each issue as the task to close when someone implements the deliverable.

@ygongdev
Copy link
Collaborator

Yeah we can do that

@backspace
Copy link

Something like memory-scroll but modifier-based might be nice 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants