-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Windows] Fixed Margin Not Applied to Shell Flyout Template Items on First Display #27060
base: main
Are you sure you want to change the base?
Conversation
Hey there @prakashKannanSf3972! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
@dotnet-policy-service agree company="Syncfusion, Inc." |
/rebase |
534b265
to
290749b
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
|
||
[Test] | ||
[Category(UITestCategories.Shell)] | ||
public void VerifyTemplateViewMarginOnInitialDisplay() |
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.
The test is failing on Windows:
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2163
at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2180
at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 665
at Microsoft.Maui.TestCases.Tests.Issues.Issue18423.VerifyTemplateViewMarginOnInitialDisplay() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18423.cs:line 19
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
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.
The test is failing on Windows:
System.TimeoutException : Timed out waiting for element... at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2163 at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2180 at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 665 at Microsoft.Maui.TestCases.Tests.Issues.Issue18423.VerifyTemplateViewMarginOnInitialDisplay() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18423.cs:line 19 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
@jsuarezruiz , Thank you for pointing this out. Addressed the issue by updating the test logic and believe it will not fail in the next CI run.
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.
Nice, thanks. The Windows snapshot is pending, could you commit it? Available in the latest build.
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
|
||
[Test] | ||
[Category(UITestCategories.Shell)] | ||
public void VerifyTemplateViewMarginOnInitialDisplay() |
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.
Nice, thanks. The Windows snapshot is pending, could you commit it? Available in the latest build.
Root Cause
The ActualWidth value is checked before it is updated, as it only reflects the correct value after the ArrangeOverride method completes. This premature check returns zero, preventing proper arrangement of the item view, as necessary values are not passed during the initial layout phase.
Description of Change
The ArrangeOverride method was updated to execute arrangement logic only when finalSize has valid dimensions. This prevents layout issues caused by invalid sizes and ensures proper arrangement of the view. If these conditions are not met, the base implementation is used as a fallback.
Issues Fixed
Fixes #18423
Tested the behaviour in the following platforms
Output
Before-Fix.mp4
After-Fix.mp4