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

Reset opacity when view is being reused #22820

Merged
merged 1 commit into from
Jun 4, 2024
Merged

Reset opacity when view is being reused #22820

merged 1 commit into from
Jun 4, 2024

Conversation

PureWeen
Copy link
Member

@PureWeen PureWeen commented Jun 4, 2024

Description of Change

The DrawerLayout currently recreates its details view whenever it's navigated back to. In the case where you are nesting a FlyoutPage inside a NavigationPage, this causes a double animation to occur which leaves the opacity of the view set to zero. When android is processing an animation it sets the alpha of a view to zero

image

And then when it's done it sets it back to 1, the problem we're hitting is that the second animation is starting before the first one finishes, so, the second animation thinks it needs to use "0" as the "initial" alpha value.

Ideally, we will fix DrawerLayout to just reuse its view opposed to creating a new one but that's going to take a bit more of an effort, so, this should get us through until that can be reworked.

Issues Fixed

Fixes #19955

@PureWeen PureWeen requested a review from a team as a code owner June 4, 2024 10:14
App.Tap("NavigateToSecondPageButton");
App.WaitForElement("NavigateBackToFirstPageButton");
App.Tap("NavigateBackToFirstPageButton");
App.WaitForElement("NavigateToSecondPageButton");
Copy link
Member

Choose a reason for hiding this comment

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

How does WaitForElement test for visibility?

Copy link
Member Author

Choose a reason for hiding this comment

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

It looks like if the opacity is zero then appium can't find it.

I was curious about this as well :-)
If I remove my fix, the test fails, if I put the fix back, the test passes.

Copy link
Contributor

Choose a reason for hiding this comment

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

If the element is not visible on the screen, appium can't find it. So, it's valid. Just could be nice to include a comment here.

@mattleibow mattleibow merged commit 8e97f32 into main Jun 4, 2024
49 checks passed
@mattleibow mattleibow deleted the fix_19955 branch June 4, 2024 17:04
@github-actions github-actions bot locked and limited conversation to collaborators Jul 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flyout doesn't load the page after navigating back
4 participants