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

Applying visibility change to child controls #20154

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Jan 25, 2024

Description of Change

Applying visibility change to child controls

Issues Fixed

Fixes #19139

Screen.Recording.2024-01-25.at.13.28.42.mov

@kubaflo kubaflo requested a review from a team as a code owner January 25, 2024 12:40
@ghost ghost added the community ✨ Community Contribution label Jan 25, 2024
@ghost
Copy link

ghost commented Jan 25, 2024

Hey there @kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@samhouts samhouts added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Jan 25, 2024
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.

@tj-devel709 Could we include a device or ui tests here?

Copy link
Member

@rmarinho rmarinho left a comment

Choose a reason for hiding this comment

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

This will need more description about the change and maybe some discussion first. I m not sure we want to add this to our public API.

Also this would need device and unit tests for the new api

@kubaflo
Copy link
Contributor Author

kubaflo commented Jan 28, 2024

@rmarinho there was a short discussion in this issue #19139
Hmmm if the changes of IsEnabled or Input transparent propagate to child controls then that should be the case with isVisible Of course it is my opinion and I'm happy to find out why it might not be a good idea.

I will write tests once there is a decision on whether this change makes sense or not.

@tj-devel709
Copy link
Member

I added this PR here to address specifically with the next entry capability. I don't think we will need this PR (in regards to the next entry issue), but it could possibly be helpful for a different scenario!

@mattleibow
Copy link
Member

This PR seems sensible, but both WPF and UWP chose not to propagate this value. So I am asking some teams why they decided this: dotnet/wpf#8774

Copy link
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

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

Looking good, we just need a bunch more tests for a good few combinations so we can ensure we don't break somerthing later on and all things stay working as expected.

src/Controls/tests/Core.UnitTests/GridTests.cs Outdated Show resolved Hide resolved
@mattleibow
Copy link
Member

Can you rebase?

@kubaflo kubaflo force-pushed the applying-visibility-change-to-child-controls branch from 90d5d80 to 1b85ac4 Compare February 5, 2024 19:12
kubaflo added a commit to kubaflo/maui that referenced this pull request Feb 6, 2024
@mattleibow
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@mattleibow
Copy link
Member

Now the question is... Is this a breaking change for a SR that means it should wait for net9.0? Or is it OK and people need to be aware of the change?

/// This method must always be called if some event occurs and the value of
/// the <see cref="IsVisibleCore"/> property will change.
/// </summary>
protected void RefreshIsVisibleProperty() =>
Copy link
Member

Choose a reason for hiding this comment

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

For a service release, maybe this should be protected internal for now. In net9.0 we can make it public.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it is a good idea

kubaflo added a commit to kubaflo/maui that referenced this pull request Feb 10, 2024
@kubaflo kubaflo force-pushed the applying-visibility-change-to-child-controls branch from b4370b4 to 549cd74 Compare February 10, 2024 00:33
@Eilon Eilon added area-controls-general General issues that span multiple controls, or common base classes such as View or Element and removed legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor labels May 13, 2024
@jsuarezruiz
Copy link
Contributor

@kubaflo Could you rebase and fix the conflicts?. Thanks.
Let me know if can help with something.

kubaflo added a commit to kubaflo/maui that referenced this pull request Jun 13, 2024
@kubaflo kubaflo force-pushed the applying-visibility-change-to-child-controls branch from 549cd74 to 5de6439 Compare June 13, 2024 00:02
@kubaflo
Copy link
Contributor Author

kubaflo commented Jun 13, 2024

@jsuarezruiz done :)

@kubaflo kubaflo changed the base branch from main to net9.0 September 1, 2024 00:19
kubaflo added a commit to kubaflo/maui that referenced this pull request Sep 1, 2024
@kubaflo kubaflo force-pushed the applying-visibility-change-to-child-controls branch from 5de6439 to cd85b97 Compare September 1, 2024 00:20
@kubaflo kubaflo force-pushed the applying-visibility-change-to-child-controls branch from cd85b97 to 6cafb41 Compare September 1, 2024 00:30
kubaflo added a commit to kubaflo/maui that referenced this pull request Sep 1, 2024
@rmarinho
Copy link
Member

Uff needs rebase again

@kubaflo kubaflo force-pushed the applying-visibility-change-to-child-controls branch from 6cafb41 to 67fee02 Compare September 15, 2024 18:40
kubaflo added a commit to kubaflo/maui that referenced this pull request Sep 15, 2024
@kubaflo
Copy link
Contributor Author

kubaflo commented Sep 15, 2024

@rmarinho rebased

@MartyIX
Copy link
Contributor

MartyIX commented Sep 25, 2024

A workaround for this issue might be to subscribe VisualElement.Unloaded event for visual elements.

It would be great to know if an element is visible or not though.

@kubaflo kubaflo force-pushed the applying-visibility-change-to-child-controls branch from 218ddbf to 33f73ee Compare November 15, 2024 10:02
@kubaflo kubaflo requested a review from a team as a code owner November 15, 2024 10:02
@MartyIX
Copy link
Contributor

MartyIX commented Nov 15, 2024

This PR should target main, or not?

@kubaflo kubaflo changed the base branch from net9.0 to main November 15, 2024 10:09
@mattleibow
Copy link
Member

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@mattleibow
Copy link
Member

Hmmm, the new api in there... Should that be internal for now and protected for net10?

@PureWeen @rmarinho

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-general General issues that span multiple controls, or common base classes such as View or Element community ✨ Community Contribution platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IsVisible false is not propagated to child controls
8 participants