-
Notifications
You must be signed in to change notification settings - Fork 133
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
fix : dot removing when last digit is erased #550
base: master
Are you sure you want to change the base?
fix : dot removing when last digit is erased #550
Conversation
@DylanFlandrin is attempting to deploy a commit to the Team Bearstudio Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe changes modify the Changes
Assessment against linked issues
The changes appear to be a step towards addressing the issue, but a comprehensive test of the exact scenario described would be needed to confirm full resolution. The introduction of Note: No sequence diagram is generated as the changes are primarily focused on state management and do not introduce a significant new control flow. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/components/InputNumber/index.tsx (2)
81-81
: Consider a default string value for improved consistency.While initializing
rawInput
asundefined
is valid, you might consider defaulting to""
(an empty string) for clarity, ensuring consistent usage in other parts of the app that expect a string and notundefined
.
124-124
: Ensure fallback logic forvalue
remains user-friendly.Your fallback to
rawInput ?? (value === undefined ? undefined : value ?? '')
is thorough. Still, test scenarios wherevalue
isnull
or uninitialized to confirm that the display remains intuitive (not reverting to an empty string if the user expects a decimal point or partially typed value).
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/components/InputNumber/index.tsx
(3 hunks)
🔇 Additional comments (1)
src/components/InputNumber/index.tsx (1)
108-108
: Validate special numeric edge cases.
Storing values.value
in rawInput
works well to preserve the decimal point. However, verify edge cases such as negative zero (-0
), partial decimal inputs (e.g., just typing "."
), and localizations with unconventional decimal separators. Ensuring these corner cases are handled consistently will avert unintended reformatting.
Quality Gate passedIssues Measures |
Describe your changes
closes #522
I stored the string version of my value to keep the dot on display and make it priority on value formatted
Screenshots
(can't see my cursor because of the recorder, but Im just clicking away, it formatting itself)
Screencast.from.2024-12-26.14-17-40.webm
Checklist
pnpm storybook
command and everything is workingSummary by CodeRabbit
New Features
InputNumber
component to maintain a separate representation of raw input values.Bug Fixes