-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add custom JS events #122
base: master
Are you sure you want to change the base?
Add custom JS events #122
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional suggestions:
- Should there be functions in place to disable custom events or remove base the event listeners that dispatch them?
- I think the
addScrollUpEvent
andaddScrollDownEvent
could be refactored to use the same event listener onscroll
.
Given the scope of this pull request, changes to /www/assets/styles
should be excluded.
I made the requested changed. I also blended the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All that is missing is to exclude /www/assets/styles
.
Didn't it reset on [0610a7d] ? |
Oh, you reverted changes. I would suggest rebasing the |
0610a7d
to
d916ad0
Compare
👋 Thanks for the PR! addStartEvent / addEndEventSome things worry me about this:
Can you provide a concrete example where this would be useful aside from a global addScrollDirectionEventsRegarding the scroll up/down events, it works well but I wonder if it's the right place for such a feature. Maybe it should be inside the By the way, it didn't work right away during my tests. I figured some variables/functions calls didn't exist, it's now fixed ✅ |
Outcome from meeting on 2022-10-05
|
Add
/utils/events.js
withaddStartEvent
andandEndEvents
utils to easily bind an even on start/end with a debounce delay. Also addedaddScrollUpEvent
andaddScrollDownEvent
to easily listen when the scroll direction updatesUsage of events :
addStartEvent
addEndEvent
addScrollUpEvent
addScrollDownEvent