[SR5] Fix footer resizing issue#29064
Merged
PureWeen merged 4 commits intorelease/9.0.1xx-sr5from Apr 18, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
rmarinho
reviewed
Apr 17, 2025
src/Controls/src/Core/Handlers/Items/iOS/StructuredItemsViewController.cs
Show resolved
Hide resolved
tj-devel709
requested changes
Apr 17, 2025
7941fe5 to
f398a13
Compare
tj-devel709
approved these changes
Apr 17, 2025
PureWeen
commented
Apr 17, 2025
| { | ||
| var hasHeaderOrFooter = _footerViewFormsElement is not null || _headerViewFormsElement is not null; | ||
| if (hasHeaderOrFooter && CollectionView is MauiCollectionView { NeedsCellLayout: true } collectionView) | ||
| if (_headerFooterPositionNeedLayoutUpdate) |
Member
Author
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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