Closed M-i-k-e-l closed 1 month ago
@M-i-k-e-l I didn't finish reviewing, but if I understand correctly from the PR description, you mean the itemSpacing is not fixed when user pass maxItemWidth? It sounds wrong, no? I mean if the user wants a specific itemSpacing, you are changing it from them?
@M-i-k-e-l I didn't finish reviewing, but if I understand correctly from the PR description, you mean the itemSpacing is not fixed when user pass maxItemWidth? It sounds wrong, no? I mean if the user wants a specific itemSpacing, you are changing it from them?
A little bit, I'll try to take another look later this week
DO NOT MERGE
I did not test in private yet
Description
I only managed to reproduce the bug in iPad Pro 11 inch (iOS 17.0 - did not test in other OS) I did not test in private because I was not sure what'll you'll think about this relatively large change.
What went wrong? In this scenario
numberOfColumns
was set to 6 (inuseGridLayout
) but it seems that there was no room for all the items, I think this is partly because we have more than one source-of-truth regardingitemWidth
(itemSize
) anditemSpacing
.I've changed the calculations (the
numberOfColumns
is now more complex...) to what I think should be and alloweditemSpacing
to change in casemaxItemWidth
is passed.The values are now also used in
usePresenter
instead of it recalculating the size and using the defaultitemSpacing
.Changelog
⚠️ Fix number of columns in iPad Pro 11 inch
Additional info
Ticket 3786