KDS-588: migrate input fields to KDS components#160
KDS-588: migrate input fields to KDS components#160RainerSchmoeger wants to merge 3 commits intomasterfrom
Conversation
KDS-588 (InputField base component)
|
There was a problem hiding this comment.
Pull request overview
This PR migrates input field components from the legacy @knime/components library to the new @knime/kds-components library, standardizing the component naming and API usage across the codebase.
Changes:
- Replaced legacy input components (
InputField,NumberInput,Dropdown) with KDS equivalents (KdsTextInput,KdsNumberInput,KdsDropdown) - Standardized validation prop from
:is-validto:error="!isValid" - Removed
compactprop from all components
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/jsonforms/src/uiComponents/TextControl.vue | Migrated from InputField to KdsTextInput with updated validation prop |
| packages/jsonforms/src/uiComponents/SingleSelectControl.vue | Migrated from LoadingDropdown to KdsDropdown, corrected aria-label attribute |
| packages/jsonforms/src/uiComponents/OneOfDropdown.vue | Migrated from Dropdown to KdsDropdown |
| packages/jsonforms/src/uiComponents/NumberControlBase.vue | Migrated from NumberInput to KdsNumberInput, removed focusout logic, adjusted min/max handling |
| packages/jsonforms/src/uiComponents/DropdownControl.vue | Migrated from InputField and LoadingDropdown to KdsTextInput and KdsDropdown |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| :min="minParams?.min + (minParams.isExclusive ? stepSize : 0)" | ||
| :max="maxParams?.max - (maxParams.isExclusive ? stepSize : 0)" |
There was a problem hiding this comment.
The optional chaining on minParams?.min and maxParams?.max will result in NaN when these values are undefined (e.g., undefined + stepSize or undefined - stepSize). Consider adding explicit checks or default values to handle cases where min/max constraints are not defined.
| :min="minParams?.min + (minParams.isExclusive ? stepSize : 0)" | |
| :max="maxParams?.max - (maxParams.isExclusive ? stepSize : 0)" | |
| :min="minParams ? minParams.min + (minParams.isExclusive ? stepSize : 0) : undefined" | |
| :max="maxParams ? maxParams.max - (maxParams.isExclusive ? stepSize : 0) : undefined" |
| :id="labelForId" | ||
| v-model="modelValue" | ||
| :possible-values | ||
| :ariaLabel="control.label" |
There was a problem hiding this comment.
The attribute should be changed to :aria-label (kebab-case) to follow HTML standards. While Vue accepts camelCase props, aria attributes should use kebab-case for proper accessibility support.
KDS-588 (InputField base component)