ember-scroll-modifiers icon indicating copy to clipboard operation
ember-scroll-modifiers copied to clipboard

Ideas for other modifiers

Open elwayman02 opened this issue 5 years ago • 6 comments

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 avatar May 11 '20 19:05 elwayman02

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?

ygongdev avatar Jan 25 '21 23:01 ygongdev

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

elwayman02 avatar Jan 25 '21 23:01 elwayman02

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?

ygongdev avatar Jan 26 '21 01:01 ygongdev

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.

elwayman02 avatar Jan 26 '21 01:01 elwayman02

Yeah we can do that

ygongdev avatar Jan 26 '21 03:01 ygongdev

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

backspace avatar Nov 27 '23 22:11 backspace