Repository navigation
Don't extract native defaults, meaning users can no longer reset a color back to a platform theme - #1485
Merged
Conversation
17 tasks
PureWeen
force-pushed
the
remove_auto_defaults
branch
from
July 1, 2021 20:07
79c207a to
19133bc
Compare
Redth
approved these changes
Jul 2, 2021
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Jul 8, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Jul 14, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Jul 16, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Jul 20, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Aug 4, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Aug 4, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Aug 9, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Aug 11, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
shyunMin
pushed a commit
to shyunMin/maui
that referenced
this pull request
Aug 22, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
shyunMin
pushed a commit
to shyunMin/maui
that referenced
this pull request
Aug 22, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Aug 23, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Aug 26, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Aug 31, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Sep 1, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Sep 2, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Sep 3, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
Csaba8472
added a commit
to Csaba8472/maui
that referenced
this pull request
Sep 6, 2021
* upstream/main: (270 commits) Automated dotnet-format update (dotnet#1533) Add tests for default colors (dotnet#1532) Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) Avoid show the virtual keyboard in the Android TimePicker (dotnet#1428) Implement VerticalTextAlignment in WinUI Label (dotnet#1479) Changes in the Gallery: include custom fonts, reorganize some pages, etc. (dotnet#1526) Don't pack and force a signing failure (dotnet#1527) [main] Update dependencies from xamarin/xamarin-android (dotnet#1443) Implements EntryHandler IsPassword in WinUI (dotnet#802) Automated dotnet-format update (dotnet#1523) [Build] Fix net6 Microsoft.Maui.Handlers.Benchmarks assembly (dotnet#1525) Update WinUI to 0.8 stable (dotnet#1522) Implement the basic WindowHandler (dotnet#1468) Automated dotnet-format update (dotnet#1510) Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) Avoid create a drawable to set the Background if is not necessary (dotnet#1504) Android Gestures (dotnet#1489) Revert to using Navigation Page Shims (dotnet#1495) Allow to navigate to the same item after navigate back (dotnet#1503) Automated dotnet-format update (dotnet#1499) ...
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Sep 7, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Sep 10, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Sep 23, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Sep 24, 2021
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Jan 19, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Jan 21, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Jan 27, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Feb 4, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Feb 8, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Feb 10, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Feb 21, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Feb 23, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Feb 25, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Feb 28, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Mar 2, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Mar 2, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Mar 3, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Mar 4, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Mar 7, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Mar 8, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Mar 8, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Mar 9, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Mar 10, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Mar 10, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Mar 10, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Mar 10, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
rookiejava
added a commit
to rookiejava/maui
that referenced
this pull request
Mar 11, 2022
- Modal Navigation Manager (dotnet#1563) - Implement the basic WindowHandler (dotnet#1468) - Don't extract native defaults, meaning users can no longer reset a color back to a platform theme (dotnet#1485) - Implement Alerts (Alert, Prompt and ActionSheet) (dotnet#1328) - And so on.
Merged
|
I seriously hope this change is just temporary and would be resolved in a better way before we hit general availability. Please, check the issue I have logged: #6183. The change introduces a major inconsistency between the platforms and the new behavior is rather unexpected, breaking dynamic style changes, VisualStateManager etc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
The change to Maui.Graphics caused us to get rid of
Color.Default. Since that point we've been discussing what should be the behavior of setting a Color to null.This PR gets rid of the ability for a user to reset a color back to whatever the platform theme defines
Xamarin.Forms Behavior
MAUI Behavior
Reading the platform defaults can be problematic for some cases and difficult to extract correctly. For example,
maui/src/Core/src/Platform/Android/SwitchExtensions.cs
Line 60 in d1823cd
For now we are going to operate on the premise that users don't use the behavior of
Color.Defaultenough to warrant the effort of implementation and the performance implications of pulling those values during startup.With .NET MAUI and multi-targeting it is also much easier to read values from the native platform so if a user wants the native defaults then they can tap into the handler property for that color and save off the default themselves
NOTE
Currently I've left the methods that we implemented to pull and set defaults. We can clean this up a later date. I didn't want to just remove that code in case parts of it are still useful. It's not reachable by the user so we don't need to worry about API breaks