-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: replace webview-ui-toolkit (#545)
[`@vscode/webview-ui-toolkit` is being deprecated in January](microsoft/vscode-webview-ui-toolkit#561). This PR replaces the UI components from `@vscode/webview-ui-toolkit` with components from `@vscode-elements/elements`.
- Loading branch information
Showing
16 changed files
with
216 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
import { | ||
DataGrid, | ||
provideVSCodeDesignSystem, | ||
vsCodeDataGrid, | ||
vsCodeDataGridCell, | ||
vsCodeDataGridRow, | ||
} from '@vscode/webview-ui-toolkit' | ||
|
||
provideVSCodeDesignSystem().register(vsCodeDataGrid(), vsCodeDataGridRow(), vsCodeDataGridCell()) | ||
|
||
const abbreviations: { Abbreviation: string; 'Unicode symbol': string } = JSON.parse( | ||
const abbreviations: { Abbreviation: string; 'Unicode symbol': string }[] = JSON.parse( | ||
document.querySelector('script[data-id="abbreviationview-script"]')!.getAttribute('abbreviations')!, | ||
) | ||
|
||
const grid = document.getElementById('abbreviation-grid')! as DataGrid | ||
const tableBody = document.getElementById('abbreviation-table')! | ||
|
||
grid.rowsData = abbreviations as any | ||
for (const { Abbreviation: abbr, 'Unicode symbol': symb } of abbreviations) { | ||
const row = document.createElement('vscode-table-row') | ||
const abbrCell = document.createElement('vscode-table-cell') | ||
abbrCell.innerText = abbr | ||
row.appendChild(abbrCell) | ||
const symbCell = document.createElement('vscode-table-cell') | ||
symbCell.innerText = symb | ||
row.appendChild(symbCell) | ||
tableBody.appendChild(row) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.