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

[Android] Fix flyout behaviour switching exception #22453

Merged
merged 11 commits into from
Jun 25, 2024

Conversation

imuller
Copy link
Contributor

@imuller imuller commented May 16, 2024

Description of Change

Two issues where fixed in this PR:

  1. When you change the FlyoutBehavior the app crashes
  2. When you change the orientation on a tablet from portrait to landscape with the flyout open, the app crashes. Because the FlyoutBehavior changes

Issues Fixed

Fixes #20858
Fixes #18161

@imuller imuller requested a review from a team as a code owner May 16, 2024 13:15
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label May 16, 2024
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@imuller
Copy link
Contributor Author

imuller commented May 17, 2024

What to do with these failing tests?

@PureWeen
Copy link
Member

@imuller can you add UITests to this?

Here's an example
https://github.com/dotnet/maui/pull/22492/files
Here are some docs with info how to get the right bits installed
https://github.com/dotnet/maui/wiki/UITests

@imuller
Copy link
Contributor Author

imuller commented May 19, 2024

@PureWeen Can you check the added tests

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@imuller
Copy link
Contributor Author

imuller commented May 27, 2024

@jsuarezruiz Any idea why these tests are failing?

@imuller imuller requested a review from jsuarezruiz May 28, 2024 20:45
@imuller
Copy link
Contributor Author

imuller commented Jun 3, 2024

@jsuarezruiz @PureWeen When will this PR get approval?

@dotnet dotnet deleted a comment from azure-pipelines bot Jun 11, 2024
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@imuller
Copy link
Contributor Author

imuller commented Jun 12, 2024

@jsuarezruiz Can you re-run the tests. Should be fixed now.

@jsuarezruiz
Copy link
Contributor

jsuarezruiz commented Jun 12, 2024

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@imuller
Copy link
Contributor Author

imuller commented Jun 12, 2024

@jsuarezruiz @jfversluis It looks like other tests are failing, that does not has to do anything with this PR. What to do in this case?

@jsuarezruiz
Copy link
Contributor

@jsuarezruiz @jfversluis It looks like other tests are failing, that does not has to do anything with this PR. What to do in this case?

image
The added test is failing on Android and iOS, could you check it? Here the trace:

 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 804
   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 821
   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 316
   at Microsoft.Maui.TestCases.Tests.Issues.Issue20858.NoExceptionShouldBeThrown() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue20858.cs:line 21
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)

Let me know if can help with anything :)

Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

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

The change to fix the issue have sense to me, just the test seems to be failing. Could you take a look? Or just let me know if want me to take a look to it.

@imuller
Copy link
Contributor Author

imuller commented Jun 13, 2024

@jsuarezruiz If possible, can you take a look at the test? It's not clear to me why it's failing.

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@imuller imuller requested a review from jsuarezruiz June 19, 2024 11:25
PureWeen
PureWeen previously approved these changes Jun 21, 2024
Redth
Redth previously approved these changes Jun 21, 2024
@Redth
Copy link
Member

Redth commented Jun 21, 2024

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen enabled auto-merge (squash) June 21, 2024 18:26
@PureWeen PureWeen dismissed stale reviews from Redth and themself via 2725fe5 June 24, 2024 22:40
@PureWeen
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Member

@jfversluis jfversluis left a comment

Choose a reason for hiding this comment

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

Congratulations, you are now a contributor to .NET MAUI! Thank you for your efforts on this and the great collaboration!

@jfversluis jfversluis dismissed jsuarezruiz’s stale review June 25, 2024 08:55

Approved by 3 others and remarks have been fixed

