-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Use data type configuration to determine default value for empty toggle and slider property values #17854
Merged
nikolajlauridsen
merged 7 commits into
v15/dev
from
v15/bugfix/handle-default-value-for-true-false
Jan 8, 2025
Merged
Use data type configuration to determine default value for empty toggle and slider property values #17854
nikolajlauridsen
merged 7 commits into
v15/dev
from
v15/bugfix/handle-default-value-for-true-false
Jan 8, 2025
Conversation
This file contains 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
Fixes #17833 |
…and aligned implementation of true/false with this.
AndyButland
changed the title
Use data type configuration to determine default value for empty toggle property values.
Use data type configuration to determine default value for empty toggle and slider property values
Jan 3, 2025
I found a similar issue raised for the slider property editor, so have fixed that in a similar way as part of this PR. |
AndyButland
commented
Jan 3, 2025
…peInfoResolver for data type configuration so we can re-use the existing ConfigurationField attributes.
nikolajlauridsen
approved these changes
Jan 8, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, and tests good, I did a very minor cleanup renaming a variable, hope that's okay 🙏
nikolajlauridsen
deleted the
v15/bugfix/handle-default-value-for-true-false
branch
January 8, 2025 10:42
This was referenced Jan 8, 2025
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.
Prerequisites
Fixes #17833, tracked under AB 45702 (internal HQ tracker)
Also Fixes #17099, tracked under AB 47510
Description
Reported issue: For toggle properties set to the initial value of true, this is not working. The value is stored as false even though it is displayed as “on” in the UI.
Background: If the user does not interact with a Property Editor, we do not store anything.
This is how the Client works as of v.14, and this plays well with the fact that we do not render Property Editors that the user haven't navigated to, meaning we do not guarantee that the Property Editor UI would be available to set an initial(default) value.
In other words, Default Values should be set by the server.
Reproduction:
With this PR I've added a check for null values in the property value converter, when, if found, the default value from the data type configuration will be used.
To Test: