-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[SR5] Fix footer resizing issue #29064
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
Conversation
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.
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (4)
src/Controls/src/Core/Handlers/Items/iOS/StructuredItemsViewController.cs:241
- The commented-out condition for the header view frame update may cause unnecessary updates or performance issues. Consider restoring the condition or refactoring it to only update when the frame values have actually changed.
if (_headerUIView != null/* && (_headerUIView.Frame.Y != -headerHeight || _headerUIView.Frame.Width != CollectionView.Frame.Width)*/)
src/Controls/src/Core/Handlers/Items/iOS/StructuredItemsViewController.cs:253
- The commented condition for the footer view frame update removes a check that might prevent invalid layout recalculations. Ensure that the new logic still correctly handles footer positioning without causing layout glitches.
if (_footerUIView != null/* && (_footerUIView.Frame.Y != height || emptyHeight > 0 || _footerUIView.Frame.Height != footerHeight || _footerUIView.Frame.Width != CollectionView.Frame.Width)*/)
src/Controls/src/Core/Handlers/Items/iOS/MauiCollectionView.cs:30
- Reversing the condition from 'if (isPropagating)' to 'if (!isPropagating)' changes the invalidation behavior, which could lead to missed or extra layout updates. Verify that this change is intentional and that it does not negatively impact cell layout updates.
if (!isPropagating)
src/Controls/src/Core/Handlers/Items/iOS/ItemsViewController.cs:199
- Removing the block that resets the 'NeedsCellLayout' flag in ViewWillLayoutSubviews may alter the timing of layout updates. Confirm that this removal is valid and that no side effects occur in the layout behavior on iOS.
if (CollectionView is Items.MauiCollectionView { NeedsCellLayout: true } collectionView)
dc2e979 to
3b7f63c
Compare
src/Controls/src/Core/Handlers/Items/iOS/StructuredItemsViewController.cs
Show resolved
Hide resolved
tj-devel709
left a comment
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.
7941fe5 to
f398a13
Compare
| { | ||
| var hasHeaderOrFooter = _footerViewFormsElement is not null || _headerViewFormsElement is not null; | ||
| if (hasHeaderOrFooter && CollectionView is MauiCollectionView { NeedsCellLayout: true } collectionView) | ||
| if (_headerFooterPositionNeedLayoutUpdate) |
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.
This path here is the only interesting part of this PR
The rest of this PR is just reverting a PR that didn't fix the intended issue correctly

Description of Change
This is an alternate fix to #28971
The first commit is just reverrting the above PR
e9a1bb2
The second commit is the actual fix
e9a1bb2
I realize the screenshots for the centering of the header/footer are different here on android vs iOS
But we already have an issue for that
#27738
Issues Fixed
Fixes #29051