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

[BUG] Inserting a new first child item inside a popup breaks Hot Reload #2496

Open
2 tasks done
softlion opened this issue Feb 5, 2025 · 2 comments
Open
2 tasks done
Labels

Comments

@softlion
Copy link
Contributor

softlion commented Feb 5, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

Hot reload stops working on android as soon as you insert a <ContentView> as the 1st child of the popup while debugging.

Expected Behavior

Hot reload should still work

Steps To Reproduce

Original popup content:

<toolkit:Popup  
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
    x:Class="Wz.Views.Shared.ActivityPopupPage" 
    x:DataType="shared1:ActivityViewModel"
    CanBeDismissedByTappingOutsideOfPopup="False"
    Color="Transparent">
    
        <Border Padding="15" BackgroundColor="White">
            <VerticalStackLayout Spacing="15">

                <skottie:SkottieView
                    HorizontalOptions="Center" WidthRequest="60" HeightRequest="60" Animation="activity.json" />
                    <Label Text="Something"  LineBreakMode="WordWrap"
                           TextColor="Red"
                           FontAttributes="Bold" FontSize="16"
                           HorizontalTextAlignment="Center" />

                <Border
                    HorizontalOptions="Center" Padding="20"
                    BackgroundColor="LightGray"
                    Stroke="LightGray"
                    StrokeShape="RoundRectangle 10">

                    <Label Text="Some text"  LineBreakMode="WordWrap"
                           TextColor="DarkBlue"
                           FontAttributes="Bold" FontSize="16"
                           HorizontalTextAlignment="Center" />
                    
                </Border>
            </VerticalStackLayout>
        </Border>

</toolkit:Popup>

Updated content:

Original popup content:

<toolkit:Popup  
    xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
    x:Class="Wz.Views.Shared.ActivityPopupPage" 
    x:DataType="shared1:ActivityViewModel"
    CanBeDismissedByTappingOutsideOfPopup="False"
    Color="Transparent">
    
    <ContentView Padding="20,0">
        <Border Padding="15" BackgroundColor="White">
            <VerticalStackLayout Spacing="15">

                <skottie:SkottieView
                    HorizontalOptions="Center" WidthRequest="60" HeightRequest="60" Animation="activity.json" />
                    <Label Text="Something"  LineBreakMode="WordWrap"
                           TextColor="Red"
                           FontAttributes="Bold" FontSize="16"
                           HorizontalTextAlignment="Center" />

                <Border
                    HorizontalOptions="Center" Padding="20"
                    BackgroundColor="LightGray"
                    Stroke="LightGray"
                    StrokeShape="RoundRectangle 10">

                    <Label Text="Some text"  LineBreakMode="WordWrap"
                           TextColor="DarkBlue"
                           FontAttributes="Bold" FontSize="16"
                           HorizontalTextAlignment="Center" />
                    
                </Border>
            </VerticalStackLayout>
        </Border>
    </ContentView>

</toolkit:Popup>

Link to public reproduction project repository

Needs reproduction project

Environment

- .NET MAUI CommunityToolkit: 11.0.0
- OS: Android (recent physical device)
- .NET MAUI: 9.0.30

Anything else?

No response

@softlion softlion added bug Something isn't working unverified labels Feb 5, 2025
@BretJohnson
Copy link
Contributor

tagging myself @BretJohnson

Copy link
Contributor

Hi @softlion! We have added the needs reproduction label to this issue, which indicates that we are unable to take further action until you provide a reproduction sample that we can use to reproduce + fix your bug. In accordance with the Reporting a bug section of our Contributing.md that you confirmed reading before you submitted this Issue, we ask that every Issue author provide a link to an open-source repository containing the reproduction sample app. This issue will be closed automatically in 5 days if we do not receive a reproduction sample from you. Please feel free to re-open this Issue once you have provided a reproduction sample.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants