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

Fix BoxView not rendering when is hidden on start #21960

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Apr 20, 2024

Description of Change

I observed that the BoxView did appear on the screen when the user changed the property IsVisible from false to true when IsVisible = false was set on the start.

This is a hotfix to this PR: #21322

Before After
before.mp4
fix.mp4

@kubaflo kubaflo requested a review from a team as a code owner April 20, 2024 18:25
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Apr 20, 2024
@jsuarezruiz
Copy link
Contributor

/azp run

@jsuarezruiz jsuarezruiz added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Apr 22, 2024
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).

propertyName == BackgroundProperty.PropertyName ||
propertyName == CornerRadiusProperty.PropertyName)
Handler?.UpdateValue(nameof(IShapeView.Shape));

if(propertyName == IsVisibleProperty.PropertyName)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Strangely enough, it is only necessary for Android. For iOS everything works with only updating Handler?.UpdateValue(nameof(IShapeView.Shape)); when the visibility changes

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@Eilon Eilon added area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter area-controls-boxview area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing and removed legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor area-controls-boxview labels May 11, 2024
@jsuarezruiz
Copy link
Contributor

@kubaflo Could you rebase?. I think this PR potentially could also fix #22897

@jsuarezruiz
Copy link
Contributor

/rebase

@PureWeen PureWeen modified the milestones: .NET 9 SR1, .NET 9 SR2 Nov 5, 2024
@dotnet dotnet deleted a comment from azure-pipelines bot Nov 8, 2024
@jsuarezruiz
Copy link
Contributor

/rebase

@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

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 test PropertiesShouldBeCorrectlyApplied is failing on Android with the changes:
image

Added a sample to UITest

Update BoxView.cs

Update Issue19926.cs
@kubaflo
Copy link
Contributor Author

kubaflo commented Nov 13, 2024

The test PropertiesShouldBeCorrectlyApplied is failing on Android with the changes: image

Yea, I've modified this test and was waiting for the snapshot. It will work now :)

@kubaflo
Copy link
Contributor Author

kubaflo commented Nov 13, 2024

@jsuarezruiz could you /azp pls?

@PureWeen
Copy link
Member

PureWeen commented Dec 4, 2024

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen dismissed jsuarezruiz’s stale review December 6, 2024 22:09

Changes addressed

@PureWeen PureWeen merged commit 096ae74 into dotnet:main Dec 6, 2024
100 of 104 checks passed
@samhouts samhouts added fixed-in-9.0.21 fixed-in-net8.0-nightly This may be available in a nightly release! labels Dec 16, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jan 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-drawing Shapes, Borders, Shadows, Graphics, BoxView, custom drawing area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter community ✨ Community Contribution fixed-in-9.0.21 fixed-in-net8.0-nightly This may be available in a nightly release!
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants