-
Notifications
You must be signed in to change notification settings - Fork 12
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
Handle invalid numeric inputs for props to avoid crash #115
Merged
roni-castro-shipt
merged 54 commits into
shipt:support/Roni/CU-86b39mr3a/handle-invalid-numeric-inputs
from
roni-castro-shipt:support/handle-invalid-numeric-inputs
Jan 31, 2025
Merged
Handle invalid numeric inputs for props to avoid crash #115
roni-castro-shipt
merged 54 commits into
shipt:support/Roni/CU-86b39mr3a/handle-invalid-numeric-inputs
from
roni-castro-shipt:support/handle-invalid-numeric-inputs
Jan 31, 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
70987ad
to
6dbc63e
Compare
6dbc63e
to
e1c5b80
Compare
e1c5b80
to
13927ac
Compare
Ensure invalid segments are returned in their original order. Default values remain unchanged.
This reverts commit 6fa53ae.
b38429b
to
057a3c3
Compare
057a3c3
to
3c68380
Compare
This reverts commit 392e81b.
0c0d608
to
6143470
Compare
9a2eb96
into
shipt:support/Roni/CU-86b39mr3a/handle-invalid-numeric-inputs
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.
WIP - It depends on another PR code
Description
Currently, if NaN is passed for numeric props, the app crashes.
Solution
Ensure that all numeric properties are parsed before use. If the parsed value results in NaN, revert to the default value for that property and issue a warning that an invalid value was provided and its value was changed to the default one. If the value is valid, maintain the existing behavior and don't show warning
Screenshots
Android
before_android_fillValue_NaN.mp4
after_android_fillValue_NaN.mp4
iOS
before_android_fillValue_NaN.mp4
after_ios_fillValue_NaN.mp4
No warnings if props if some props are not passed and are numeric
Warnings shown only once
warnings_for_invalid_props_shown_once.mp4