-
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
Swap layout namespaces #1838
Swap layout namespaces #1838
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.
Looks pretty good!
namespace Microsoft.Maui.Controls | ||
{ | ||
public class Grid : GridLayout { } | ||
public class RelativeLayout : Compatibility.RelativeLayout { } |
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.
Not sure about the best way yet, but this might cause ambiguity if both namespace are imported.
The only reason to have this is to not break existing code? But maybe that is just something we have to do?
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.
Can we make the compat ones internal for now?
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.
Can we make the compat ones internal for now?
Inconsistent accessibility.
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.
Not sure about the best way yet, but this might cause ambiguity if both namespace are imported.
The only reason to have this is to not break existing code? But maybe that is just something we have to do?
The reason was to avoid breaking hundreds of things in ControlGallery. But if we're really worried about the confusion, I can go update all of those.
@@ -5,7 +5,7 @@ | |||
|
|||
namespace Microsoft.Maui.Controls | |||
{ | |||
public class TemplatedView : Layout, IControlTemplated | |||
public class TemplatedView : Compatibility.Layout, IControlTemplated |
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.
Just a note for RC, we probably should not have a non compat layout derived from a compat one.
However this should be fine technically since this is just a namespace which is arbitrary.
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.
Lovely
Move legacy layouts to Microsoft.Maui.Controls.Compatibility; new layouts move to Microsoft.Maui.Controls.
Also adds a StackLayout type to the new layouts which is built out of VerticalStackLayout and HorizontalStackLayout.