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

Infinite scroll #61

Open
nephest opened this issue Mar 2, 2023 · 0 comments
Open

Infinite scroll #61

nephest opened this issue Mar 2, 2023 · 0 comments
Projects

Comments

@nephest
Copy link
Collaborator

nephest commented Mar 2, 2023

Add an ability to call a js function when the viewport is about to be scrolled down to the end of the target element/page.

  • The target element is an element that contains paginated content that can be extended by loading the next page.
  • A "Load more/next" control can be used as the target element if it already exists on the page. Such elements are expected to handle pagination logic like navigation, completion, and reset, so you can just observe these elements via the Intersection Observer API.
  • Use the Intersection Observer API

Here are some content/functions that can be enhanced by this feature. Notice that these functions expect the evt parameter to be present, so add a null check or pass an empty event object.

static loadNextMatches(evt)

static loadNextMatches(evt)

static loadNextMatches(evt)

You can register the observers here

Be sure to modify the Selenium test to test endless scrolling instead of button clicks.

private static void testCharacterMatches(WebDriver driver, WebDriverWait wait)

@nephest nephest added this to Low Priority in Ideas Mar 2, 2023
@nephest nephest moved this from Low Priority to High Priority in Ideas Mar 7, 2023
@nephest nephest pinned this issue Oct 6, 2023
@nephest nephest unpinned this issue Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Ideas
High Priority
Development

No branches or pull requests

1 participant