-
Notifications
You must be signed in to change notification settings - Fork 87
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
InlineParameterEditor: fix it being impossible to write '0.001' #3123
InlineParameterEditor: fix it being impossible to write '0.001' #3123
Conversation
Reviewer's Guide by SourceryThe pull request modifies the InlineParameterEditor component to correctly handle numerical inputs, specifically addressing an issue where writing small decimal values like '0.001' was not possible due to eager conversion. It introduces a new variable to manage the input as a string, parsing it to a float upon input. Sequence diagram for number input handling in InlineParameterEditorsequenceDiagram
actor User
participant Input as Number Input Field
participant Component as InlineParameterEditor
User->>Input: Types '0.001'
Input->>Component: @input event
Component->>Component: parseFloat(internal_new_value_as_string)
Note right of Component: Converts string to number
Component->>Component: Updates internal_new_value
State diagram for number input handlingstateDiagram-v2
[*] --> StringInput: User types number
StringInput --> NumberValue: parseFloat()
NumberValue --> ValidatedValue: Range & Type validation
ValidatedValue --> [*]: Update parameter
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @Williangalvani - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
v-model.number
attempts to convert number too eagerly. this fixes itSummary by Sourcery
Bug Fixes: