Skip to content
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

Merged
merged 12 commits into from
Jul 29, 2021
Merged

Swap layout namespaces #1838

merged 12 commits into from
Jul 29, 2021

Conversation

hartez
Copy link
Contributor

@hartez hartez commented Jul 28, 2021

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.

Copy link
Member

@mattleibow mattleibow left a 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 { }
Copy link
Member

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?

Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

src/Controls/src/Core/ScrollView.cs Show resolved Hide resolved
@@ -5,7 +5,7 @@

namespace Microsoft.Maui.Controls
{
public class TemplatedView : Layout, IControlTemplated
public class TemplatedView : Compatibility.Layout, IControlTemplated
Copy link
Member

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.

@PureWeen PureWeen added this to the 6.0.100-preview.7 milestone Jul 28, 2021
Copy link
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely

@PureWeen PureWeen merged commit 196f7c8 into main Jul 29, 2021
@PureWeen PureWeen deleted the swap-layout-namespaces branch July 29, 2021 13:58
@samhouts samhouts added area-controls-collectionview CollectionView, CarouselView, IndicatorView legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor area-controls-flyoutpage FlyoutPage area-core-hosting Extensions / Hosting / AppBuilder / Startup area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter area-controls-listview ListView and TableView area-controls-modal area-navigation NavigationPage area-controls-shell Shell Navigation, Routes, Tabs, Flyout area-controls-activityindicator ActivityIndicator area-controls-button Button, ImageButton area-controls-flyout Flyout area-controls-frame Frame labels Jul 11, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2023
@Eilon Eilon removed legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter labels May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants