Skip to content

Conversation

karthikraja-arumugam
Copy link
Contributor

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

  • Android
  • iOS
  • MacOS
  • Windows

Issues Fixed

Fixes #31897

Screenshots

Before After
image image

@Copilot Copilot AI review requested due to automatic review settings October 7, 2025 13:59
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Oct 7, 2025
Copy link
Contributor

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.

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Oct 7, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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

@karthikraja-arumugam karthikraja-arumugam changed the title Issue31897 [iOS, Catalyst] Fixed CollectionView items height appears larger in Developer Balance sample Oct 7, 2025
@karthikraja-arumugam
Copy link
Contributor Author

@dotnet-policy-service agree company="Syncfusion, Inc."

@karthikraja-arumugam karthikraja-arumugam marked this pull request as draft October 7, 2025 14:18
@sheiksyedm sheiksyedm added the area-controls-collectionview CollectionView, CarouselView, IndicatorView label Oct 7, 2025
@karthikraja-arumugam karthikraja-arumugam marked this pull request as ready for review October 7, 2025 14:24
@PureWeen PureWeen added this to the .NET 10 SR1 milestone Oct 8, 2025
@PureWeen PureWeen moved this from Todo to Ready To Review in MAUI SDK Ongoing Oct 8, 2025
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-collectionview CollectionView, CarouselView, IndicatorView community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/ios

Projects

Status: Ready To Review

Development

Successfully merging this pull request may close these issues.

[iOS, Catalyst] CollectionView card height appears larger in Developer Balance sample

4 participants