Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] CollectionView GridLayout items spacing #10585

Closed
domagojmedo opened this issue May 5, 2020 · 0 comments · Fixed by #10624
Closed

[Bug] CollectionView GridLayout items spacing #10585

domagojmedo opened this issue May 5, 2020 · 0 comments · Fixed by #10624
Labels
a/collectionview a/layout e/3 🕒 3 in-progress This issue has an associated pull request that may resolve it! t/bug 🐛
Milestone

Comments

@domagojmedo
Copy link

Description

When adding or removing items to collection view with GridItemsLayout and spacing between items, that spacing is not always correct. E.G. if we have Span = 2 and then remove first item in the row, the scond item will move to the left but will keep it's original horizontal spacing to the left even though there are no items to the left anymore.

It also appears that the last item has incorrect spacing as well

Steps to Reproduce

You can checkout https://github.com/domagojmedo/IMSCovid19Tracker/tree/bug with spacing set in HomePage. If instead of the spacings we set Margin = 5 on SwipeView it's all same size and no issues there.

Expected Behavior

Items in the CollectionView should add/remove items spacing depending on the surounding items.

Actual Behavior

Items appear to only set the spacing once and then keep it even after the collection changes

Basic Information

  • Version with issue: 4.6
  • Last known good version: N/A
  • IDE: Visual Studio 16.5.4
  • Platform Target Frameworks:
    • iOS: Didn't test
    • Android: 9.0
    • UWP: Didn't test
  • Android Support Library Version: N/A

Screenshots

Before:
WhatsApp Image 2020-05-05 at 22 40 45 (1)
After swiping to remove USA:
WhatsApp Image 2020-05-05 at 22 40 45

Reproduction Link

https://github.com/domagojmedo/IMSCovid19Tracker/tree/bug

Workaround

If I just set Margin on items it looks much better

@domagojmedo domagojmedo added s/unverified New report that has yet to be verified t/bug 🐛 labels May 5, 2020
@pauldipietro pauldipietro added this to New in Triage May 5, 2020
@StephaneDelcroix StephaneDelcroix removed the s/unverified New report that has yet to be verified label May 8, 2020
@StephaneDelcroix StephaneDelcroix moved this from New to Ready For Work in Triage May 8, 2020
@samhouts samhouts moved this from Ready For Work to Needs Estimate in Triage May 8, 2020
@samhouts samhouts added this to Backlog in CollectionView May 11, 2020
@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label May 28, 2020
@samhouts samhouts moved this from Backlog to In Progress in CollectionView May 28, 2020
@samhouts samhouts added the e/3 🕒 3 label May 29, 2020
@samhouts samhouts moved this from Needs Estimate to Ready For Work in Triage May 30, 2020
@samhouts samhouts removed this from Ready For Work in Triage May 30, 2020
@samhouts samhouts added this to In Progress in 4.7.0 Jun 20, 2020
@samhouts samhouts removed this from In Progress in 4.7.0 Jul 8, 2020
@samhouts samhouts added this to In Progress in vCurrent (4.8.0) Jul 30, 2020
@samhouts samhouts added this to In Progress in .NET MAUI Backlog Jul 30, 2020
@samhouts samhouts removed this from In Progress in vCurrent (4.8.0) Jul 30, 2020
@samhouts samhouts removed this from In Progress in .NET MAUI Backlog Aug 4, 2020
@samhouts samhouts added this to In Progress in vNext+1 (5.0.0) Aug 11, 2020
@samhouts samhouts added this to the 5.0.0 milestone Aug 13, 2020
@samhouts samhouts removed this from the 5.0.0 milestone Nov 2, 2020
@PureWeen PureWeen added this to the 5.0.0 milestone Nov 5, 2020
CollectionView automation moved this from In Progress to Done Dec 18, 2020
vNext+1 (5.0.0) automation moved this from In Progress to Done Dec 18, 2020
rmarinho added a commit that referenced this issue Dec 18, 2020
…#10624) fixes #9125 fixes #10585 fixes #13054 fixes #9681

* -fixed incorrect outRect values

* fixed unassigned offsets

* -fixed incorrect lastSpanIndex and outRect values

* -fixed itemdecorations stayed same when collection is updated

* Fix indexes in notifications

* Fix hang when inserting item in CarouselView

* Fix timing issue with Carousel current item when inserting

* Use GetSpanGroupIndex to determine first row/column

* Fix starting index for looped CarouselView

* Fix Carousel tests so they don't all fail when one fails;
Fix Carousel tests so they don't take 30 minutes to run;

* Fix index offset on looped Carousel;

Co-authored-by: E.Z. Hart <hartez@gmail.com>
Co-authored-by: Rui Marinho <me@ruimarinho.net>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/collectionview a/layout e/3 🕒 3 in-progress This issue has an associated pull request that may resolve it! t/bug 🐛
Projects
Development

Successfully merging a pull request may close this issue.

5 participants