Skip to content

KDS 489 fieldset#348

Open
RainerSchmoeger wants to merge 6 commits intomasterfrom
KDS-489-fieldset
Open

KDS 489 fieldset#348
RainerSchmoeger wants to merge 6 commits intomasterfrom
KDS-489-fieldset

Conversation

@RainerSchmoeger
Copy link
Collaborator

KDS-489 ()

@RainerSchmoeger RainerSchmoeger requested a review from a team as a code owner March 20, 2026 11:01
@RainerSchmoeger RainerSchmoeger requested review from Copilot and knime-ghub-bot and removed request for a team March 20, 2026 11:01
@changeset-bot
Copy link

changeset-bot bot commented Mar 20, 2026

🦋 Changeset detected

Latest commit: 1e98e89

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

This PR includes changesets to release 3 packages
Name Type
@knime/kds-components Patch
@knime/kds-styles Patch
@knime/kds-documentation 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
Contributor

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

Introduces initial fieldset support primitives in the KDS forms package and starts deprecating legacy “form primitive” exports (KdsLabel, KdsSubText) in favor of using form-field component props directly.

Changes:

  • Added KdsFieldsetProps type and a new internal BaseFieldsetWrapper helper component.
  • Marked KdsLabel/KdsSubText (and their prop types) as deprecated in forms/index.ts.
  • Updated the WAC→KDS migration guide to note Label/SubText as removed (internal-only).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
packages/components/src/forms/types.ts Adds new fieldset prop typing for internal fieldset wrapper usage.
packages/components/src/forms/index.ts Deprecates public exports for internal label/subtext primitives.
packages/components/src/forms/_helper/BaseFieldsetWrapper.vue Introduces a new fieldset wrapper helper (currently unused).
.github/agents/wac-to-kds-migrator.md Updates migration mapping guidance for Label/SubText removals.

…ubTextProps; update description in KdsFieldsetProps for clarity

KDS-489 ()
Copilot AI review requested due to automatic review settings March 20, 2026 11:36
@sonarqubecloud
Copy link

Copy link
Contributor

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

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

Comment on lines +44 to +67
export type KdsFieldsetProps = {
/**
* Fieldset id
*/
id?: string;
/**
* Legend text displayed above the fieldset content.
*/
label?: string;
/**
* Accessible label used when no visible legend is rendered.
*/
ariaLabel?: string;
/**
* Optional description displayed in an info popover next to the legend.
* The info toggle button is only visible when hovering or focusing the fieldset.
*/
description?: string;
/**
* Override the implicit ARIA role of the fieldset (defaults to `group`).
* Use `radiogroup` for radio button groups.
*/
role?: string;
} & Omit<KdsSubTextProps, "id">;
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KdsFieldsetProps allows both label and ariaLabel to be omitted, which makes it possible to render an unnamed <fieldset> (accessibility issue). Consider mirroring the existing KdsInputLabelProps pattern in this file by making label XOR ariaLabel (require one of them), so consumers can't accidentally create an unlabeled group.

Copilot uses AI. Check for mistakes.
Comment on lines +39 to +42
:aria-describedby="props.subText ? subTextId : undefined"
@mouseenter="isHovered = true"
@mouseleave="isHovered = false"
>
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The JSDoc says the info toggle is visible when “hovering or focusing the fieldset”, but visibility is currently driven only by mouseenter/mouseleave (isHovered). Add focus-based handling (e.g. focusin/focusout or :focus-within) so keyboard users also get the description button as documented.

Copilot uses AI. Check for mistakes.
Comment on lines +53 to +54
:content="props.description"
:hidden="!isHovered"
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KdsInfoToggleButton is always rendered when description is set, and :hidden="!isHovered" only makes it transparent. Since the button remains focusable in the DOM, users can tab to an invisible control. Consider hiding it in a way that removes it from the tab order (e.g. use v-show/v-if based on hover/focus state, or update the hidden mechanism to make the button non-focusable when hidden).

Suggested change
:content="props.description"
:hidden="!isHovered"
v-show="isHovered"
:content="props.description"

Copilot uses AI. Check for mistakes.
Comment on lines +84 to +85
&:focus:not(.selected) {
border: var(--kds-border-action-selected);
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new focus styling uses border: var(--kds-border-action-selected) on :focus:not(.selected), which can make a focused-but-unselected item look selected. Consider using the focused token (e.g. --kds-border-action-focused) and/or applying the style on :focus-visible instead of :focus to avoid changing appearance on mouse focus.

Suggested change
&:focus:not(.selected) {
border: var(--kds-border-action-selected);
&:focus-visible:not(.selected) {
border: var(--kds-border-action-focused);

Copilot uses AI. Check for mistakes.
"@knime/kds-components": patch
---

Deprecate use of internal KdsLabel and KdsSubtext
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changeset text uses inconsistent casing: KdsSubtext should be KdsSubText to match the component/type name used in the codebase and exports.

Suggested change
Deprecate use of internal KdsLabel and KdsSubtext
Deprecate use of internal KdsLabel and KdsSubText

Copilot uses AI. Check for mistakes.
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