Skip to content

Conversation

@tcrundall-tng
Copy link
Collaborator

@tcrundall-tng tcrundall-tng commented Dec 10, 2025

UIEXT-2930 (Add configurable step size to NumberInputWidget)

This PR replaces one made from a fork, in order to allow(?) sonarqube analysis.

UIEXT-2930 (Add configurable step size to NumberInputWidget)
UIEXT-2930 (Add configurable step size to NumberInputWidget)
Copilot AI review requested due to automatic review settings December 10, 2025 16:02
@tcrundall-tng tcrundall-tng requested review from a team as code owners December 10, 2025 16:02
@changeset-bot
Copy link

changeset-bot bot commented Dec 10, 2025

🦋 Changeset detected

Latest commit: d10ff14

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@knime/components Patch
@knime/jsonforms Patch
@knime/hub-features Patch
@knime/rich-text-editor Patch
@knime/ui-extension-renderer Patch
@knime/virtual-tree Patch
demo Patch

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

Copy link

Copilot AI left a 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 stepSize option to the UI schema in NumberControlBase
  • Introduces a step prop 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) {
Copy link

Copilot AI Dec 10, 2025

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.

Copilot uses AI. Check for mistakes.
UIEXT-2930 (Add configurable step size to NumberInputWidget)
@tcrundall-tng tcrundall-tng force-pushed the enh/UIEXT-2930-make-number-widget-stepsize-configurable branch from 6b9e325 to d10ff14 Compare December 11, 2025 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants