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

add usePositionStickyObserver #294

Merged
merged 3 commits into from
Aug 23, 2023
Merged

add usePositionStickyObserver #294

merged 3 commits into from
Aug 23, 2023

Conversation

brandonreid
Copy link
Contributor

@brandonreid brandonreid commented Aug 18, 2023

I still need to test this, but putting it up for early review.

@brandonreid brandonreid requested a review from a team as a code owner August 18, 2023 19:10
src/useIsStickyStuck/useIsStickyStuck.ts Outdated Show resolved Hide resolved
src/useIsStickyStuck/useIsStickyStuck.ts Outdated Show resolved Hide resolved
src/useIsStickyStuck/useIsStickyStuck.ts Outdated Show resolved Hide resolved
src/useIsStickyStuck/useIsStickyStuck.ts Outdated Show resolved Hide resolved
src/useIsStickyStuck/useIsStickyStuck.ts Outdated Show resolved Hide resolved
@brandonreid brandonreid changed the title add useIsStickyStuck add usePositionStickyObserver Aug 22, 2023
}

const { observe } = useIntersectionObserver(intersect, computed(() => ({
threshold: [1],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does a hardcoded threshold make sense here? Asking cause I'm not sure how exactly it's used

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's a key part of the hack (explained here). Tbh, I'm not 100% sure how it works under the hood.

Copy link
Collaborator

@pleek91 pleek91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple thoughts. But overall what I'd expect. Approving so you can move on if this is blocking other PRs.

@znicholasbrown znicholasbrown merged commit 539cf57 into main Aug 23, 2023
3 checks passed
@znicholasbrown znicholasbrown deleted the addUseIsStickyStuck branch August 23, 2023 16:26
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.

3 participants