Skip to content
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
c48652e
Add block.json and index.js.
ryanwelcher Aug 15, 2025
dce30d4
Update navigation block to allow the core/icon button.
ryanwelcher Aug 15, 2025
32dff7c
Update registration and remove filters from the index file.
ryanwelcher Aug 15, 2025
f9e8cc2
Initial js files commit with linting fixes.
ryanwelcher Aug 15, 2025
d489478
Add CSS files
ryanwelcher Aug 15, 2025
e5b3a2c
Add icon block css to package.
ryanwelcher Aug 15, 2025
5fcbfb0
Fix some issues with refactoring away the use of isEmpty.
ryanwelcher Aug 15, 2025
9a62df0
Start with the icon set defined in #16484
ryanwelcher Aug 15, 2025
cfa3595
Disable custom svg icons via the filter default.
ryanwelcher Aug 15, 2025
fcc9ec0
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Aug 22, 2025
aa9c2d7
Change index.scss to style.scss to match pattern of other blocks.
ryanwelcher Aug 22, 2025
3fd0e6d
Remove social icons directory as they are not being added for initial…
ryanwelcher Aug 22, 2025
630eb4e
Remove sparkles icon.
ryanwelcher Aug 22, 2025
f569ad8
Fix html-reacti-parser versioning.
ryanwelcher Aug 22, 2025
b0c7938
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Aug 26, 2025
fbf6d01
Update dependencies to include html-react-parser
ryanwelcher Aug 26, 2025
2dcecbd
Add schema to block.json
ryanwelcher Aug 26, 2025
7335df1
Add basic fixture for icon block.
ryanwelcher Aug 26, 2025
2cdef13
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Sep 4, 2025
389ba25
Remove withIllustration prop and related className from Placeholder.
ryanwelcher Sep 4, 2025
d6c452f
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Sep 10, 2025
71f632b
Decouple the saved icon from the @wordpress/icons library and display…
ryanwelcher Sep 11, 2025
e4d018d
Fix displaying custom SVG in the editor.
ryanwelcher Sep 11, 2025
db8d14a
Remove some empty categories from the list.
ryanwelcher Sep 11, 2025
f9e3511
Adjust the spacing between the custom SVG buttons based on A11y audit.
ryanwelcher Sep 11, 2025
7406f9f
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Sep 12, 2025
c82846d
Removing rotate, flipHor, flipVert, and percentWidth attributes and r…
ryanwelcher Sep 18, 2025
69a33cc
Remove itemsJustification attribute and related controls.
ryanwelcher Sep 18, 2025
e232e2b
Remove iconColor and iconColorValue attributes and related controls.
ryanwelcher Sep 18, 2025
7bcf763
Remove remaining color based attributes and related controls.
ryanwelcher Sep 18, 2025
f672cd1
Don't show the link rel if there is not a link defined.
ryanwelcher Sep 18, 2025
671c1b7
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Sep 25, 2025
1ed0c36
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Oct 2, 2025
6e708af
Remove the link control.
ryanwelcher Oct 2, 2025
3692eb0
Remove width and height attributes.
ryanwelcher Oct 2, 2025
d4bd2c3
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Oct 9, 2025
92c99ae
Update packages/block-library/src/icon/icons/index.js
ryanwelcher Oct 9, 2025
21bf61a
Update packages/block-library/src/icon/components/index.js
ryanwelcher Oct 9, 2025
3c8668e
Update packages/block-library/src/icon/block.json
ryanwelcher Oct 9, 2025
86e4aa7
Update packages/block-library/src/icon/components/icon-dropzone/index.js
ryanwelcher Oct 9, 2025
894ba52
Update packages/block-library/src/icon/components/custom-inserter/ind…
ryanwelcher Oct 9, 2025
dd8fcb3
Update packages/block-library/src/icon/components/custom-inserter/ind…
ryanwelcher Oct 9, 2025
38bdee0
Merge branch 'feature/add-icon-block' of github.com:WordPress/gutenbe…
ryanwelcher Oct 9, 2025
da41165
Add cautionFilled to the imports.
ryanwelcher Oct 9, 2025
caf1377
Remove the need for an inner wrapper. Move all styles and classes to …
ryanwelcher Oct 9, 2025
8387ecd
Clean up css to remove outer div and rotation/flip rules.
ryanwelcher Oct 9, 2025
6159196
Remove the icon-container class from edit. Remove more unused styles.
ryanwelcher Oct 9, 2025
0bae3ba
Change selector to root class icon attribute. Remove edit icon that w…
ryanwelcher Oct 9, 2025
456c1a2
Remove ariaLabel true until I know how it works.
ryanwelcher Oct 9, 2025
21e8b8c
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Jan 5, 2026
8a4ba8d
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Jan 19, 2026
78a2e91
Opt into width and heigh dimension controls.
ryanwelcher Jan 19, 2026
5a73067
Removing references to custom SVG upload as any custom icons should b…
ryanwelcher Jan 19, 2026
e5f8440
Remove components and logic associated with SVG uploading or direct i…
ryanwelcher Jan 19, 2026
339f54c
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Jan 19, 2026
990224a
Revert package-lock.json to trunk.
ryanwelcher Jan 19, 2026
68a3da8
Remove some more items related to upload/insert SVG functionality.
ryanwelcher Jan 19, 2026
774c88c
Remove some unused imports, functions, and hooks.
ryanwelcher Jan 19, 2026
bc19d64
Initial work to replace the custom inserter modal with one using Data…
ryanwelcher Jan 19, 2026
a712808
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Jan 20, 2026
7ca5ffd
* Add fake API request for the icons and related logic to load icons …
ryanwelcher Jan 20, 2026
4cb0c0e
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Jan 30, 2026
030e594
Remove the custom inserter in favor of one that uses the DataViewsPicker
ryanwelcher Jan 30, 2026
8064f92
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Jan 30, 2026
82742d2
Make the icon block experimental as it's reliant on the SVG endpoint …
ryanwelcher Jan 30, 2026
a10c812
Fix conditional registration of Icon block
mcsf Feb 2, 2026
979d70e
Fix full-content integration test for Icon block
mcsf Feb 2, 2026
a77dfcf
Fix missing spacing in Title attribute panel
mcsf Feb 2, 2026
7fec0f4
Fix icon picker modal not showing which icon is in use
mcsf Feb 2, 2026
dca55d0
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Feb 2, 2026
921def2
Remove hardcoded list of icons used before the API was available.
ryanwelcher Feb 2, 2026
7d465fe
Make the icon block dynamic.
ryanwelcher Feb 2, 2026
b01ec7c
Remove some files that are not needed.
ryanwelcher Feb 2, 2026
8a6904d
Updates to move the block to use dynamic rendering.
ryanwelcher Feb 2, 2026
88a9d24
Fix the imports for the bolt icon. Change the example in the block re…
ryanwelcher Feb 2, 2026
1c89dc7
Set the default size of the icon to 48px.
ryanwelcher Feb 2, 2026
8b2664e
Clean up to the edit.
ryanwelcher Feb 2, 2026
299c6ee
Join UI sentences with createInterpolateElement
mcsf Feb 3, 2026
4670b3b
Fix block's textdomain
mcsf Feb 3, 2026
77de48f
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Feb 3, 2026
289ec94
Enforce the default width value if the width is set to 0 manualy or v…
ryanwelcher Feb 3, 2026
bd82250
There is no linking functionality provided by this block so all Icons…
ryanwelcher Feb 3, 2026
d415243
Drop explicit `style` attribute and default width
mcsf Feb 3, 2026
24aae23
Apply useBlockProps consistently
mcsf Feb 3, 2026
7b5682c
index.php: Cosmetic changes & remove outdated comment
mcsf Feb 3, 2026
4ae2eee
Merge remote-tracking branch 'refs/remotes/origin/feature/add-icon-bl…
ryanwelcher Feb 3, 2026
395a301
Condense title and label attributes:
ryanwelcher Feb 3, 2026
ee00a46
Some linting fixes.
ryanwelcher Feb 3, 2026
7af2aa4
Changes to output structure to accomodate CSS changes.
ryanwelcher Feb 3, 2026
7d6942f
Small linting fixes.
ryanwelcher Feb 3, 2026
70fdc10
Remove commented out code.
ryanwelcher Feb 3, 2026
cba51d6
Regenerate block test fixtures.
ryanwelcher Feb 3, 2026
18877de
Whitespace man...
ryanwelcher Feb 3, 2026
b114cd1
Fix incorrect spread assignment.
ryanwelcher Feb 3, 2026
5dd367e
Modify the inserter modal
ryanwelcher Feb 4, 2026
f257ecd
Merge branch 'trunk' into feature/add-icon-block
t-hamano Feb 4, 2026
6f2482e
Migrate label attributes to ariaLabel block support
t-hamano Feb 4, 2026
081c8af
Update packages/block-library/src/icon/index.php
ryanwelcher Feb 4, 2026
2376df4
Update packages/block-library/src/icon/block.json
ryanwelcher Feb 4, 2026
1be21ec
Update packages/block-library/src/icon/block.json
ryanwelcher Feb 4, 2026
efb732b
Removing the title attribute from being added.
ryanwelcher Feb 4, 2026
6b471bc
Remove unused section.
ryanwelcher Feb 4, 2026
a7b0773
Add some editor only CSS to address the label popover in contentOnly …
ryanwelcher Feb 4, 2026
a54bbbf
Remove some unneeded CSS for the toobar.
ryanwelcher Feb 4, 2026
a12f5f7
Use useToolsPanelDropdownMenuProps from the block-library package.
ryanwelcher Feb 4, 2026
40405cf
Fix ariaLabel not being reset.
ryanwelcher Feb 4, 2026
549f110
Remove parseIcon and related utilites in favor of HtmlRenderer
ryanwelcher Feb 4, 2026
a694436
Whitespace linting issue.
ryanwelcher Feb 4, 2026
2dd3108
Add dataviews to the block-library tsconfig
ryanwelcher Feb 4, 2026
29d0e6c
Re-instate a simplified version of the custom inserter from the origi…
ryanwelcher Feb 4, 2026
19c244b
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Feb 5, 2026
afe6752
Remove the DataViewsPicker UI implementation.
ryanwelcher Feb 5, 2026
31f6769
Update packages/block-library/src/icon/components/custom-inserter/con…
ryanwelcher Feb 5, 2026
69d90b1
Update packages/block-library/src/icon/components/custom-inserter/con…
ryanwelcher Feb 5, 2026
e34da36
Update packages/block-library/src/icon/components/custom-inserter/ind…
ryanwelcher Feb 5, 2026
b6b1d94
Update packages/block-library/src/icon/components/custom-inserter/ind…
ryanwelcher Feb 5, 2026
db323f2
Simplify the placeholder and update CSS selectors.
ryanwelcher Feb 5, 2026
fafca6e
Update the block icon.
ryanwelcher Feb 5, 2026
5514be7
Make the icons smaller in the modal.
ryanwelcher Feb 5, 2026
b2fc611
Make modal title sentence case.
ryanwelcher Feb 5, 2026
ee047b0
Remove search results text from modal.
ryanwelcher Feb 5, 2026
fe78d42
Clean up the modal icon grid view.
ryanwelcher Feb 5, 2026
d4b3c97
Remove some unused selectors.
ryanwelcher Feb 5, 2026
3fb223e
Remove unused class in the popover.
ryanwelcher Feb 5, 2026
fed9fc8
Remove the dataviews dependency.
ryanwelcher Feb 5, 2026
f9aa552
rebuild package-lock.json after removing the dataviews dependency.
ryanwelcher Feb 6, 2026
f9eced6
Add incorrectly removed whitespace line.
ryanwelcher Feb 6, 2026
1b3fb4b
Use sprintf to output the final markup.
ryanwelcher Feb 6, 2026
7f9686e
Simplify CSS
t-hamano Feb 6, 2026
09deb30
Update packages/block-library/src/icon/icons/index.js
ryanwelcher Feb 6, 2026
77aef6e
Update placeholder to use suggested approach.
ryanwelcher Feb 6, 2026
0ac8cce
Remove useEffect and directly derive the active icon. Remove the rese…
ryanwelcher Feb 6, 2026
65335bf
Set the default size to 24px and the minmum to 12px.
ryanwelcher Feb 6, 2026
c13d9be
Add private selector to core-data store to retrieve the icons.
ryanwelcher Feb 6, 2026
54c7210
Update return type for the getIcons selector.
ryanwelcher Feb 6, 2026
764a51b
Clean up block.json
ryanwelcher Feb 6, 2026
ac46721
Re-add the interactivity property to allow Query Loop blocks to load …
ryanwelcher Feb 6, 2026
6b540e3
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Feb 9, 2026
4b9cc98
Inline the content header component.
ryanwelcher Feb 9, 2026
60a7622
Update docs/reference-guides/core-blocks.md
ryanwelcher Feb 9, 2026
7888785
Add 300ms debouce to the icon search.
ryanwelcher Feb 9, 2026
0034a1b
Set the placeholder size based on the conrol value.
ryanwelcher Feb 9, 2026
b5e72ff
Update packages/block-library/src/icon/index.php
ryanwelcher Feb 10, 2026
37968f9
Update packages/block-library/src/icon/index.php
ryanwelcher Feb 10, 2026
05ea576
Update packages/block-library/src/icon/index.php
ryanwelcher Feb 10, 2026
7764c64
Update packages/block-library/src/icon/index.php
ryanwelcher Feb 10, 2026
0e3fb8d
Update packages/block-library/src/icon/edit.js
ryanwelcher Feb 10, 2026
de7ffaa
Update packages/block-library/src/icon/edit.js
ryanwelcher Feb 10, 2026
8d10d49
Update packages/block-library/src/icon/components/custom-inserter/ind…
ryanwelcher Feb 10, 2026
69260f8
Merge branch 'trunk' into feature/add-icon-block
ryanwelcher Feb 10, 2026
efec050
Rebuild docs after 75391 was merged.
ryanwelcher Feb 10, 2026
3bdbd39
FIx linting error
ryanwelcher Feb 10, 2026
2881dc8
Fix application of debounce pattern
mcsf Feb 11, 2026
e806400
Memoize search-term-matching icons with useMemo
mcsf Feb 11, 2026
a9fe6cc
Allow searching by icon label
mcsf Feb 11, 2026
408d491
Search normalization: strip accents, trim
mcsf Feb 11, 2026
a52d20a
Memoise IconGrid's state setter
mcsf Feb 11, 2026
81bd8ef
Use utility function
t-hamano Feb 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,15 @@ Add custom HTML code and preview it as you edit. ([Source](https://github.com/Wo
- **Supports:** interactivity (clientNavigation), ~~className~~, ~~customClassName~~, ~~html~~
- **Attributes:** content

## Icon

Insert an SVG icon or graphic. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/icon))

