Repository navigation
Conversation
Add a build script that turns an icon set sprite into static assets: one file per icon under core/img/icons, a sprite with the most used icons and a manifest with a content hash for cache busting. The single icon files work as image source, CSS mask and as target of an SVG `<use>` element. The sprite content is a placeholder until the icon usage across apps has been analysed. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Add the public IIconManager to resolve icon names to URLs of the static icon files, e.g. for APIs returning icons to clients. Provide the icon URL template, the sprite URL and the list of sprite icons as `core/icons` initial state, so the frontend can resolve icon names without bundling any icon. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Copy the icon files of the package instead of splitting a full sprite, keep previous icon names working by copying aliased icons and only build the sprite and the manifest in server. The package is not published yet, the devDependency is added once it is available. Until then link it locally (npm link). Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Member
|
does this means a network request per icon? |
Contributor
Author
Only if you want some rare icon. There are two things:
If a icon is in the sprite use that one, so basically everthing is using the cached sprite. |
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Provide Nextcloud consistent icons.
This allows to reduce bundle size of every app as we now can use a cached sprite sheet of the 200-500 most used icons and load the remaining icons only if needed (nextcloud org uses ~230 icons in total currently).
Also in a follow up we could allow branding icons and those would be used directly with all apps.
Checklist
3. to review, feature component)stable32)AI (if applicable)