-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Windows] Notify changes in CollectionView Layouts #13137
Conversation
src/Controls/src/Core/Handlers/Items/StructuredItemsViewHandler.Windows.cs
Outdated
Show resolved
Hide resolved
src/Controls/src/Core/Handlers/Items/StructuredItemsViewHandler.Windows.cs
Outdated
Show resolved
Hide resolved
src/Controls/src/Core/Handlers/Items/StructuredItemsViewHandler.Windows.cs
Show resolved
Hide resolved
src/Controls/src/Core/Handlers/Items/StructuredItemsViewHandler.Windows.cs
Outdated
Show resolved
Hide resolved
else if (e.PropertyName == GridItemsLayout.HorizontalItemSpacingProperty.PropertyName || e.PropertyName == GridItemsLayout.VerticalItemSpacingProperty.PropertyName) | ||
UpdateItemsLayoutItemSpacing(); | ||
else if (e.PropertyName == LinearItemsLayout.ItemSpacingProperty.PropertyName) | ||
UpdateItemsLayoutItemSpacing(); |
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.
Would look a lot nicer with a switch expression and the removal of the else clauses.
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.
Agree with that. In this case, just continued following the if-else approach used so far in Xamarin. https://github.com/xamarin/Xamarin.Forms/blob/caab66bcf9614aca0c0805d560a34e176d196e17/Xamarin.Forms.Platform.Android/Renderers/ButtonRenderer.cs#L140
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.
I'm guessing that was an old code and did not have switch statements, since we are dealing with new code, lets try to update or code base, right?
…r.Windows.cs Co-authored-by: Manuel de la Pena <mandel@microsoft.com>
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.
Looks good. Some comments about using a switch expression, but that has nothing to do with how the code will behave and is just a note.
/backport to net7.0 |
Started backporting to net7.0: https://github.com/dotnet/maui/actions/runs/5070755171 |
@hartez backporting to net7.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Notify changes in CollectionView Layouts on Windows
Using index info to reconstruct a base tree...
M src/Controls/src/Core/Handlers/Items/StructuredItemsViewHandler.Windows.cs
M src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt
Falling back to patching base and 3-way merge...
Auto-merging src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt
CONFLICT (content): Merge conflict in src/Controls/src/Core/PublicAPI/net-windows/PublicAPI.Unshipped.txt
Auto-merging src/Controls/src/Core/Handlers/Items/StructuredItemsViewHandler.Windows.cs
CONFLICT (content): Merge conflict in src/Controls/src/Core/Handlers/Items/StructuredItemsViewHandler.Windows.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Notify changes in CollectionView Layouts on Windows
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
@hartez an error occurred while backporting to net7.0, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
Description of Change
Notify changes in CollectionView Layouts (Span, Spacing etc).
Issue fixed on Windows (changing Spans).
To validate the changes, launch the .NET MAUI Gallery and navigate to the CollectionView section. Select the "Vertical Grid" sample and update the Span property value.
Issues Fixed
FIxes #4112
Fixes #8387
Fixes #10144