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

Include headers/footers in EmptySource count so they show up when ItemsSource is null #15979

Merged
merged 2 commits into from
Jul 10, 2023

Conversation

hartez
Copy link
Contributor

@hartez hartez commented Jul 3, 2023

Description of Change

The EmptySource on Android is aware of the header and footer, but doesn't include them in the Count. Which means that the adapters don't know to display them when the ItemSource is null.

This change adjusts the reported Count from EmptySource to account for the presence of the header and footer.

This is an alternate (and more correct) solution to #15688.

Issues Fixed

Fixes #8934

@jsuarezruiz jsuarezruiz added the area-controls-collectionview CollectionView, CarouselView, IndicatorView label Jul 4, 2023
Copy link
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

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

Can we add some additional tests that would cover the case(s) found by the legacy gallery?

@mattleibow
Copy link
Member

/rebase

@mattleibow
Copy link
Member

I see the less correct #15688 is merged... yuet no conflicts even since it touches the same files...

@mattleibow
Copy link
Member

mattleibow commented Jul 5, 2023

I see it was reverted actually: #15886

This is the issue that Shane was referring to: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=7979402&view=ms.vss-test-web.build-test-results-tab

Screenshot 2023-07-05 at 9 47 13 PM

@hartez
Copy link
Contributor Author

hartez commented Jul 5, 2023

Can we add some additional tests that would cover the case(s) found by the legacy gallery?

Aren't they covered by the legacy gallery tests?

@PureWeen
Copy link
Member

PureWeen commented Jul 7, 2023

Can we add some additional tests that would cover the case(s) found by the legacy gallery?

Aren't they covered by the legacy gallery tests?

We only run these tests on the main/feature branches. Ideally, we'll grow enough coverage inside our new appium tests/device tests (which run on every PR) that we can eventually just obsolete our legacy gallery tests once we feel that we've pretty much reached coverage parity.

@jsuarezruiz jsuarezruiz requested a review from PureWeen July 10, 2023 14:53
@PureWeen PureWeen merged commit b9f64e1 into main Jul 10, 2023
@PureWeen PureWeen deleted the fix-8934 branch July 10, 2023 14:55
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2023
@samhouts samhouts added the fixed-in-8.0.0-preview.7.8842 Look for this fix in 8.0.0-preview.7.8842! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView fixed-in-8.0.0-preview.7.8842 Look for this fix in 8.0.0-preview.7.8842!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collection View Header and Empty View not showing on Android when ItemSource is null
6 participants