Skip to content

Add approaching-bottom pagination observer#609

Draft
robmaceachern wants to merge 2 commits intomainfrom
robmaceachern/approaching-bottom-pagination-observer
Draft

Add approaching-bottom pagination observer#609
robmaceachern wants to merge 2 commits intomainfrom
robmaceachern/approaching-bottom-pagination-observer

Conversation

@robmaceachern
Copy link
Copy Markdown
Member

@robmaceachern robmaceachern commented Apr 24, 2026

Describe your changes here. Please include screenshots if they're visual!

Adds a first-class onApproachingBottom observer for pagination use cases, plus a dedicated demo in the Listable development app.

What changed

  • Added ListStateObserver.onApproachingBottom(within:shouldPerform:_:) to expose a built-in approaching-bottom observer for list pagination.
  • Added ListScrollPositionInfo.BottomThreshold, contentSize, and isApproachingBottom(within:) to support threshold-based bottom detection.
  • Added unit coverage for threshold calculations, de-duplication, re-arming after scroll/content/frame changes, and shouldPerform gating.
  • Added an Approaching Bottom Pagination demo screen to the development app.
  • Restored the touched files to the repo's existing formatting style so the PR diff stays focused on the new API and demo.
  • Documented the new public API in CHANGELOG.md.

Testing

  • mise exec -- tuist generate --no-open --path Development
  • xcodebuild test -workspace /Users/robmaceachern/Development/Listable/Development/ListableDevelopment.xcworkspace -scheme Listable -destination 'platform=iOS Simulator,id=C4028877-CBF8-4816-88AD-B9C88E490FB1' -only-testing:ListableTests/UIRectEdgeTests -only-testing:ListableTests/ListStateObserverApproachingBottomTests\n\n### Checklist\n\n- [x] Ensure any public-facing changes are reflected in the changelog.

@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

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.

2 participants