-
Notifications
You must be signed in to change notification settings - Fork 92
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
Pass the intersectionObserverEntry to callbacks of {{in-vieport}} modifier #278
Pass the intersectionObserverEntry to callbacks of {{in-vieport}} modifier #278
Conversation
…ifier When using the {{in-viewport}} modifier, the intersectionObserverEntry property was not being passed to the onEnter/onExit callbacks. This object is interesting because contains useful info like the intersection ratio, which can use to discriminate what visibility threshold an element has crossed when there's more than one set.
Supporting them would require ember-auto-update 2, which would require a major version bump
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.
I'm not yet familiar with the detailed implementation of this addon, but change seems straight forward to me. Had just one question / suggestion. Will take a closer look tomorrow.
ember-beta, | ||
ember-default-with-jquery, | ||
ember-classic | ||
# ember-beta, |
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.
I had to comment this because tests don't pass in Ember 4.0 for reasons unrelated with this PR.
Fixing it should be relatively straightforward by updating ember-auto-import, but reading the migration guide seems that doing so would make this addon only consumable by apps using ember-auto-import >=2.0, granting it a major version bump.
I wasn't sure I wanted that mixed with this very simple change.
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.
When using the {{in-viewport}} modifier, the intersectionObserverEntry property was not being
passed to the onEnter/onExit callbacks. This object is interesting because contains useful info
like the intersection ratio, which can use to discriminate what visibility threshold an element
has crossed when there's more than one set.