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

Android-.NET6-Style issue when changing the button status (disabled->enabled) #11336

Closed
jonmikeli opened this issue Nov 14, 2022 · 7 comments
Closed
Labels
area-controls-button Button, ImageButton platform/android 🤖 s/needs-info Issue needs more info from the author t/bug Something isn't working

Comments

@jonmikeli
Copy link

jonmikeli commented Nov 14, 2022

Description

Control

button

Issue description

The background color is not updated when changing the status of a button from disabled to enabled.
The button is clickable though.
Border and foreground (text) styles are updated properly.
If the view is reloaded, the background color is updated with the right style.

The status is updated through the "CanExecute" methods/properties of the RelayCommands bound to the control (MVVM Community Toolkit, 8.0.0).

Environment

.NET 6
Visual Studio 2022 (17.4)

Other

Additionally, other issues with style loading have been noticed with checkboxes. If you think the source of the issue might be different, I can create another issue.

Steps to Reproduce

  1. Create a MAUI project.
  2. Add a button (disabled by default).
  3. Customize the style (colors) for the enabled/disabled status.
  4. Add a View Model (MVVM Community Toolkit).
  5. Add a RelayCommand with a CanExecute method/property.
  6. Bind the command of the button to the previous RelayCommand.
  7. Update the status.

Link to public reproduction project repository

Not applicable

Version with bug

6.0.486

Last version that worked well

6.0.312

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

Android API 31+

Did you find any workaround?

No workaround but refreshing the view updates the style.

Relevant log output

No response

@jonmikeli jonmikeli added the t/bug Something isn't working label Nov 14, 2022
@jsuarezruiz jsuarezruiz added area-controls-button Button, ImageButton platform/android 🤖 s/needs-repro Attach a solution or code which reproduces the issue labels Nov 14, 2022
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Nov 14, 2022
@ghost
Copy link

ghost commented Nov 14, 2022

Hi @jonmikeli. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@jonmikeli
Copy link
Author

Hi,

Thank you for your message.

If possible, I would prefer to share the solution with the issue but through a private channel (ex: VS Report a problem).
The idea is to make this efficient and not too time-consuming.
Would it work for you?

Kind regards

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-repro Attach a solution or code which reproduces the issue labels Nov 14, 2022
@akhanalcs
Copy link

@jonmikeli I believe they're looking for a sample project where you can reproduce this issue.
So, please go ahead and create a project with your issue, upload that to a new GitHub repo and share the link of that repo here so they can help you better.

@jonmikeli
Copy link
Author

Hi @affableashish,

Yes, I get it. Just thought that sharing the true solution was probably the best way to be efficient (for everybody involved in this) and figure out what is wrong.

Taking problems with some level of complexity out of their context might require considerable effort to do it properly and without changing the potential source of the issue. I would not like to waste the time of the people who looks into this with inaccurate sample projects.

@PureWeen
Copy link
Member

@jonmikeli you can create a vsfeedback issue and attach a project there.

Did you also try on NET7?

@PureWeen PureWeen added s/needs-info Issue needs more info from the author and removed s/needs-attention Issue has more information and needs another look labels Nov 16, 2022
@ghost
Copy link

ghost commented Nov 16, 2022

Hi @jonmikeli. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@ghost ghost added the s/no-recent-activity Issue has had no recent activity label Nov 21, 2022
@ghost
Copy link

ghost commented Nov 21, 2022

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

@ghost ghost closed this as completed Nov 24, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Dec 24, 2022
@Eilon Eilon removed the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 10, 2024
@dotnet-policy-service dotnet-policy-service bot removed the s/no-recent-activity Issue has had no recent activity label May 10, 2024
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-button Button, ImageButton platform/android 🤖 s/needs-info Issue needs more info from the author t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants