Enh/kds 791 use error message from component#320
Open
robin-gerling wants to merge 4 commits intomasterfrom
Open
Enh/kds 791 use error message from component#320robin-gerling wants to merge 4 commits intomasterfrom
robin-gerling wants to merge 4 commits intomasterfrom
Conversation
🦋 Changeset detectedLatest commit: b61c690 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
0ccaf10 to
f29e13b
Compare
f29e13b to
ae9aab7
Compare
There was a problem hiding this comment.
Pull request overview
Updates JSONForms control validation rendering to prefer KDS component sub-text for error display (where supported), while retaining the custom wrapper for controls that cannot show sub-text directly.
Changes:
- Add a shared helper (
getValidationSubText) and pass the last validation error intosub-textfor selected KDS-based controls (text/number/date-time format picker), with new/updated unit tests. - Extend
withLabelwith avalidationDisplayoption and update date/time renderers to explicitly use the custom error wrapper. - Minor layout/styling adjustments (label header sizing, description popover spacing, horizontal layout alignment tweak) plus a changeset for
@knime/jsonforms.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/jsonforms/src/uiComponents/tests/TextControl.test.ts | Adds messages to props and asserts last error is forwarded as KDS subText. |
| packages/jsonforms/src/uiComponents/tests/NumberControl.test.ts | Adds messages to props and asserts last error is forwarded as KDS subText. |
| packages/jsonforms/src/uiComponents/tests/IntegerControl.test.ts | Updates test props to include messages. |
| packages/jsonforms/src/uiComponents/tests/DateTimeFormatPickerControl.test.ts | Adds messages to props and asserts last error is forwarded as KDS subText. |
| packages/jsonforms/src/uiComponents/TextControl.vue | Computes and forwards validation sub-text to KdsTextInput. |
| packages/jsonforms/src/uiComponents/NumberControlBase.vue | Computes and forwards validation sub-text to KdsNumberInput. |
| packages/jsonforms/src/uiComponents/DateTimeFormatPickerControl.vue | Computes and forwards validation sub-text to KdsDateTimeFormatInput. |
| packages/jsonforms/src/renderers/zonedDateTimeRenderer.ts | Switches withLabel to validationDisplay: "customWrapper". |
| packages/jsonforms/src/renderers/localTimeRenderer.ts | Switches withLabel to validationDisplay: "customWrapper". |
| packages/jsonforms/src/renderers/localDateRenderer.ts | Switches withLabel to validationDisplay: "customWrapper". |
| packages/jsonforms/src/renderers/dateTimeRenderer.ts | Switches withLabel to validationDisplay: "customWrapper". |
| packages/jsonforms/src/renderers/checkboxRenderer.ts | Removes withErrorMessage wrapper around checkbox renderer. |
| packages/jsonforms/src/layoutComponents/HorizontalLayout.vue | Removes align-items rule from horizontal layout container. |
| packages/jsonforms/src/higherOrderComponents/control/withLabel.ts | Adds validationDisplay config and changes default validation wrapping behavior. |
| packages/jsonforms/src/higherOrderComponents/control/validation/util.ts | New helper to extract last validation error for sub-text. |
| packages/jsonforms/src/higherOrderComponents/control/errorMessage/withErrorMessage.ts | Broadens config typing (fill optional, includes validationDisplay). |
| packages/jsonforms/src/higherOrderComponents/control/tests/withLabel.test.ts | Updates expectations now that messages are passed through. |
| packages/jsonforms/src/higherOrderComponents/control/LabeledControl.vue | Adds min-height to stabilize header height across label/button variants. |
| packages/jsonforms/src/higherOrderComponents/control/DescriptionPopover.vue | Adjusts spacing via inline style on the info toggle button. |
| .changeset/neat-islands-drum.md | Declares a patch release note for the jsonforms package. |
ae9aab7 to
9983feb
Compare
|
…out labels KDS-791 (Use error message from component instead of custom implementation)
... for specific components. I.e., number input, text input, and date time format input KDS-791 (Use error message from component instead of custom implementation)
KDS-791 (Use error message from component instead of custom implementation)
KDS-791 (Use error message from component instead of custom implementation)
3c2f94a to
b61c690
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



No description provided.