Skip to content

Commit 7e08a15

Browse files
chagongwenytang-mscopilotCopilot
authored
refactor: Migrate webviews from React 16 + react-bootstrap to React 19 + @vscode-elements/elements (#1616)
* Migrate webviews from React 16 + react-bootstrap to React 19 + @vscode-elements/elements - Upgrade React 16.14.0 to React 19.x with react-jsx transform - Replace deprecated @vscode/webview-ui-toolkit with @vscode-elements/elements (Lit-based) - Replace react-bootstrap components with native HTML + custom SCSS - Add custom Bootstrap-equivalent utility classes in vscode.scss - Add TypeScript declarations for vscode-elements web components - Migrate all webview entry points to React 19 createRoot API - Convert class components to functional components - Update webpack config for React 19 compatibility - Fix tas-client version compatibility (override to ~0.2.33) * fix: derive AWT action at render time without mutating shared groups array * fix: add fallback for --design-unit CSS variable @vscode-elements/elements does not define --design-unit (was provided by @vscode/webview-ui-toolkit). Add fallback value of 4 so spacing utilities (mr-*, ml-*, pt-*, etc.) resolve correctly. * fix(test-plans): use self-contained Maven fixture for resolve-unknown-type plan (#1617) The plan previously pointed at redhat-developer/vscode-java's salut Maven fixture, which configures maven-compiler-plugin with <source>1.7</source>/<target>1.7</target>. On the CI runners (which install only JDK 21) this puts the workspace in a state where JDT reports compliance warnings on the pom but skips full semantic analysis on the Java source -- the inserted `Gson gson;` field never produces a `Gson cannot be resolved to a type` diagnostic, so navigateToError can never find the error and applyCodeAction `Resolve unknown type` is unreachable. Older versions of @vscjava/vscode-autotest masked this failure mode by silently pressing Enter on whatever the first Code Action happened to be; once that fallback was removed upstream the plan started reliably failing in scheduled runs (e.g. actions/runs/25419116469). Add a minimal self-owned Maven fixture under test-fixtures/maven-resolve-type that explicitly targets JDK 11 (<release>11</release>), matching the JDK installed by the workflow. Locally this brings navigateToError from a 30s timeout to ~8s and the full plan to 6/6 passing. Co-authored-by: copilot <copilot@local> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: chagong <831821+chagong@users.noreply.github.com> * ci: add autotest cases (#1619) Co-authored-by: chagong <831821+chagong@users.noreply.github.com> --------- Co-authored-by: wenyt <75360946+wenytang-ms@users.noreply.github.com> Co-authored-by: copilot <copilot@local> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: chagong <831821+chagong@users.noreply.github.com>
1 parent 32fdaab commit 7e08a15

57 files changed

Lines changed: 2308 additions & 2027 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package-lock.json

Lines changed: 689 additions & 838 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -347,9 +347,8 @@
347347
"@types/lodash": "^4.14.186",
348348
"@types/node": "20.x",
349349
"@types/path-exists": "^4.0.2",
350-
"@types/react": "^17.0.50",
351-
"@types/react-dom": "^16.9.16",
352-
"@types/react-redux": "^7.1.24",
350+
"@types/react": "^19.0.0",
351+
"@types/react-dom": "^19.0.0",
353352
"@types/semver": "^7.7.1",
354353
"@types/vscode": "^1.74.0",
355354
"@types/winreg": "^1.2.31",
@@ -379,29 +378,29 @@
379378
"vscjava.vscode-java-dependency"
380379
],
381380
"dependencies": {
382-
"@iconify-icons/codicon": "1.2.8",
383-
"@iconify/react": "^1.1.4",
384-
"@reduxjs/toolkit": "^1.8.6",
381+
"@reduxjs/toolkit": "^2.0.0",
382+
"@vscode-elements/elements": "^2.5.0",
385383
"@vscode/codicons": "^0.0.44",
386-
"@vscode/webview-ui-toolkit": "1.4.0",
387384
"@xmldom/xmldom": "^0.8.13",
388385
"axios": "^1.15.0",
389-
"bootstrap": "^4.6.2",
386+
"bootstrap": "^5.3.8",
390387
"compare-versions": "^6.1.1",
391388
"expand-home-dir": "0.0.3",
392389
"expand-tilde": "^2.0.2",
393390
"fs-extra": "^11.3.3",
394391
"hdr-histogram-js": "^3.0.1",
395392
"highlight.js": "11.11.1",
396393
"jdk-utils": "^0.4.4",
397-
"jquery": "^3.6.1",
394+
"jquery": "^4.0.0",
398395
"lodash": "^4.18.1",
399-
"react": "^16.14.0",
400-
"react-bootstrap": "^1.6.6",
401-
"react-dom": "^16.14.0",
402-
"react-redux": "^7.2.9",
396+
"react": "^19.0.0",
397+
"react-dom": "^19.0.0",
398+
"react-redux": "^9.0.0",
403399
"semver": "^7.7.4",
404400
"vscode-extension-telemetry-wrapper": "^0.15.2",
405401
"vscode-tas-client": "^0.1.75"
402+
},
403+
"overrides": {
404+
"tas-client": "~0.2.33"
406405
}
407406
}

0 commit comments

Comments
 (0)