-
Notifications
You must be signed in to change notification settings - Fork 468
Remove BindablePropertyAttribute.DefaultValue
#2995
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
Draft
TheCodeTraveler
wants to merge
33
commits into
main
Choose a base branch
from
Remove-`BindablePropertyAttribute.DefaultValue`
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Remove BindablePropertyAttribute.DefaultValue
#2995
TheCodeTraveler
wants to merge
33
commits into
main
from
Remove-`BindablePropertyAttribute.DefaultValue`
Conversation
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
Co-authored-by: Copilot <[email protected]>
…ui into feature/bp-sourcegen-init
…nly BindableProperty. Extend unit test.
…alizer implementation.
…tDefaultValueCreatorMethodName method)
…faultValueCreatorMethodName for clarity
…eratesCorrectCode
…fault_GeneratedCodeDefaultsToUseDefaultValueCreatorMethod`
Member
|
Do we want to add tests for most common system types that we will see used? Like |
This reverts commit b84522e.
…ps://github.com/CommunityToolkit/Maui into Remove-`BindablePropertyAttribute.DefaultValue`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
This PR removes the
DefaultValueproperty from[BindableProperty]for the following reasons now that it is not longer required thanks to #2987:DefaultValuehas been the largest source of pain and workarounds inBindablePropertySourceGeneratorDefaultValueproperty only supported compile-time constants, while partial property initializer can use static readonly values[BindableProperty(DefaultValue = Colors.Transparent)]would generate a compiler error becauseColors.Transparentispublic static readonlyBindablePropertyAttribute.DefaultValue, we would need to write an additional Analyzer to generate a compiler error when we detect a developer is using bothDefaultValueand the partial property initializerPR Checklist
mainat time of PRAdditional information
This PR is dependent on #2987 and should not be merged before merging #2987