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

CollectionView.EmptyView not respecting layout. #27229

Open
aksik opened this issue Jan 20, 2025 · 8 comments · May be fixed by #27288
Open

CollectionView.EmptyView not respecting layout. #27229

aksik opened this issue Jan 20, 2025 · 8 comments · May be fixed by #27288
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView i/regression This issue described a confirmed regression on a currently supported version partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@aksik
Copy link

aksik commented Jan 20, 2025

Description

the simplest collection view:

`

<CollectionView.EmptyView>
    <ContentView>
        <StackLayout HorizontalOptions="Center" VerticalOptions="Center">
            <Label
                Margin="10,25,10,10"
                FontAttributes="Bold"
                FontSize="18"
                HorizontalOptions="Fill"
                HorizontalTextAlignment="Center"
                Text="No results matched your filter." />
            <Label
                FontAttributes="Italic"
                FontSize="12"
                HorizontalOptions="Fill"
                HorizontalTextAlignment="Center"
                Text="Try a broader filter?" />
        </StackLayout>
    </ContentView>
</CollectionView.EmptyView>
`

before update to 9.0.30 looked like (9.0.22):

Image

after upgrading:
Image

Steps to Reproduce

  1. create maui template app and replace MainPage content with the one mentioned above.
  2. update Microsoft.Maui.Controls 9.0.30

Link to public reproduction project repository

No response

Version with bug

9.0.30 SR3

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

9.0.22 SR2.2

Affected platforms

Android

Affected platform versions

Tested on Android 14

Did you find any workaround?

no workaround found

Relevant log output

@aksik aksik added the t/bug Something isn't working label Jan 20, 2025
@MitchBomcanhao
Copy link

MitchBomcanhao commented Jan 20, 2025

maybe related CollectionView's EmptyView Does Not Fill Vertical Space ?
workaround on #18626 (comment) seems to work

@Zhanglirong-Winnie Zhanglirong-Winnie added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed i/regression This issue described a confirmed regression on a currently supported version labels Jan 21, 2025
@Zhanglirong-Winnie
Copy link

This issue has been verified Visual Studio 17.13 Preview 2.1 (9.0.30). Can repro this issue on Android platform. And on 9.0.22 works fine.

@rmarinho
Copy link
Member

Is this a regression or a bug that was fixed? I guess the EmptyView is not taking the full height anymore. but instead sizing itself.

@rmarinho rmarinho added the area-controls-collectionview CollectionView, CarouselView, IndicatorView label Jan 21, 2025
@aksik
Copy link
Author

aksik commented Jan 21, 2025

Is this a regression or a bug that was fixed? I guess the EmptyView is not taking the full height anymore. but instead sizing itself.

It is a regression. It's not about taking full height but positioning itself inside CollectionView (VerticalOptions="Center"). It's a very simple example but in more complex sceanarios (like inside RefreshView) it doesn't render at all. That's how we've noticed it - empty views disappeared in all our applications after upgading to .30. So yes, It's a clear regression.

@rmarinho
Copy link
Member

So the screenshots are wrong @aksik ? Because on the screenshots above the only difference I manage to see is one taking full height and other does not . I don t see any view missing.

@aksik
Copy link
Author

aksik commented Jan 21, 2025

maybe related CollectionView's EmptyView Does Not Fill Vertical Space ? workaround on #18626 (comment) seems to work

Yes, I can confirm that this workaround works. However, as we have a lot of apps with a lot of empty views, changing all of them sounds ridiculous just tu update to latest version :/

@aksik
Copy link
Author

aksik commented Jan 21, 2025

So the screenshots are wrong @aksik ? Because on the screenshots above the only difference I manage to see is one taking full height and other does not . I don t see any view missing.

no, screenshots are ok, it's just the most basic example prepared to highlight the bug. The second screenshot shows empty view on top while still having VerticalOptions="Center". Looks like it's not aware of the height of collectionview it's inside of.

@RobTF
Copy link

RobTF commented Jan 22, 2025

Just been hit with this on our bugtracker from beta testers after updating MAUI to the latest version in our .NET 9 branch. It's these kind of obvious, silly regressions with MAUI which is the root of a lot of the framework complaints.

@vishnumenon2684 vishnumenon2684 added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jan 22, 2025
@rmarinho rmarinho added this to the .NET 9 SR3.1 milestone Jan 22, 2025
@rmarinho rmarinho added the potential-regression This issue described a possible regression on a currently supported version., verification pending label Jan 22, 2025
@PureWeen PureWeen removed the potential-regression This issue described a possible regression on a currently supported version., verification pending label Jan 22, 2025
@PureWeen PureWeen moved this from Todo to In Progress in MAUI SDK Ongoing Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView i/regression This issue described a confirmed regression on a currently supported version partner/syncfusion Issues / PR's with Syncfusion collaboration platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
Status: In Progress
7 participants