-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
Scenes - decimals in the "continue only if" block #1683
Scenes - decimals in the "continue only if" block #1683
Conversation
Codecov ReportBase: 97.27% // Head: 97.27% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## master #1683 +/- ##
=======================================
Coverage 97.27% 97.27%
=======================================
Files 643 643
Lines 9686 9686
=======================================
Hits 9422 9422
Misses 264 264 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
Some comments here 😉
front/src/routes/scene/edit-scene/actions/only-continue-if/Condition.jsx
Outdated
Show resolved
Hide resolved
front/src/routes/scene/edit-scene/actions/only-continue-if/Condition.jsx
Outdated
Show resolved
Hide resolved
Thank you Alex, I will make the change. I have also changed the event to onBlur ( lost focus) because on change with actual if statement prevent decimal input (dot). With only parsefloat I can revert to onChange, I don't know what is the best. |
onBlur forces the user to leave the field for updates to be taken into account. |
@atrovato I've tested with "enter key" and focus is not lost and even if I hit save button on scene, new value is handled. parseFloat(1.) = 1 => impossible to input decimal separator onChange handle need to implement this kind of condition to prevent the behavior. if (e.target.value.charAt(str.length - 1) === '.') {
return;
} But In that condition we need need an input validator because if user set |
Do I understand everything is alright? |
With onBlur => Yes |
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.
Ok :)
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.
EDIT: Deleting my previous message, it works!! Issue on my side :)
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.
Good for me, it works fine in the UI and it works fine with a real device / real scene!
Thanks for this PR 🙏
PS: forget my previous review, I messed up my test ^^
Job #995: Bundle Size — 7.01MiB (~-0.01%).
Metrics (2 changes)
Total size by type (1 change)
|
FIX #1585