-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fixed Footer not displayed at the Bottom When EmptyView in CV2 #28681
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
750e59c
Fixed Footer not displayed at the Bottom When EmptyView in CV2
Dhivya-SF4094 7b34650
Updated test sample with Background Color
Dhivya-SF4094 c363566
Updated fix for CV1
Dhivya-SF4094 3377c8d
Removed unwanted changes and updated screenshot
Dhivya-SF4094 39ed229
Added comment in test sample
Dhivya-SF4094 ceae532
Updated test sample
Dhivya-SF4094 e071c6e
Added snapshot for mac and WinUI
Dhivya-SF4094 a36061d
Re- Added mac snapshot
Dhivya-SF4094 62b905a
Update HeaderAndFooterShouldBeVisible.png
Dhivya-SF4094 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| using System.Collections.ObjectModel; | ||
|
|
||
| namespace Maui.Controls.Sample.Issues; | ||
| [Issue(IssueTracker.Github, 28604, "Footer Not Displayed at the Bottom When EmptyView is Active in CV2", PlatformAffected.iOS)] | ||
| public class Issue28604 : ContentPage | ||
| { | ||
| private CollectionViewViewModel ViewModel; | ||
|
|
||
| public Issue28604() | ||
| { | ||
| ViewModel = new CollectionViewViewModel(); | ||
| BindingContext = ViewModel; | ||
|
|
||
| var grid = new Grid(); | ||
|
|
||
| var collectionView = new CollectionView2 | ||
| { | ||
| AutomationId = "CollectionView", | ||
| ItemsSource = ViewModel.ItemList, | ||
| EmptyView = "EmptyView", | ||
| Background = Colors.AliceBlue, | ||
| Header = new VerticalStackLayout | ||
| { | ||
| BackgroundColor = Colors.Red, | ||
| Children = | ||
| { | ||
| new Label | ||
| { | ||
| Text = "Header", | ||
| FontAttributes = FontAttributes.Bold | ||
| } | ||
| } | ||
| }, | ||
| Footer = new VerticalStackLayout | ||
| { | ||
| BackgroundColor = Colors.Yellow, | ||
| Children = | ||
| { | ||
| new Label | ||
| { | ||
| Text = "Footer", | ||
| FontAttributes = FontAttributes.Bold | ||
| } | ||
| } | ||
| } | ||
| }; | ||
| grid.Children.Add(collectionView); | ||
|
|
||
| Content = grid; | ||
| } | ||
| } | ||
|
|
||
| public class CollectionViewViewModel | ||
| { | ||
| public ObservableCollection<string> ItemList { get; set; } | ||
|
|
||
| public CollectionViewViewModel() | ||
| { | ||
| ItemList = new ObservableCollection<string>(); | ||
| } | ||
| } | ||
Binary file added
BIN
+9.24 KB
...ts/TestCases.Mac.Tests/snapshots/mac/FooterShouldDisplayAtBottomOfEmptyView.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28604.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #if !ANDROID // this test case is ignored in android, as it has incositent scrolling behavior while using emptyView as string. https://github.com/dotnet/maui/issues/28765 | ||
| using NUnit.Framework; | ||
| using UITest.Appium; | ||
| using UITest.Core; | ||
|
|
||
| namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
|
|
||
| public class Issue28604 : _IssuesUITest | ||
| { | ||
| public Issue28604(TestDevice testDevice) : base(testDevice) | ||
| { | ||
| } | ||
| public override string Issue => "Footer Not Displayed at the Bottom When EmptyView is Active in CV2"; | ||
|
|
||
| [Test] | ||
| [Category(UITestCategories.CollectionView)] | ||
| public void FooterShouldDisplayAtBottomOfEmptyView() | ||
| { | ||
| App.WaitForElement("CollectionView"); | ||
| VerifyScreenshot(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jsuarezruiz Added the images. |
||
| } | ||
| } | ||
| #endif | ||
Binary file added
BIN
+6.48 KB
...tCases.WinUI.Tests/snapshots/windows/FooterShouldDisplayAtBottomOfEmptyView.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+22.4 KB
...ts/TestCases.iOS.Tests/snapshots/ios/FooterShouldDisplayAtBottomOfEmptyView.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+645 Bytes
(100%)
...rols/tests/TestCases.iOS.Tests/snapshots/ios/HeaderAndFooterShouldBeVisible.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

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 set the BackgroundColor? In this way, we not only verify the position of the header/footer, also the size with the snapshot comparison.
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.
@jsuarezruiz Updated test sample.