spring-projects / spring-projects/spring-data-commons

Investigate potential solution to pass in additional options for scroll behaviour.

Open
#3,071 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: pending-design-work type: enhancement
Dominant language
Java
Stars
838
Forks
730
PR merge metrics
No merged PRs in 30d

Description

In its current implementation scrolling is exclusive by default. This means any given position that is not Position#isInitial() will not be included in the result no matter which direction the scroll happens.

Going forward we should provide a concept similar to what we have with Pageable & PageRequest for scrolling to cover the following needs:

  • Express in-/exclusion of a given ScrollPosition in the result.
  • Express scroll direction (forward, backward)

The inclusion case for keyset based scrolling can be handled by adding another or with the present keyset and an equals comparison.

Related to: #3070

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Begin by locating the current scrolling implementation and reviewing related issue #3070. Compare the existing ScrollPosition behavior with the Pageable and PageRequest concepts, then define how inclusion, exclusion, and scroll direction should be expressed; done means an agreed solution for the stated scrolling needs.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.