-
Notifications
You must be signed in to change notification settings - Fork 28
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
Fix cross-axis natural measurements #510
base: main
Are you sure you want to change the base?
Conversation
…rements * origin/main: Update CHANGELOG.md Allow other panning to work on other cells while another is open Remove `isTouchWithinSwipeActionView` Update swipe actions to more closely match iOS behavior Update CHANGELOG.md Release 13.1.0 Only return existing view if there is a contained first responder Self code review Fixed an issue where a crash would occur when applying an external update to list content while a live reorder event was occurring. Remove override of performBatchUpdates, it causes warnings for consumers Update CHANGELOG.md (#508) Revert "Supplementary Tracking Fixes (#433)" Revert "Force layout before appear, to avoid animated updates (#505)"
horizontalFill: .natural, | ||
verticalFill: .natural | ||
), | ||
CGSize(width: 900, height: 1000) | ||
) | ||
|
||
XCTAssertEqual( |
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.
This is the test for this new case. Note the 900
in the returned size. Before, it would be 1000
.
Still looking for reviews on this! |
precondition( | ||
layoutMode == .caffeinated, | ||
"Listable only supports the `.caffeinated` layout mode in Blueprint." | ||
) |
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.
Isn't this still feature flagged? Does this need to occur in this PR?
I think I'd prefer that the switch to only supporting caffeinated
layout be in a separate PR that's combined with the work to do so in Market/Register if we can...
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.
The flag still exists, though in theory its 100% rolled out. I had been hoping maybe we'd be ripping out the old layout mode before this merged, but it looks like that's not happening! I'll add this back in.
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.
OK feel free to ping me on Slack for another review when it's ready!
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.
I also decided to take a swing at removing legacy layout: square/Blueprint#475
This fixes the measurement of cross-axis sizing when providing the
.natural
size parameter. Concretely, this means that you can now have a horizontally scrolling list that can also correctly measure its height. Before, the height would end up taking up all the size provided to it.https://square.slack.com/archives/CTJ4UNLHF/p1695414540305019
Checklist
Please do the following before merging:
Main
section.