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

Investigate possibility of `Window.hasPrevious()`

Open
#2,795 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: enhancement
Dominant language
Java
Stars
838
Forks
730
PR merge metrics
No merged PRs in 30d

Description

For scrolling across results, we already provide a hasNext indicator. It would be good to have a hasPrevious state as well.

For offset-based scrolling, we can get the information from the offset (e.g. a scroll that starts at offset 1 will not have a previous page). For keyset-scrolling, we would need to read from the current cursor and read another item more (two more in total) to determine a previous and next indicator).

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

No files or tests are named. Start by tracing the Window API and the offset- and keyset-scrolling entry points described in the issue, then determine whether a previous-page indicator can be exposed consistently. Done means the feasibility is resolved and, if viable, the behavior and required coverage are agreed.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.