-
Notifications
You must be signed in to change notification settings - Fork 30
Adding peek support to PagedListLayout
#560
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
Conversation
Test and documentation cleanup.
…-items * johnnewman/feature/cache: Changelog updates. Updating actions cache version.
To ensure CI is working, this PR includes the actions/cache v4 changes from #561. |
df39807
to
9d6e28e
Compare
224474a
to
70a3f32
Compare
Demo/Sources/Demos/Demo Screens/AutoScrollingViewController.swift
Outdated
Show resolved
Hide resolved
ListableUI/Sources/Layout/ListLayout/ListLayoutScrollViewProperties.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple questions but this looking great overall!
ListableUI/Sources/Layout/ListLayout/ListLayoutScrollViewProperties.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (I think), nice work! I want to think through the ListLayout changes a bit more, but they look right to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couple of comments, looking great though!
8a2cab7
to
38e94c5
Compare
* main: Updating actions cache version (#561)
* main: Update run_tests.yml Update run_tests.yml Update run_tests.yml Update run_tests.yml Update run_tests.yml Update run_tests.yml Update env.properties Update run_tests.yml Prepare 15.0.2 release (#564) Update Xcode verison Update to use runner Add env var for macos runner Update SPM job to use env var Fix for crash when doing a programmatic scroll down while another external update is processed (#557) bug: Disable cell content interaction while swipe actions are visible. (#562)
This release adds peek support for the `PagedListLayout` from #560.
In #560 we introduced a `percentageVisible` property on our list position info to support peek-based page layouts – this is usually fine, but due to event ordering, and namely how it takes an extra runloop for the collection view layout to update after `collectionView(_ collectionView: UICollectionView, moveItemAt from: IndexPath, to: IndexPath)` is called, we end up in a state where the list's storage is inconsistent with its layout. This means that our call to `ListStateObserver.perform(self.view.stateObserver.onItemReordered, "Item Reordered" ...)` would crash / be wrong until the layout occurred. The fix is to place the `Item Reordered` observer callback at the end of the update queue, so the collection view has time to "settle" internally and become consistent. [Relevant Slack Thread](https://square.slack.com/archives/CTJ4UNLHF/p1744750475867669) https://block.atlassian.net/browse/UI-8607
PagedListLayout
now supports a peek value, which allows items to peek into view from the leading/top and trailing/bottom edges.PagingSize
now supportsinset(Peek)
andfixed(CGFloat)
page sizes.isPagingEnabled
boolean with aPageScrollingBehavior
enum. This gives layouts the ability to disable paging, leveragefull
UIScrollView paging (where items are full width), or usepeek
paging (where items can be less than the full width and peek into view).ListScrollPositionInfo
now contains the percentage of visibility for each visible item. This allows clients to pick the most visible item for selection.Checklist
Please do the following before merging:
Main
section.Simulator.Screen.Recording.-.iPad.mini.A17.Pro.-.2025-03-18.at.13.27.11.mp4