Skip to content

Conversation

@jfversluis
Copy link
Member

@jfversluis jfversluis commented Apr 2, 2025

Description of Change

Reverts #20154 since it caused unexpected behavior for a lot of folks.

Reverting now and then improve on this and try again at a later stage.

Fixes #28677
Fixes #28415

cc: @kubaflo

@jfversluis jfversluis added the area-controls-general General issues that span multiple controls, or common base classes such as View or Element label Apr 2, 2025
Copilot AI review requested due to automatic review settings April 2, 2025 16:03
@jfversluis jfversluis requested a review from a team as a code owner April 2, 2025 16:03
@jfversluis jfversluis added this to the .NET 9 SR5.1 milestone Apr 2, 2025
@jfversluis jfversluis added the p/0 Current heighest priority issues that we are targeting for a release. label Apr 2, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR reverts a previous change that affected the propagation of visibility to child controls. The key changes include:

  • Reverting assertions and behavior related to visibility propagation in both test and production code.
  • Removing tests that validate the propagation of the IsVisible property.
  • Simplifying the VisualElement implementation by eliminating custom propagation logic.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/Controls/tests/Xaml.UnitTests/Issues/Issue1549.cs Added an assertion on InvertBoolenConverter.count to reflect the reverted behavior
src/Controls/tests/Core.UnitTests/VisualElementTests.cs Removed tests validating visibility propagation to child controls
src/Controls/src/Core/VisualElement/VisualElement.cs Removed property propagation calls and helper methods related to IsVisible
Comments suppressed due to low confidence (3)

src/Controls/tests/Xaml.UnitTests/Issues/Issue1549.cs:192

  • Please confirm that the assertion expecting InvertBoolenConverter.count to be 4 is stable given the revert; if this value is based on prior behavior, a brief code comment explaining the expected count would help avoid future confusion.
Assert.AreEqual(4, InvertBoolenConverter.count);

src/Controls/tests/Core.UnitTests/VisualElementTests.cs:317

  • The tests for propagating visibility to child controls have been removed as part of the revert; please ensure that equivalent coverage is maintained in TestCases.HostApp and TestCases.Shared.Tests if this behavior is revisited in future releases.
[Fact] public void ShouldPropagateVisibilityToChildren() { ... }

src/Controls/src/Core/VisualElement/VisualElement.cs:1501

  • The removal of the IsVisible property propagation call in OnIsVisibleChanged aligns with the revert; please double-check that this change does not disrupt any internal state updates expected by the existing test suite.
(this as IPropertyPropagationController)?.PropagatePropertyChanged(IsVisibleProperty.PropertyName);

@PureWeen PureWeen moved this from Todo to Ready To Review in MAUI SDK Ongoing Apr 3, 2025
@PureWeen
Copy link
Member

PureWeen commented Apr 8, 2025

/rebase

@PureWeen
Copy link
Member

PureWeen commented Apr 8, 2025

/backport to release/9.0.1xx-sr5

@github-actions
Copy link
Contributor

github-actions bot commented Apr 8, 2025

Started backporting to release/9.0.1xx-sr5: https://github.com/dotnet/maui/actions/runs/14342767821

@PureWeen
Copy link
Member

PureWeen commented Apr 8, 2025

  • failing tests are unrelated

@PureWeen PureWeen merged commit 6ff7573 into main Apr 8, 2025
126 of 128 checks passed
@PureWeen PureWeen deleted the revert-20154 branch April 8, 2025 22:15
@github-project-automation github-project-automation bot moved this from Ready To Review to Done in MAUI SDK Ongoing Apr 8, 2025
@bhavanesh2001
Copy link
Contributor

@jfversluis Since the original PR was reverted, should the bugs it was meant to fix be reopened?

@github-actions github-actions bot locked and limited conversation to collaborators May 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-general General issues that span multiple controls, or common base classes such as View or Element p/0 Current heighest priority issues that we are targeting for a release.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Visibility Property Not Updating as Expected in .NET MAUI [9.0.50] CollectionView display is broken when setting IsVisible after items are added

4 participants