Skip to content

Fix/replace deprecated UI toolkit#134

Merged
edriouk merged 17 commits into
mainfrom
fix/replace-deprecated-ui-toolkit
Apr 15, 2026
Merged

Fix/replace deprecated UI toolkit#134
edriouk merged 17 commits into
mainfrom
fix/replace-deprecated-ui-toolkit

Conversation

@arneschmid

@arneschmid arneschmid commented Mar 27, 2026

Copy link
Copy Markdown
Collaborator

Fixes

Changes

  • Removing vscode/webview-ui-toolkit and all it's dependencies
  • Replacing UI controls with ant controls
  • Enhancing CompactDropdown
  • Updating test cases with handling dynamic creation of option list in CompactDropdown

Affected areas which require a deeper look:

  • Create Solution View (Dropdowns, Project Configuration Row)
  • Configure Layers View (Opened by Create Solution Dialog)
  • Config Wizard View (UI Editor of .dbgconf files)

Screenshots

Checklist

  • 🤖 This change is covered by unit tests (if applicable).
  • 🤹 Manual testing has been performed (if necessary).
  • 🛡️ Security impacts have been considered (if relevant).
  • 📖 Documentation updates are complete (if required).
  • 🧠 Third-party dependencies and TPIP updated (if required).

@github-actions

github-actions Bot commented Mar 27, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 63ac6e8.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

Scanned Files

  • package-lock.json

@qltysh

qltysh Bot commented Mar 27, 2026

Copy link
Copy Markdown

Qlty


Coverage Impact

⬆️ Merging this pull request will increase total coverage on main by 0.04%.

Modified Files with Diff Coverage (8)

RatingFile% DiffUncovered Line #s
Coverage rating: F Coverage rating: F
src/views/manage-layers/view/components/create-layer.tsx0.0%22-120
Coverage rating: B Coverage rating: B
src/views/create-solutions/view/components/hardware-row.tsx100.0%
Coverage rating: F Coverage rating: F
src/views/manage-layers/view/components/manage-layers.tsx0.0%27-202
Coverage rating: B Coverage rating: B
src/views/create-solutions/view/components/create-solution.tsx40.0%219-290
Coverage rating: A Coverage rating: A
src/views/common/components/file-path-picker.tsx100.0%
Coverage rating: A Coverage rating: A
src/views/create-solutions/view/components/hardware-panel.tsx100.0%
Coverage rating: A Coverage rating: A
...ews/create-solutions/view/components/project-configuration.tsx100.0%
Coverage rating: D Coverage rating: D
src/views/config-wizard/confwiz-webview-view-component.tsx54.5%393, 417-428, 518-524
Total53.6%
🤖 Increase coverage with AI coding...
In the `fix/replace-deprecated-ui-toolkit` branch, add test coverage for this new code:

- `src/views/config-wizard/confwiz-webview-view-component.tsx` -- Lines 393, 417-428, and 518-524
- `src/views/create-solutions/view/components/create-solution.tsx` -- Line 219-290
- `src/views/manage-layers/view/components/create-layer.tsx` -- Line 22-120
- `src/views/manage-layers/view/components/manage-layers.tsx` -- Line 27-202

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Migrates webview UIs away from the deprecated @vscode/webview-ui-toolkit to Ant Design components, updating affected views and tests accordingly.

