Icons Registry: Don't expose "internal" icons#75526
Merged
Conversation
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.
What?
Follow-up of #72215
Follow @jasmussen's recommendation to try to distinguish icons meant for internal use only and those we'd like to expose to consumers such as the Icon block (#71227), i.e. those icons that users are more likely to want to use in the front end:
How?
public'public' => trueWhy not simply remove them from the manifest?
We can, but by keeping them (and adding this property) we can keep our validate-collection script, which helps us ensure that the manifest and the SVG files never go out of sync. This seems like a better tradeoff.
Testing Instructions
(outdated) To properly visualise the icons grid, apply the following patch — which is a modified version of @t-hamano's snippet from #75273 — then, in a fresh post editor, insert block "Icon List Test".
(outdated snippet)
To view the full set, including disabled icons, comment out the statement
continue;inWP_Icons_Registry::__constructwhere it ignores hidden/disabled icons.Screenshots or screencast
Comparison of expected and actual grid: