Skip to content

Commit

Permalink
Remove vscode-webview-ui-toolkit
Browse files Browse the repository at this point in the history
Summary:
We no longer need this dependency! Also remove some vestigial remains

If we compare production builds before and after (not on this diff but actually comparing the last diff that included any of vscode-webview-ui-toolkit):

## Before
```
$ yarn build
...
build/assets/index-qm3bXTUa.js                         913.69 kB │ gzip: 264.20 kB
```

## After
```
$ yarn build
...
build/assets/index-DOWvZMsB.js                         732.80 kB │ gzip: 219.89 kB
```

That's **-20% build size** (-15% gzip'd) for the main bundle (some other ui-containing bundles are also smaller)

Admittedly the before is also counting the other components we had to add to make this migration, however those components are quite simple, and I really doubt they take up anywhere near 20% of the app.

In fact, the isl/components folder has a mere 1,279 lines of code, compared to 83k LOC for isl (excluding isl-server/), so I'd expect it's more like 1-2% of the bundle size.

Reviewed By: quark-zju

Differential Revision: D58702152

fbshipit-source-id: 575e29bf1efd88a7ad9231ed489b2479f25aba54
  • Loading branch information
evangrayk authored and facebook-github-bot committed Jun 18, 2024
1 parent 358f7e8 commit 8fad380
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 104 deletions.
1 change: 0 additions & 1 deletion addons/isl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.2.1",
"@vscode/webview-ui-toolkit": "1.2.2",
"diff": "^5.0.0",
"fast-deep-equal": "^3.1.3",
"immutable": "^4.3.0",
Expand Down
1 change: 0 additions & 1 deletion addons/isl/src/UncommittedChanges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ import {selectedCommits} from './selection';
import {latestHeadCommit, uncommittedChangesFetchError} from './serverAPIState';
import {GeneratedStatus} from './types';
import * as stylex from '@stylexjs/stylex';
import {VSCodeButton} from '@vscode/webview-ui-toolkit/react';
import {useAtom, useAtomValue} from 'jotai';
import React, {useCallback, useMemo, useEffect, useRef, useState} from 'react';
import {ComparisonType} from 'shared/Comparison';
Expand Down
48 changes: 0 additions & 48 deletions addons/isl/src/VSCodeCheckbox.tsx

This file was deleted.

54 changes: 0 additions & 54 deletions addons/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1782,36 +1782,6 @@
"@jridgewell/resolve-uri" "^3.0.3"
"@jridgewell/sourcemap-codec" "^1.4.10"

"@microsoft/fast-element@^1.10.4", "@microsoft/fast-element@^1.6.2", "@microsoft/fast-element@^1.9.0":
version "1.10.4"
resolved "https://registry.npmjs.org/@microsoft/fast-element/-/fast-element-1.10.4.tgz"
integrity sha512-SD0L3Kt++VSTqdkmGupB5tNaSLboEB7H/rh70a4eECpzCQewEzjd85jVNpgab1A8n5d3N9sPwZGIyfiUN6x4hg==

"@microsoft/fast-foundation@^2.38.0", "@microsoft/fast-foundation@^2.41.1":
version "2.46.11"
resolved "https://registry.npmjs.org/@microsoft/fast-foundation/-/fast-foundation-2.46.11.tgz"
integrity sha512-5ehg6l2g/PsAR+90EEWSR7QAiAKsdscAnP6upE2ysp2U1luER4tAVDIP2wGQneLhaHq2i4Htnb4t+K1dcrw6AQ==
dependencies:
"@microsoft/fast-element" "^1.10.4"
"@microsoft/fast-web-utilities" "^5.4.1"
tabbable "^5.2.0"
tslib "^1.13.0"

