Skip to content

Fix BoxView not rendering when is hidden on start#21960

Merged
PureWeen merged 2 commits into
dotnet:mainfrom
kubaflo:boxview-hotfix
Dec 6, 2024
Merged

Fix BoxView not rendering when is hidden on start#21960
PureWeen merged 2 commits into
dotnet:mainfrom
kubaflo:boxview-hotfix

Conversation

@kubaflo

@kubaflo kubaflo commented Apr 20, 2024

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

/azp run

@jsuarezruiz jsuarezruiz added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Apr 22, 2024
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

Comment thread src/Controls/src/Core/BoxView/BoxView.cs
@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

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

if(propertyName == IsVisibleProperty.PropertyName)

Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread src/Controls/tests/UITests/Tests/Issues/Issue19926.cs
@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

@jsuarezruiz

Copy link
Copy Markdown
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
Copy Markdown
Contributor

/rebase

@jsuarezruiz

Copy link
Copy Markdown
Contributor

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 3 pipeline(s).

@jsuarezruiz jsuarezruiz left a comment

Copy link
Copy Markdown
Contributor

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

kubaflo commented Nov 13, 2024

Copy link
Copy Markdown
Contributor Author

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

kubaflo commented Nov 13, 2024

Copy link
Copy Markdown
Contributor Author

@jsuarezruiz could you /azp pls?

@PureWeen

PureWeen commented Dec 4, 2024

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
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
@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