Skip to content

[iOS] Fix for CollectionView with horizontal grid layout has extra space on right end#25825

Merged
rmarinho merged 4 commits intodotnet:mainfrom
Tamilarasan-Paranthaman:fix-25433
Dec 5, 2024
Merged

[iOS] Fix for CollectionView with horizontal grid layout has extra space on right end#25825
rmarinho merged 4 commits intodotnet:mainfrom
Tamilarasan-Paranthaman:fix-25433

Conversation

@Tamilarasan-Paranthaman
Copy link
Copy Markdown
Member

@Tamilarasan-Paranthaman Tamilarasan-Paranthaman commented Nov 13, 2024

Root Cause of the issue

  • The HorizontalItemSpacing was being applied from the GetInsetForSection method, even though it was not a grouped collection

Description of Change

  • The HorizontalItemSpacing should not be applied from the GetInsetForSection method when it is not a grouped collection. Therefore, I set the return value to zero, which resolves the issue.

Note

  • Unfortunately, I was not able to validate the issue fix in CollectionView2 using HorizontalOptions set to center, as it seems the collection view occupies the entire width in CV2. For now, I have used CollectionView1 in the test sample since I have fixed the issue in CollectionView1.

Issues Fixed

Fixes #25433

Tested the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Screenshot

  • Note: I have set the CollectionView background color to red to make the differences more visually apparent. The red areas in the image represent the spaces.

1. Without Grouping:

Before Issue Fix After Issue Fix

2. With Grouping

Before Issue Fix After Issue Fix

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Nov 13, 2024
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Hey there @Tamilarasan-Paranthaman! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@Tamilarasan-Paranthaman Tamilarasan-Paranthaman added platform/ios area-controls-collectionview CollectionView, CarouselView, IndicatorView labels Nov 13, 2024
@jsuarezruiz
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@Tamilarasan-Paranthaman Tamilarasan-Paranthaman marked this pull request as ready for review November 18, 2024 09:58
@Tamilarasan-Paranthaman Tamilarasan-Paranthaman requested a review from a team as a code owner November 18, 2024 09:58
@jsuarezruiz
Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@rmarinho rmarinho merged commit b03cb7e into dotnet:main Dec 5, 2024
@sheiksyedm sheiksyedm added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Dec 6, 2024
@samhouts samhouts added fixed-in-9.0.21 fixed-in-net8.0-nightly This may be available in a nightly release! labels Dec 16, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 17, 2025
@Tamilarasan-Paranthaman Tamilarasan-Paranthaman deleted the fix-25433 branch June 16, 2025 11:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-collectionview CollectionView, CarouselView, IndicatorView community ✨ Community Contribution fixed-in-9.0.21 fixed-in-net8.0-nightly This may be available in a nightly release! partner/syncfusion Issues / PR's with Syncfusion collaboration platform/ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collection view with horizontal grid layout has extra space on right (end) of collection

5 participants