Skip to content

KDS-648: KdsEmptyState Implementation#61

Open
senemdilli wants to merge 1 commit intomasterfrom
KDS-648-Empty-State-Implementation
Open

KDS-648: KdsEmptyState Implementation#61
senemdilli wants to merge 1 commit intomasterfrom
KDS-648-Empty-State-Implementation

Conversation

@senemdilli
Copy link
Contributor

KDS-648 (Empty State)

@senemdilli senemdilli requested a review from a team as a code owner February 6, 2026 14:01
@senemdilli senemdilli requested review from Copilot and knime-ghub-bot and removed request for a team February 6, 2026 14:01
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

Implements KDS-648 by introducing KDS-based empty state UIs for the Python workspace and view preview, along with dependency updates to support the new components.

Changes:

  • Add KdsEmptyState to workspace and preview components and adjust conditional rendering accordingly.
  • Disable KDS legacy mode in the app bootstrap.
  • Bump @knime/kds-components and update build/test tooling versions in package.json.

Reviewed changes

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

File Description
org.knime.python3.scripting.nodes/js-src/src/main.ts Disables KDS legacy mode globally to use updated KDS behavior/components.
org.knime.python3.scripting.nodes/js-src/src/components/PythonWorkspace.vue Adds KDS empty state when the workspace has no temporary values.
org.knime.python3.scripting.nodes/js-src/src/components/PythonViewPreview.vue Replaces legacy placeholder UI with KdsEmptyState and adds run-action buttons.
org.knime.python3.scripting.nodes/js-src/package.json Updates KDS dependency and upgrades dev tooling versions (vite/vitest/cyclonedx).
Files not reviewed (1)
  • org.knime.python3.scripting.nodes/js-src/package-lock.json: Language not supported

// const { currentMode } = useKdsDarkMode();
// currentMode.value = "dark"
useKdsLegacyMode(true);
useKdsLegacyMode(false);
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The comment says legacy mode can be disabled for development, but the code now disables legacy mode unconditionally. Please update the comment to reflect the new default behavior, or make the legacy-mode toggle explicitly environment-controlled (e.g., dev-only) if that was the intent.

Suggested change
useKdsLegacyMode(false);
if (import.meta.env.DEV) {
useKdsLegacyMode(false);
}

Copilot uses AI. Check for mistakes.
Comment on lines +27 to 34
<div v-if="pythonPreviewStatus.hasValidView" class="iframe-container">
<iframe
ref="iframe"
title="Preview"
sandbox="allow-scripts"
:src="IFRAME_SOURCE"
/>
</div>
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

Switching from v-show to v-if will unmount/remount the iframe whenever hasValidView toggles, which can force a full reload and lose any internal iframe state. If you want to preserve the iframe instance, keep it mounted (e.g., revert to v-show for the iframe container, or otherwise avoid unmounting it).

Copilot uses AI. Check for mistakes.
},
"devDependencies": {
"@cyclonedx/cyclonedx-npm": "1.19.3",
"@cyclonedx/cyclonedx-npm": "^4.1.2",
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

Introducing caret (^) ranges for core build/test tooling can reduce build reproducibility over time (new minors can be picked up when the lockfile is regenerated). If this repo aims for deterministic builds, prefer pinning exact versions for these tools (consistent with the rest of the file) and relying on the lockfile for installs.

Copilot uses AI. Check for mistakes.
"@types/node": "22.16.0",
"@vitejs/plugin-vue": "5.2.4",
"@vitest/coverage-v8": "2.1.9",
"@vitest/coverage-v8": "^4.0.18",
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

Introducing caret (^) ranges for core build/test tooling can reduce build reproducibility over time (new minors can be picked up when the lockfile is regenerated). If this repo aims for deterministic builds, prefer pinning exact versions for these tools (consistent with the rest of the file) and relying on the lockfile for installs.

Suggested change
"@vitest/coverage-v8": "^4.0.18",
"@vitest/coverage-v8": "4.0.18",

Copilot uses AI. Check for mistakes.
"vite-plugin-monaco-editor": "1.1.0",
"vite-svg-loader": "5.1.0",
"vitest": "2.1.9",
"vitest": "^4.0.18",
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

Introducing caret (^) ranges for core build/test tooling can reduce build reproducibility over time (new minors can be picked up when the lockfile is regenerated). If this repo aims for deterministic builds, prefer pinning exact versions for these tools (consistent with the rest of the file) and relying on the lockfile for installs.

Suggested change
"vitest": "^4.0.18",
"vitest": "4.0.18",

Copilot uses AI. Check for mistakes.

<template>
<div ref="resizeContainer" class="container">
<div v-if="!isEmpty" ref="resizeContainer" class="container">
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

Using v-if/v-else here will unmount/remount the entire workspace DOM when it transitions between empty/non-empty, which can reset UI state (e.g., scroll position, measured widths) and complicate resize-observer behavior. Consider keeping the outer container mounted and toggling visibility/content inside it (e.g., render the empty state overlay within the same container or use v-show) if preserving state is desired.

Copilot uses AI. Check for mistakes.
Comment on lines +98 to +103
<div v-else class="container-empty-state">
<KdsEmptyState
headline="No temporary values yet"
description="Run the Python script to display temporary values generated during execution."
/>
</div>
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

Using v-if/v-else here will unmount/remount the entire workspace DOM when it transitions between empty/non-empty, which can reset UI state (e.g., scroll position, measured widths) and complicate resize-observer behavior. Consider keeping the outer container mounted and toggling visibility/content inside it (e.g., render the empty state overlay within the same container or use v-show) if preserving state is desired.

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

Development

Successfully merging this pull request may close these issues.

1 participant