-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Chore: Move old icons into legacy folder, make new folder for custom. #20990
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?
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 reorganizes the icon structure by moving legacy icons into a dedicated folder and creating a new folder for custom SVG icons. It updates the icon-company.ts file with a new SVG definition and modifies the build system to support both legacy and custom icon paths.
- Moved existing Umbraco icons to a
legacy/subfolder - Added support for a new
custom/folder for custom-made icons - Updated the icon build system to process icons from both locations
Reviewed changes
Copilot reviewed 3 out of 614 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/icons/icon-company.ts | Updates the company icon SVG with a new design |
| src/Umbraco.Web.UI.Client/src/packages/core/icon-registry/icon-dictionary.json | Adds empty custom array and updates all icon file paths to include legacy/ prefix |
| src/Umbraco.Web.UI.Client/devops/icons/index.js | Adds custom SVG directory support and updates glob patterns to match new folder structure |
| } catch { | ||
| errors.push(`[Custom] Could not load file: '${path}'`); | ||
| console.log(`[Custom] Could not load file: '${path}'`); |
Copilot
AI
Nov 28, 2025
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.
The catch block silently swallows errors without logging the actual error details. Consider capturing and logging the error parameter (e.g., catch (error)) to aid in debugging file loading issues.
| if (fileJSON['custom']) { | ||
| fileJSON['custom'].forEach((iconDef) => { | ||
| if (iconDef.file && iconDef.name) { | ||
| const path = customSvgDirectory + '/' + iconDef.file; |
Copilot
AI
Nov 28, 2025
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.
Use path joining utility instead of string concatenation. Consider using Node.js path.join() for more robust cross-platform path handling.
| const path = customSvgDirectory + '/' + iconDef.file; | |
| const path = path.join(customSvgDirectory, iconDef.file); |
Prepare for custom-made SVG icons