@PureWeen PureWeen merged commit 1750736 into dotnet:main Jun 25, 2024
47 checks passed
@imuller imuller deleted the fix-20858-and-18161 branch June 25, 2024 09:00
mattleibow added a commit that referenced this pull request Jul 1, 2024
* Simplify Development.md (#23142)

* Simplify Development.md

* Update .github/DEVELOPMENT.md

Co-authored-by: Eilon Lipton <Eilon@users.noreply.github.com>

* Update .github/DEVELOPMENT.md

Co-authored-by: Eilon Lipton <Eilon@users.noreply.github.com>

* Update .github/DEVELOPMENT.md

Co-authored-by: Eilon Lipton <Eilon@users.noreply.github.com>

* Update .github/DEVELOPMENT.md

Co-authored-by: Eilon Lipton <Eilon@users.noreply.github.com>

* Update DEVELOPMENT.md

* - modify and move advanced tips to different file

* Update DEVELOPMENT.md

* Update .github/DEVELOPMENT.md

Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com>

* Update docs/DevelopmentTips.md

Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com>

* Update docs/DevelopmentTips.md

Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com>

* - updates based on review

---------

Co-authored-by: Eilon Lipton <Eilon@users.noreply.github.com>
Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com>

* Wire RefreshView up to our xplat layout workflow (#23169) (#23218)

* Use better layout/measure path with refreshview

* - fix naming

* - set RefreshView content to maui compatible container

* - add test

* - fix null operator

* Update Issue23029.xaml.cs

* - fix content panel so it removes previous content

* - add additional check

* Remove adding to FutureAccessList as the app is running with runFullTrust capability (#23047)

* Call base.OnResume if Existing NavigationFragment Early (#23187)

* VSCode no longer uses MAUI to launch (#23222)

* [Android] Fix flyout behaviour switching exception (#22453)

* Fix flyout behaviour switching exception

* Tests added

* Flyout test page added

* Flyoutpage test fixes

* Flyout toggle test added

* Remove duplicate ] characters

* Flyout test pages added

* Check for platforms

* Fix title

* - fix tests

---------

Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com>
Co-authored-by: Shane Neuville <shneuvil@microsoft.com>

* Renamed the project because macOS uses .app (#23223)

* Renamed the project because macOS uses .app

* And the folder

* merge first

* ns

* Move tests to new location (#23251)

* Split SingleProject targets (#23269)

* Split SingleProject targets

* Update Microsoft.Maui.Controls.SingleProject.Before.targets

* Update bug-report.yml with 8.0.61 (#23273)

* Null terminate Page on TabbedRenderer (#23290)

Co-authored-by: Shane Neuville <shneuvil@microsoft.com>

* [Windows] Improve performance in accessibility extensions (#22698)

* AccessibilityExtensions: Add missing braces

* AccessibilityExtensions: Enable nullability and improve performance

* Update shipped & unshipped API

---------

Co-authored-by: Javier Suárez <javiersuarezruiz@hotmail.com>

* [Android] Avoid double event subscribes in gesture manager (#23242)

* [Android] Avoid double event subscribes in gesture manager

* Fix typo in test text

* Bump Microsoft.Web.WebView2 from 1.0.2151.40 to 1.0.2592.51 (#23209)

* [tests] test a lot more things in `MemoryTests.cs` (#23324)

* [tests] test a lot more things in `MemoryTests.cs`

This expands the tests to cover more controls and areas.

* Add test cases for more controls:

  * `Ellipse`
  * `Grid`
  * `Path`
  * `Line`
  * `Path`
  * `RadioButton`
  * `Rectangle`
  * `RoundRectangle`

* Expand tests for a couple controls:

    * `Border` has a `StrokeShape`
    * Any `TemplatedView` gets a `ControlTemplate`

* Re-enable `ListView` for Android

This should work now after merging:

* dotnet/android#8900
* #23120

* Add a complicated test case for `BindableLayout`

Similar to the case at:

* #23199

* Skip `ListView` on API 23

* Bump Appium version to 2.11 (#23337)

* Bump Appium version to 2.11

* Update CarouselViewUITests.UpdateCurrentItem.cs

* Update appium-install.ps1

* Update CarouselViewUITests.UpdateCurrentItem.cs

* Simplify `NavigationRootManager.Connect` on the Windows platform. (#23345)

* Simplify `NavigationRootManager.Connect` on the Windows platform.

* Use ternary operator syntax

* Removed extra tabs

* Moved `_disconnected = false;` to `if (_disconnected)`

* Bump Appium Drivers (#23349)

* Fix Merge

---------

Co-authored-by: Eilon Lipton <Eilon@users.noreply.github.com>
Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com>
Co-authored-by: MartyIX <203266+MartyIX@users.noreply.github.com>
Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
Co-authored-by: Thomas Muller <imuller@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Javier Suárez <javiersuarezruiz@hotmail.com>
Co-authored-by: Jonathan Dick <jodick@microsoft.com>
Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
Co-authored-by: Takym (たかやま) <15681312+Takym@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants