Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c9a94b4
KDS-461: test 3 types of date picker
RainerSchmoeger Apr 14, 2026
a307bc1
KDS-461: use temporal.plaindate
RainerSchmoeger Apr 14, 2026
fec9d38
KDS-461: adjust styling
RainerSchmoeger Apr 14, 2026
34ef599
KDS-461: focus date picker when opened
RainerSchmoeger Apr 14, 2026
460b94f
KDS-461: Add play tests
RainerSchmoeger Apr 14, 2026
8554cca
KDS-461: fix focus blinking
RainerSchmoeger Apr 14, 2026
0ac8cb6
KDS-461: remove vcalendar and vuepic variants
RainerSchmoeger Apr 14, 2026
cfc6c1f
KDS-461: apply review comments
RainerSchmoeger Apr 14, 2026
1abb47e
KDS-461: apply review comments
RainerSchmoeger Apr 14, 2026
ee6864c
KDS-461: fix linter warnings
RainerSchmoeger Apr 14, 2026
0e54705
KDS-461: fix sonar issue
RainerSchmoeger Apr 14, 2026
1956051
KDS-461: css cleanup
RainerSchmoeger Apr 14, 2026
6a27bc0
KDS-461: apply review comments
RainerSchmoeger Apr 14, 2026
561bd20
KDS-461: apply review comments
RainerSchmoeger Apr 14, 2026
d1be812
KDS-461: scroll selected year into center when dropdown opens
RainerSchmoeger Apr 14, 2026
2cac795
KDS-461: refactor: update date input min/max logic and enhance year r…
RainerSchmoeger Apr 14, 2026
f0e3b71
KDS-461: apply review comments
RainerSchmoeger Apr 14, 2026
fa67b7c
KDS-461: improve doc types
RainerSchmoeger Apr 14, 2026
01fbdd3
KDS-461: apply review comments
RainerSchmoeger Apr 14, 2026
5f854e9
KDS-461: apply review comments
RainerSchmoeger Apr 14, 2026
20f3f93
KDS-461: Add day/month/year grids to date picker
ChristianAlbrecht Apr 17, 2026
fd5aea0
KDS-461: apply day grid styling
RainerSchmoeger Apr 20, 2026
03ccf01
KDS-461: refactor: enhance date picker accessibility and focus manage…
RainerSchmoeger Apr 20, 2026
713593c
KDS-461: align month and year view styling
RainerSchmoeger Apr 20, 2026
f3c25e9
KDS-461: apply review comments
RainerSchmoeger Apr 20, 2026
c04ce97
revert styling month and year
RainerSchmoeger Apr 20, 2026
d109ef1
KDS-461: allow clicking days of other monts
RainerSchmoeger Apr 20, 2026
75ca8f7
KDS-461: underline current date
RainerSchmoeger Apr 20, 2026
22cdd6a
KDS-461: apply review comments
RainerSchmoeger Apr 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/date-input-temporal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@knime/kds-components": minor
---

**BREAKING CHANGE:** `KdsDateInput` v-model type changed from `string` to `Temporal.PlainDate | null`. The `datePickerMin`/`datePickerMax` props have been renamed to `minDate`/`maxDate` and their types changed from `string` to `Temporal.PlainDate`. `temporal-polyfill` is shipped as a direct dependency of `@knime/kds-components`; consumers should import `Temporal` from the same `temporal-polyfill` package to ensure type compatibility and avoid duplicate polyfill instances.
29 changes: 29 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,35 @@ KNIME embeds UI extensions inside **Shadow DOM**. In CEF / Chromium 128, clickin

**Guideline:** When writing `focus` handlers, **do not unconditionally overwrite existing state**. Guard destructive resets so they only apply when the state is genuinely empty or uninitialised. For example, in `MultiSelectListBox`'s `onFocus`, the selection is only reset to a single item when `modelValue` is empty — an existing multi-selection is preserved.

#### Input + trailing button – focus blink on click

When a `BaseInput` has a trailing action button (e.g. toggle, stepper), clicking that button causes the input's `blur` to fire **before** the button's `click`. If the `blur` handler runs validation or state changes, the user sees a brief focus blink and possibly unwanted side-effects (error flash, value normalization).

**Pattern (used in `KdsNumberInput`, `KdsDateInput`):**

1. Add a boolean ref `isToggling` (or `isStepping`).
2. Set it to `true` on `@pointerdown` of the trailing button; clear it on `@pointerup` / `@pointerleave` / `@pointercancel`.
3. In the input's `blur` handler, if the flag is `true`, call `baseInput.value?.focus()` to restore focus and `return` early — skipping validation.

```vue
<KdsButton
@pointerdown="isToggling = true"
@pointerup="isToggling = false"
@pointerleave="isToggling = false"
@pointercancel="isToggling = false"
/>
```

```ts
const onTextInputBlur = () => {
if (isToggling.value) {
baseInput.value?.focus();
return;
}
// … normal validation
};
```

### Migration documentation

- When creating a new component, ask the user if it has an equivalent one in `@knime/components`. If it does, add migration instructions to `.github/agents/wac-to-kds-migrator.md`.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
"packageManager": "pnpm@10.33.0",
"pnpm": {
"overrides": {
"v-calendar": "https://github.com/knime/v-calendar/archive/048477f.tar.gz",
"@vitest/eslint-plugin>@typescript-eslint/utils": "8.57.2",
"ajv@>=7.0.0-alpha.0 <8.18.0": ">=8.18.0",
"lodash@<4.18.1": ">=4.18.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"@knime/kds-styles": "workspace:^",
"@knime/utils": "catalog:",
"consola": "catalog:",
"pretty-bytes": "^7.1.0"
"pretty-bytes": "^7.1.0",
"temporal-polyfill": "^0.3.2"
Comment thread
ChristianAlbrecht marked this conversation as resolved.
},
"devDependencies": {
"@storybook/vue3-vite": "catalog:storybook",
Expand All @@ -58,8 +59,7 @@
"vite-plugin-lib-inject-css": "catalog:",
"vite-svg-loader": "catalog:",
"vue": "catalog:",
"vue-tsc": "catalog:",
"v-calendar": "catalog:patch"
"vue-tsc": "catalog:"
},
"engines": {
"node": "24.10.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,13 @@ function scrollToView() {
?.scrollIntoView({ block: "nearest" });
}

function scrollSelectedIntoView() {
nextTick(() => {
const selected = containerEl.value?.querySelector('[aria-selected="true"]');
selected?.scrollIntoView({ block: "center" });
});
}

const onMouseLeave = () => {
if (!isFocused.value) {
activeId.value = undefined;
Expand Down Expand Up @@ -277,6 +284,7 @@ defineExpose<KdsListContainerExpose>({
focus: () => {
containerEl.value?.focus();
},
scrollSelectedIntoView,
});
</script>

Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/containers/ListContainer/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@ export type KdsListContainerExpose = {
activeDescendant: Readonly<Ref<string | undefined>>;
/** Moves focus to the list container element */
focus: () => void;
/** Scrolls the currently selected item into view (centered) */
scrollSelectedIntoView: () => void;
};
Loading
Loading