Skip to content

Conversation

@johnnewman-square
Copy link
Contributor

@johnnewman-square johnnewman-square commented Jun 30, 2025

This builds on the changes in #582, adding a completion handler to the scrollToSection(...) API. This also adds a demo to showcase this API with various configurations:
Screenshot 2025-06-30 at 4 33 33 PM

Checklist

Please do the following before merging:

  • Ensure any public-facing changes are reflected in the changelog. Include them in the Main section.

@johnnewman-square johnnewman-square force-pushed the johnnewman/feature/section-scroll-completion branch from 0e8a438 to 0fe806b Compare June 30, 2025 17:42
Base automatically changed from johnnewman/feature/scroll-completion to main June 30, 2025 17:52
@johnnewman-square johnnewman-square force-pushed the johnnewman/feature/section-scroll-completion branch 3 times, most recently from 3cea6ac to 10613e8 Compare June 30, 2025 20:49
@johnnewman-square johnnewman-square force-pushed the johnnewman/feature/section-scroll-completion branch from 10613e8 to 2c2469a Compare June 30, 2025 21:09
@johnnewman-square johnnewman-square marked this pull request as ready for review June 30, 2025 21:10
@johnnewman-square johnnewman-square requested a review from a team June 30, 2025 21:19
Copy link
Collaborator

@kyleve kyleve left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Contributor

@g-mark g-mark left a comment

Choose a reason for hiding this comment

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

Nice!

scrollExpectation.fulfill()
}
)
wait(for: [scrollExpectation], timeout: 0.5)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is fine as is, but I wonder if we could either disable animations on the view (if it doesn't interfere with the scrolling behavior) or use something like window.layer.speed = 4 to speed up the testing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion. I've set the window speed to 4 for these tests. That may reduce the test duration a bit in CI. (UIView.setAnimationsEnabled(false) causes unit tests to break, so I'll stick with the window speed for now.)

@johnnewman-square johnnewman-square merged commit c8fb481 into main Jul 2, 2025
4 checks passed
@johnnewman-square johnnewman-square deleted the johnnewman/feature/section-scroll-completion branch July 2, 2025 17:43
kyleve added a commit that referenced this pull request Jul 24, 2025
…-headerfooters

* origin/main:
  build: set up tuist (#584)
  Bumping versions to 16.3.0 (#589)
  Reset scroll position if list identifier changes (#588)
  Bumping versions to 16.2.0 (#587)
  Adding a completion handler to the `scrollToSection` API. (#585)
  Adding a programmatic scroll completion handler (#582)
  Remove iOS 19 (26) cap of the collection view first responder workaround (#581)
  Bumping versions to 16.1.0 (#583)
  Update for Blueprint 6.0.0 (#580)
  Bumping versions to 16.0.4. (#579)
  Update the first responder resignation workaround to be enabled by default and cap at < iOS 19 [UI-8849] (#578)
  Bumping versions to 16.0.3 (#577)
  Bottom gravity and autoscroll improvements (#576)
  Bumping versions to 16.0.2 (#574)
  Addressing an AutoScrollAction issue when using VerticalLayoutGravity.bottom (#572)
  release: Prepare 16.0.1 release (#569)
  Fix reordering crash introduced in 16.0 (#568)
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.

4 participants