Skip to content

iOS: only invalidate on a preferred-size change along the scrolling axis - #77

Merged
Redth merged 1 commit into
mainfrom
fix/ios-cross-axis-invalidation
Nov 9, 2026
Merged

Redth merged 1 commit into
mainfrom
fix/ios-cross-axis-invalidation

Conversation

@Redth

@Redth Redth commented Nov 9, 2026

Copy link
Copy Markdown
Owner

#76 made a cell's preferred attributes keep the layout's cross-axis size, but a vertical list at a fractional width (e.g. a 1174/3 pt iPhone Duo pane) still never settled. Logging the override shows it returns the layout's 391.3333435 on every pass; UIKit then pixel-aligns the preferred size to 391.3333333 and compares it with the flow layout's float-stored 391.3333435, so no value on our side can make them agree.

Items are only self-sized along the scrolling axis, so CvLayout now overrides ShouldInvalidateLayout(preferred, original) and ignores cross-axis differences, with the same half-pixel tolerance the handler uses. Verified in PoolMath on the iPhone Duo simulator (iOS 27.2), without its app-side workaround: a cold launch while unfolded and a live fold/unfold both render the Timeline with no "stuck in its update loop".

#76 made a cell's preferred attributes keep the layout's cross-axis size,
but a vertical list at a fractional width (e.g. a 1174/3 pt iPhone Duo
pane) still never settled. Logging the override shows it returns the
layout's 391.3333435 on every pass; UIKit then pixel-aligns the preferred
size to 391.3333333 and compares it with the flow layout's float-stored
391.3333435, so no value on our side can make them agree.

Items are only self-sized along the scrolling axis, so CvLayout now
overrides ShouldInvalidateLayout(preferred, original) and ignores
cross-axis differences, with the same half-pixel tolerance the handler
uses. Verified in PoolMath on the iPhone Duo simulator (iOS 27.2),
without its app-side workaround: a cold launch while unfolded and a live
fold/unfold both render the Timeline with no "stuck in its update loop".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Redth
Redth merged commit 3d6614f into main Nov 9, 2026
8 checks passed
@Redth
Redth deleted the fix/ios-cross-axis-invalidation branch November 9, 2026 14:49
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.

1 participant