Skip to content

Conversation

@sarah-storm
Copy link
Contributor

Closes #310

Adds playwright to scroll spy component. Also addresses issues discovered during playwright testing around the activation of elements when multiple spies are in the viewport at one time. Changes to logic are as follows:

  • Top of viewport is reference for 'activation'. When an element touches or crosses the viewport it becomes active
  • Clicking any spy links should activate them
  • If you've reached the bottom of the page without naturally activating the last spy, it will be activated

Copy link
Collaborator

@mjbp mjbp left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Ran it in a current client project with a scroll margin with a rootMargin set and worked fine too.

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.

Add playwright - Scroll Spy

3 participants