-
Notifications
You must be signed in to change notification settings - Fork 5
Enh/UI ext 2930 make number widget stepsize configurable #110
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
base: master
Are you sure you want to change the base?
Enh/UI ext 2930 make number widget stepsize configurable #110
Conversation
UIEXT-2930 (Add configurable step size to NumberInputWidget)
UIEXT-2930 (Add configurable step size to NumberInputWidget)
UIEXT-2930 (Add configurable step size to NumberInputWidget)
🦋 Changeset detectedLatest commit: d10ff14 The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Pull request overview
This PR adds configurable step size functionality to the NumberInputWidget, allowing developers to specify custom increment/decrement values instead of being limited to default steps (1 for integers, 0.1 for doubles).
- Adds a
stepSizeoption to the UI schema in NumberControlBase - Introduces a
stepprop in NumberInput component with validation to prevent zero values - Updates the increment/decrement logic to use dynamic scaling for precise floating-point arithmetic
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/jsonforms/src/uiComponents/NumberControlBase.vue | Implements configurable step size via UI schema options, updates references from constant to computed property |
| packages/components/src/components/forms/NumberInput/NumberInput.vue | Adds step prop and dynamic scaling logic to handle arbitrary step sizes with improved floating-point precision |
| packages/components/src/components/forms/NumberInput/tests/NumberInput.test.js | Adds comprehensive test coverage for the changeValue method with various step sizes and edge cases |
| .changeset/many-apes-appear.md | Documents the change for release notes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return this.type === "integer"; | ||
| }, | ||
| stepSize() { | ||
| if (this.step !== null && this.step !== 0) { |
Copilot
AI
Dec 10, 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.
The check this.step !== 0 is redundant since the prop validation already rejects zero values through the scaleFactor logic. If zero is invalid, consider adding explicit prop validation or removing this check for clarity.
UIEXT-2930 (Add configurable step size to NumberInputWidget)
6b9e325 to
d10ff14
Compare
UIEXT-2930 (Add configurable step size to NumberInputWidget)
This PR replaces one made from a fork, in order to allow(?) sonarqube analysis.