-
Notifications
You must be signed in to change notification settings - Fork 36.6k
Use codicons from npm package #278593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Use codicons from npm package #278593
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates from bundled codicon font files to using the @vscode/codicons npm package (version 0.0.42). The change centralizes the codicon font source and improves maintainability by leveraging the published npm package.
Key Changes
- Added
@vscode/codiconsnpm package as a dependency - Modified
getIconsStyleSheetto accept anIEnvironmentServiceparameter to determine the correct module path - Removed the static
@font-facedeclaration fromcodicon.cssand replaced it with dynamic CSS generation
Reviewed Changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| package.json | Added @vscode/codicons version 0.0.42 as a dependency |
| package-lock.json | Added lockfile entry for @vscode/codicons package |
| src/vs/platform/theme/browser/iconsStyleSheet.ts | Added getModuleLocation helper and updated getIconsStyleSheet to accept environmentService, dynamically generates @font-face rule |
| src/vs/workbench/services/themes/browser/workbenchThemeService.ts | Updated call to getIconsStyleSheet to pass environmentService |
| src/vs/editor/standalone/browser/standaloneThemeService.ts | Updated call to getIconsStyleSheet to pass _environment |
| src/vs/workbench/contrib/issue/browser/baseIssueReporterService.ts | Added environmentService parameter and updated call to getIconsStyleSheet |
| src/vs/workbench/contrib/issue/electron-browser/issueReporterService.ts | Added environmentService parameter and passed to parent constructor |
| src/vs/workbench/contrib/issue/browser/issueReporterService.ts | Added environmentService parameter and passed to parent constructor |
| src/vs/base/browser/ui/codicons/codicon/codicon.css | Removed static @font-face declaration (now generated dynamically) |
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @bpaseroMatched files:
|
…eme service (#278734) * Initial plan * Initialize _environment with isBuilt: false for standalone editor Co-authored-by: alexr00 <[email protected]> * Simplify _environment initialization to use object literal Co-authored-by: alexr00 <[email protected]>
No description provided.