- **Name:** core/icon
- **Category:** media
- **Supports:** align, anchor, interactivity (clientNavigation), spacing (margin, padding), ~~html~~
- **Attributes:** height, icon, iconName, label, linkRel, linkTarget, linkUrl, title, width

## Image

Insert an image to make a visual statement. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/image))
Expand Down Expand Up @@ -516,7 +525,7 @@ A collection of blocks that allow visitors to get around your site. ([Source](ht

- **Name:** core/navigation
- **Category:** theme
- **Allowed Blocks:** core/navigation-link, core/search, core/social-links, core/page-list, core/spacer, core/home-link, core/site-title, core/site-logo, core/navigation-submenu, core/loginout, core/buttons
- **Allowed Blocks:** core/navigation-link, core/search, core/social-links, core/page-list, core/spacer, core/home-link, core/icon, core/site-title, core/site-logo, core/navigation-submenu, core/loginout, core/buttons
- **Supports:** align (full, wide), ariaLabel, inserter, interactivity, layout (allowSizingOnChildren, default, ~~allowInheriting~~, ~~allowSwitching~~, ~~allowVerticalAlignment~~), spacing (blockGap, units), typography (fontSize, lineHeight), ~~html~~, ~~renaming~~
- **Attributes:** __unstableLocation, backgroundColor, customBackgroundColor, customOverlayBackgroundColor, customOverlayTextColor, customTextColor, hasIcon, icon, maxNestingLevel, openSubmenusOnClick, overlayBackgroundColor, overlayMenu, overlayTextColor, ref, rgbBackgroundColor, rgbTextColor, showSubmenuIcon, templateLock, textColor

Expand Down
187 changes: 187 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/block-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"escape-html": "^1.0.3",
"fast-average-color": "^9.1.1",
"fast-deep-equal": "^3.1.3",
"html-react-parser": "^5.2.6",
"memize": "^2.1.0",
"remove-accents": "^0.5.0",
"uuid": "^9.0.1"
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/src/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
@import "./gallery/editor.scss";
@import "./group/editor.scss";
@import "./html/editor.scss";
@import "./icon/editor.scss";
@import "./image/editor.scss";
@import "./latest-posts/editor.scss";
@import "./media-text/editor.scss";
Expand Down
77 changes: 77 additions & 0 deletions packages/block-library/src/icon/block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"apiVersion": 3,
"$schema": "https://schemas.wp.org/trunk/block.json",
"name": "core/icon",
"title": "Icon",
"category": "media",
"description": "Insert an SVG icon or graphic.",
"keywords": [ "icon", "svg" ],
"attributes": {
"icon": {
"type": "string",
"source": "html",
"selector": ".icon-container",
"default": "",
"__experimentalRole": "content"
},
"iconName": {
"type": "string",
"__experimentalRole": "content"
},
Comment thread
ryanwelcher marked this conversation as resolved.
"label": {
"type": "string"
},
Comment thread
t-hamano marked this conversation as resolved.
Outdated
"title": {
"type": "string"
},
"linkUrl": {
"type": "string"
},
"linkRel": {
"type": "string"
},
"linkTarget": {
"type": "string"
},
"width": {
Comment thread
ryanwelcher marked this conversation as resolved.
Outdated
"type": [ "string", "number" ]
},
"height": {
"type": "string"
}
},
"supports": {
"anchor": true,
"align": true,
Comment thread
ryanwelcher marked this conversation as resolved.
Outdated
"html": false,
"interactivity": {
"clientNavigation": true
},
"__experimentalBorder": {
"color": true,
"radius": true,
"style": true,
"width": true,
"__experimentalSelector": ".icon-container",
"__experimentalSkipSerialization": true,
"__experimentalDefaultControls": {
"color": false,
"radius": false,
"style": false,
"width": false
}
},
"spacing": {
"padding": true,
"margin": true,
"__experimentalDefaultControls": {
"margin": false,
"padding": false
}
}
},
"textdomain": "icon-block",
"editorScript": "file:./index.js",
"editorStyle": "file:./editor.css",
"style": "file:./style.css"
}
Loading
Loading