Changes:

  • Removed @vscode/webview-ui-toolkit dependency and related asset copying.
  • Replaced toolkit-based UI controls with Ant Design controls across multiple webviews.
  • Updated CompactDropdown usage/behavior and adjusted related unit tests.

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
webpack.config.js Stops copying the deprecated toolkit script into webview bundles.
src/views/manage-solution/manage-solution-webview-view.ts Uses acquireVsCodeApi from vscode-messenger-webview for bootstrapping.
src/views/manage-layers/view/components/manage-layers.tsx Migrates buttons to Ant Design and adds theming via ConfigProvider.
src/views/manage-layers/view/components/create-layer.tsx Replaces toolkit button with Ant Design Button.
src/views/manage-layers/manage-layers-webview-view.ts Uses acquireVsCodeApi from vscode-messenger-webview.
src/views/manage-components-packs/components-packs-webview-view.ts Uses acquireVsCodeApi from vscode-messenger-webview.
src/views/create-solutions/view/components/project-configuration.tsx Replaces toolkit dropdowns/buttons with CompactDropdown + Ant Design Button.
src/views/create-solutions/view/components/project-configuration.test.tsx Updates tests to reflect CompactDropdown option rendering and interaction.
src/views/create-solutions/view/components/hardware-panel.tsx Replaces toolkit button/progress ring with Ant Design Button/Spin.
src/views/create-solutions/view/components/hardware-panel.test.tsx Updates DOM selectors for Ant Design rendered elements.
src/views/create-solutions/view/components/create-solution.tsx Replaces toolkit buttons/checkboxes with Ant Design equivalents and wraps with ConfigProvider.
src/views/create-solutions/view/components/create-solution.test.tsx Updates selectors to target Ant Design buttons; adjusts interaction tests.
src/views/create-solutions/create-solution-webview-view.ts Uses acquireVsCodeApi from vscode-messenger-webview.
src/views/config-wizard/confwiz-webview-view-component.tsx Migrates Config Wizard inputs/dropdowns/checkboxes to Ant Design + CompactDropdown.
src/views/config-wizard/confwiz-webview-view-component.test.tsx Updates mocks and assertions for new UI component structure.
src/views/common/components/file-path-picker.tsx Replaces toolkit browse button with Ant Design Button.
src/views/common/components/file-path-picker.test.tsx Updates selector for Ant Design browse button and hardens test failure messaging.
src/views/common/components/compact-dropdown.tsx Adds role="combobox" to the dropdown trigger element.
package.json Removes deprecated toolkit dependency and updates Jest ignore patterns.
package-lock.json Removes toolkit and its transitive dependencies from lockfile.
docs/third-party-licenses.json Removes toolkit entry from third-party license list.
Comments suppressed due to low confidence (2)

webpack.config.js:92

  • toolkit.min.js is no longer copied into dist/views, but the Config Wizard webview HTML still loads dist/views/toolkit.min.js (see src/views/config-wizard/confwiz-webview-main.ts). This will break the Config Wizard at runtime. Either remove the toolkit script reference from the Config Wizard webview HTML or reintroduce a copy step for the required asset.
        plugins: [
            new copy({
                patterns: [
                    {
                        from: 'node_modules/@fortawesome/fontawesome-free/css/fontawesome.min.css',
                        to: 'css'
                    },

src/views/config-wizard/confwiz-webview-view-component.tsx:561

  • antd Checkbox onClick does not guarantee event.currentTarget is the underlying <input>, so casting it to HTMLInputElement and reading .checked is unreliable and can prevent toggling/saving from working on mouse clicks. Use onChange (and e.target.checked) or otherwise obtain the real input element before calling toggleChecked.
            <Checkbox
                className={isInconsistent ? 'checkbox-inconsistent' : undefined}
                disabled={element.value.readOnly || shouldDisable}
                onClick={(event) => {
                    const inputElement = event.currentTarget as HTMLInputElement;
                    this.toggleChecked(inputElement, element);
                }}

Comment thread package.json
Comment thread src/views/create-solutions/view/components/create-solution.test.tsx Outdated
Comment thread src/views/create-solutions/view/components/create-solution.test.tsx
Comment thread src/views/common/components/compact-dropdown.tsx
Comment thread src/views/create-solutions/view/components/project-configuration.tsx Outdated
Comment thread src/views/manage-layers/manage-layers-webview-view.ts Outdated
@arneschmid arneschmid marked this pull request as ready for review April 14, 2026 06:26
@arneschmid arneschmid requested a review from edriouk April 14, 2026 07:11

@edriouk edriouk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM,
locally tested on Windows

@edriouk edriouk merged commit 8bc4831 into main Apr 15, 2026
13 checks passed
@edriouk edriouk deleted the fix/replace-deprecated-ui-toolkit branch April 15, 2026 08:15
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.

Replace deprecated dependency @vscode/webview-ui-toolkit with a supported alternative

3 participants