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

feat(itemspresenter): add support for footer and header, as well as irregular snap points #13507

Merged
merged 22 commits into from
Sep 18, 2023

Conversation

ramezgerges
Copy link
Contributor

@ramezgerges ramezgerges commented Sep 5, 2023

GitHub Issue (If applicable): closes #10745, closes #13248

PR Type

What kind of change does this PR introduce?

  • Feature

What is the current behavior?

What is the new behavior?

Copilot Summary

🤖 Generated by Copilot at 10f86b8

This pull request improves the StackPanel and ItemsPresenter controls in Uno Platform by fixing snap point calculation, adding header and footer support, and increasing test coverage. It also simplifies the use of the WindowHelper class in the StackPanel unit tests and refactors some common code.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

@ramezgerges ramezgerges changed the title Header footer presenter feat(itemspresenter): add support for footer and header, as well as irregular snap points Sep 5, 2023
@github-actions github-actions bot added platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/macos 🍏 Categorizes an issue or PR as relevant to the macOS platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform labels Sep 5, 2023
@ramezgerges ramezgerges force-pushed the header_footer_presenter branch from d9fea0e to 7964d01 Compare September 5, 2023 21:20
@ramezgerges ramezgerges marked this pull request as ready for review September 5, 2023 22:29
@github-actions github-actions bot added area/build Categorizes an issue or PR as relevant to build infrastructure area/automation Categorizes an issue or PR as relevant to project automation labels Sep 6, 2023
src/Uno.UI.Tests/Windows_UI_Xaml/Given_Window.cs Outdated Show resolved Hide resolved
src/Uno.UI.Tests/Windows_UI_Xaml/Given_Window.cs Outdated Show resolved Hide resolved
src/Uno.UI/UI/Xaml/Controls/ItemsControl/ItemsControl.cs Outdated Show resolved Hide resolved
src/Uno.UI/UI/Xaml/Controls/ItemsControl/ItemsControl.cs Outdated Show resolved Hide resolved
src/Uno.UI/UI/Xaml/Media/VisualTreeHelper.cs Outdated Show resolved Hide resolved
src/Uno.UI/UI/Xaml/Media/VisualTreeHelper.cs Outdated Show resolved Hide resolved
src/Uno.UI/UI/Xaml/Media/VisualTreeHelper.cs Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the area/automation Categorizes an issue or PR as relevant to project automation label Sep 9, 2023
@ramezgerges ramezgerges force-pushed the header_footer_presenter branch 3 times, most recently from 481bb93 to 807f9a8 Compare September 10, 2023 13:48
Copy link
Member

@jeromelaban jeromelaban left a comment

Choose a reason for hiding this comment

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

Small changes remaining, but looks good!

@jeromelaban
Copy link
Member

Very nice! There are a few tests like

[ActivePlatforms(Platform.Android)] // Fails on iOS - https://github.com/unoplatform/uno/issues/1955
that could benefit from being enabled for wasm. Could you take a look?

@github-actions github-actions bot added the area/automation Categorizes an issue or PR as relevant to project automation label Sep 13, 2023
@ramezgerges ramezgerges force-pushed the header_footer_presenter branch from d0c3466 to ffe314b Compare September 13, 2023 22:30
@jeromelaban
Copy link
Member

@ramezgerges There's one test that fails:

https://dev.azure.com/uno-platform/Uno%20Platform/_TestManagement/Runs?runId=2508900&_a=resultSummary&resultId=100001

ListView_ExpandableItemLarge_ExpandHeader_Validation

ImageAssert.AreEqual @ line 326
pixelTolerance: Color Cumulative tolerance of 5 | Location PerRange tolerance of 0,0 pixels.
expected: Initial State (ListView_ExpandableItemLarge_ExpandHeader_Validation_Initial_State.png 1024x768) in {X=0,Y=0,Width=1024,Height=768}
actual  : Collapsed State (ListView_ExpandableItemLarge_ExpandHeader_Validation_Collapsed_State.png 1024x768) in {X=0,Y=0,Width=1024,Height=768}
====================
Initial State:
132,68: expected: [132,68] FF333333 | actual: [132,68] FF000000
	a tolerance of 153 [Cumulative] would be required for this test to pass.
	Current: Color Cumulative tolerance of 5 | Location PerRange tolerance of 0,0 pixels.


With expectedRect:
{X=0,Y=0,Width=2147483647,Height=2147483647}
With actualRect:
{X=0,Y=0,Width=2147483647,Height=2147483647}
With expectedToActualScale:
1

@ramezgerges ramezgerges force-pushed the header_footer_presenter branch from 25f2fa9 to cf53928 Compare September 15, 2023 22:06
@ramezgerges ramezgerges force-pushed the header_footer_presenter branch from b75a3df to 0d8aa8c Compare September 15, 2023 22:47
@jeromelaban jeromelaban merged commit 3c93814 into unoplatform:master Sep 18, 2023
@ramezgerges ramezgerges deleted the header_footer_presenter branch September 18, 2023 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/automation Categorizes an issue or PR as relevant to project automation area/build Categorizes an issue or PR as relevant to build infrastructure platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform platform/macos 🍏 Categorizes an issue or PR as relevant to the macOS platform
Projects
None yet
3 participants