"@microsoft/fast-react-wrapper@^0.1.18":
version "0.1.48"
resolved "https://registry.npmjs.org/@microsoft/fast-react-wrapper/-/fast-react-wrapper-0.1.48.tgz"
integrity sha512-9NvEjru9Kn5ZKjomAMX6v+eF0DR+eDkxKDwDfi+Wb73kTbrNzcnmlwd4diN15ygH97kldgj2+lpvI4CKLQQWLg==
dependencies:
"@microsoft/fast-element" "^1.9.0"
"@microsoft/fast-foundation" "^2.41.1"

"@microsoft/fast-web-utilities@^5.4.1":
version "5.4.1"
resolved "https://registry.npmjs.org/@microsoft/fast-web-utilities/-/fast-web-utilities-5.4.1.tgz"
integrity sha512-ReWYncndjV3c8D8iq9tp7NcFNc1vbVHvcBFPME2nNFKNbS1XCesYZGlIlf3ot5EmuOXPlrzUHOWzQ2vFpIkqDg==
dependencies:
exenv-es6 "^1.1.1"

"@n1ru4l/graphql-live-query@^0.9.0":
version "0.9.0"
resolved "https://registry.npmjs.org/@n1ru4l/graphql-live-query/-/graphql-live-query-0.9.0.tgz"
Expand Down Expand Up @@ -2516,15 +2486,6 @@
resolved "https://registry.yarnpkg.com/@vscode/codicons/-/codicons-0.0.33.tgz#a56243ab5492801fff04e53c0aab0d18a6521751"
integrity sha512-VdgpnD75swH9hpXjd34VBgQ2w2quK63WljodlUcOoJDPKiV+rPjHrcUc2sjLCNKxhl6oKqmsZgwOWcDAY2GKKQ==

"@vscode/[email protected]":
version "1.2.2"
resolved "https://registry.yarnpkg.com/@vscode/webview-ui-toolkit/-/webview-ui-toolkit-1.2.2.tgz#f071ec7434b2733d1c724fa874341ec20998f930"
integrity sha512-xIQoF4FC3Xh6d7KNKIoIezSiFWYFuf6gQMdDyKueKBFGeKwaHWEn+dY2g3makvvEsNMEDji/woEwvg9QSbuUsw==
dependencies:
"@microsoft/fast-element" "^1.6.2"
"@microsoft/fast-foundation" "^2.38.0"
"@microsoft/fast-react-wrapper" "^0.1.18"

"@webassemblyjs/[email protected]":
version "1.11.1"
resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz"
Expand Down Expand Up @@ -4183,11 +4144,6 @@ [email protected], execa@^5.0.0:
signal-exit "^3.0.3"
strip-final-newline "^2.0.0"

exenv-es6@^1.1.1:
version "1.1.1"
resolved "https://registry.npmjs.org/exenv-es6/-/exenv-es6-1.1.1.tgz"
integrity sha512-vlVu3N8d6yEMpMsEm+7sUBAI81aqYYuEvfK0jNqmdb/OPXzzH7QWDDnVjMvDSY47JdHEqx/dfC/q8WkfoTmpGQ==

exit@^0.1.2:
version "0.1.2"
resolved "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz"
Expand Down Expand Up @@ -7221,11 +7177,6 @@ [email protected], sync-fetch@^0.4.0:
buffer "^5.7.1"
node-fetch "^2.6.1"

tabbable@^5.2.0:
version "5.3.3"
resolved "https://registry.npmjs.org/tabbable/-/tabbable-5.3.3.tgz"
integrity sha512-QD9qKY3StfbZqWOPLp0++pOrAVb/HbUi5xCc8cUo4XjP19808oaMiDzn0leBY5mCespIBM0CIZePzZjgzR83kA==

tapable@^2.1.1, tapable@^2.2.0:
version "2.2.1"
resolved "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz"
Expand Down Expand Up @@ -7432,11 +7383,6 @@ tsconfig-paths@^3.14.1:
minimist "^1.2.6"
strip-bom "^3.0.0"

tslib@^1.13.0:
version "1.14.1"
resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==

tslib@^2, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.4.0, tslib@~2.4.0:
version "2.4.0"
resolved "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz"
Expand Down

0 comments on commit 8fad380

Please sign in to comment.