Skip to content

Change Icon Library asset location - #11313

Closed
desrosj wants to merge 6 commits into
WordPress:trunkfrom
desrosj:move/icon-library-image-assets
Closed

Change Icon Library asset location#11313
desrosj wants to merge 6 commits into
WordPress:trunkfrom
desrosj:move/icon-library-image-assets

Conversation

@desrosj

@desrosj desrosj commented Mar 20, 2026

Copy link
Copy Markdown
Member

The Icon Library image files are images, so they should live in the wp-includes/images/ directory.

This updates the build script to:

  • copy the icon library SVG files to wp-includes/images/icon-library instead of wp-includes/icons
  • Moves the manifest.php file to the wp-includes/assets/ directory.
  • Gives the manifest.php file a more specific name: icon-library-manifest.php
  • Remove gutenberg- from the corresponding grunt copy tasks.
  • Removes an unnecessary trailingslashit() call in the icon registry class.

Trac ticket: Core-64393

Use of AI Tools

AI assistance: Yes
Tools: GitHub Copilot
Used for code review on the PR.


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

desrosj added 2 commits March 19, 2026 21:08
This updates the build script to:
- copy the icon library SVG files to `wp-includes/images/icon-library` instead of `wp-includes/icons`
- Moves the `manifest.php` file to the `wp-includes/assets/` directory.
- Gives the `manifest.php` file a more specific name: `icon-library-manifest.php`
- Remove `gutenberg-` from the corresponding `grunt copy` tasks.
@desrosj desrosj self-assigned this Mar 20, 2026
@github-actions

github-actions Bot commented Mar 20, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props desrosj, mcsf.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates WordPress core’s Icon Library asset layout so SVGs live under wp-includes/images/ (as images) and the generated manifest lives under wp-includes/assets/, aligning runtime lookups with the new build output locations.

Changes:

  • Move Icon Library SVG output to wp-includes/images/icon-library and rename/relocate the generated manifest to wp-includes/assets/icon-library-manifest.php.
  • Update WP_Icons_Registry to load the manifest and SVGs from their new locations (and remove the redundant trailingslashit() call).
  • Adjust ignore/build-clean patterns to account for the new output directory and temporary cleanup of the old one.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/wp-includes/class-wp-icons-registry.php Updates filesystem paths used by the icons registry to match the new manifest and SVG locations.
Gruntfile.js Splits/renames copy tasks, changes destinations for SVGs and manifest, and adds a manifest transform to match the new SVG directory structure.
.gitignore Updates ignored generated output path for the icon library SVG directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/wp-includes/class-wp-icons-registry.php
@desrosj
desrosj requested a review from peterwilsoncc March 20, 2026 03:16
@github-actions

Copy link
Copy Markdown

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 62073
GitHub commit: 28646ea

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

@github-actions github-actions Bot closed this Mar 20, 2026
@desrosj desrosj reopened this Mar 20, 2026
@desrosj

desrosj commented Mar 20, 2026

Copy link
Copy Markdown
Member Author

I accidentally included "Fixed" instead of "See" in r62073.

@mcsf mcsf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no strong opinion here, I'd say LGTM, but also cc @t-hamano in case Aki disagrees with this.

Comment thread Gruntfile.js
Comment on lines +2068 to +2069
'copy:icon-library-images',
'copy:icon-library-manifest',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why drop the "gutenberg-" prefix, since it's kept for the other tasks?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to remove gutenberg- entirely from these steps over time. While they come from the Gutenberg repository, Gutenberg = Core. In my opinion, if we are unable to reference each part of the code base by a descriptive name without a gutenberg- prefix, then we've done something wrong.

@mcsf

mcsf commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

IIRC, I originally set svn:ignore to reflect the .gitignore settings for icons. Something for you to keep in mind when you commit. :)

@desrosj
desrosj requested a review from t-hamano March 20, 2026 13:48
@desrosj

desrosj commented Mar 20, 2026

Copy link
Copy Markdown
Member Author

Thank you, @mcsf! Noted on the svn:ignore. Added @t-hamano for a third set of eyes.

@desrosj

desrosj commented Mar 20, 2026

Copy link
Copy Markdown
Member Author

I'm going to commit this so that it's included in the silent beta 6 later today.

@desrosj

desrosj commented Mar 20, 2026

Copy link
Copy Markdown
Member Author

Merged in r62077.

@desrosj desrosj closed this Mar 20, 2026
@desrosj
desrosj deleted the move/icon-library-image-assets branch March 20, 2026 15:41
@t-hamano

Copy link
Copy Markdown
Contributor

Sorry for the late reply! All changes look good to me👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants