-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[iOS, Catalyst] Fixed CollectionView items height appears larger in Developer Balance sample #31902
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
base: main
Are you sure you want to change the base?
Conversation
Hey there @@karthikraja-arumugam! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
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.
Pull Request Overview
This pull request fixes a layout issue in CollectionView where cards appeared larger than expected on iOS and Mac platforms. The issue was caused by incorrect sizing behavior when content size wasn't initially available.
Key changes:
- Modified the sizing logic to consider CollectionView orientation when determining content size
- Added scroll direction awareness to prevent incorrect sizing in horizontal layouts
- Included comprehensive UI tests to validate the fix
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/Controls/src/Core/Handlers/Items2/ItemsViewHandler2.iOS.cs |
Updated GetDesiredSize method to handle orientation-aware sizing logic |
src/Controls/src/Core/Handlers/Items2/iOS/ItemsViewController2.cs |
Added GetScrollDirection method to expose CollectionView orientation |
src/Controls/tests/TestCases.HostApp/Issues/Issue31897.cs |
Created UI test page with horizontal CollectionView to reproduce the issue |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue31897.cs |
Added automated test to verify CollectionView height behavior |
@dotnet-policy-service agree company="Syncfusion, Inc." |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Issue Details
In the Developer Balance sample, the CollectionView items appear larger than expected on iOS and Mac. Additional vertical space is observed within the cards.
Root Cause
Breaking PR: #30978
In that PR, when the content size isn’t set, the desired size of the CollectionView is used. This causes the issue when a horizontal CollectionView stretches to full size without resizing to its actual height.
Description of change
Instead of returning the desired size from the base, the content size is now updated based on the CollectionView orientation, ensuring proper size constraints are applied
Validated the behaviour in the following platforms
Issues Fixed
Fixes #31897
Screenshots