diff --git a/packages/ckeditor5-essentials/ckeditor5-metadata.json b/packages/ckeditor5-essentials/ckeditor5-metadata.json
index e3b681a8113..e98f2336257 100644
--- a/packages/ckeditor5-essentials/ckeditor5-metadata.json
+++ b/packages/ckeditor5-essentials/ckeditor5-metadata.json
@@ -5,18 +5,6 @@
"className": "Essentials",
"description": "Includes all essential editing features like the clipboard, Enter and Shift+Enter keystrokes, typing and the undo support.",
"path": "src/essentials.js",
- "uiComponents": [
- {
- "type": "Button",
- "name": "undo",
- "iconPath": "@ckeditor/ckeditor5-undo/theme/icons/undo.svg"
- },
- {
- "type": "Button",
- "name": "redo",
- "iconPath": "@ckeditor/ckeditor5-undo/theme/icons/redo.svg"
- }
- ],
"htmlOutput": [
{
"elements": "br"
diff --git a/packages/ckeditor5-image/ckeditor5-metadata.json b/packages/ckeditor5-image/ckeditor5-metadata.json
index c977fe85dd1..2f6789e136e 100644
--- a/packages/ckeditor5-image/ckeditor5-metadata.json
+++ b/packages/ckeditor5-image/ckeditor5-metadata.json
@@ -23,7 +23,7 @@
{
"type": "Button",
"name": "imageTextAlternative",
- "iconPath": "",
+ "iconPath": "@ckeditor/ckeditor5-core/theme/icons/text-alternative.svg",
"toolbars": [
"image.toolbar"
]
@@ -57,7 +57,7 @@
{
"type": "Button",
"name": "imageTextAlternative",
- "iconPath": "",
+ "iconPath": "@ckeditor/ckeditor5-core/theme/icons/text-alternative.svg",
"toolbars": [
"image.toolbar"
]
@@ -97,7 +97,7 @@
{
"type": "Button",
"name": "toggleImageCaption",
- "iconPath": "",
+ "iconPath": "@ckeditor/ckeditor5-core/theme/icons/caption.svg",
"toolbars": [
"image.toolbar"
]
diff --git a/packages/ckeditor5-undo/ckeditor5-metadata.json b/packages/ckeditor5-undo/ckeditor5-metadata.json
new file mode 100644
index 00000000000..6787ee1b42a
--- /dev/null
+++ b/packages/ckeditor5-undo/ckeditor5-metadata.json
@@ -0,0 +1,23 @@
+{
+ "plugins": [
+ {
+ "name": "Undo",
+ "className": "Undo",
+ "description": "Support the undo and redo functionalities.",
+ "docs": "features/undo-redo.html",
+ "path": "src/undo.js",
+ "uiComponents": [
+ {
+ "type": "Button",
+ "name": "undo",
+ "iconPath": "@ckeditor/ckeditor5-undo/theme/icons/undo.svg"
+ },
+ {
+ "type": "Button",
+ "name": "redo",
+ "iconPath": "@ckeditor/ckeditor5-undo/theme/icons/redo.svg"
+ }
+ ]
+ }
+ ]
+}
diff --git a/scripts/ci/validate-metadata-files.js b/scripts/ci/validate-metadata-files.js
index 7172a909d1f..0532a1d77bf 100644
--- a/scripts/ci/validate-metadata-files.js
+++ b/scripts/ci/validate-metadata-files.js
@@ -145,9 +145,17 @@ function getMissingExports( packageData ) {
function getMissingIcons( packageData, options ) {
return packageData.metadata.plugins
.filter( plugin => plugin.uiComponents )
- .flatMap( plugin => plugin.uiComponents.map( uiComponent => uiComponent.iconPath ) )
- .filter( Boolean )
- .map( iconPath => {
+ .flatMap( plugin => plugin.uiComponents.map( uiComponent => ( {
+ ...plugin,
+ iconPath: uiComponent.iconPath,
+ uiComponentName: uiComponent.name
+ } ) ) )
+ .filter( ( { iconPath } ) => iconPath !== undefined )
+ .map( ( { iconPath, name, uiComponentName } ) => {
+ if ( iconPath === '' ) {
+ return `${ name } (\`${ uiComponentName }\`) has an empty \`iconPath\` value. Either define or remove it.`;
+ }
+
if ( iconPath.startsWith( '@ckeditor/' ) ) {
return iconPath;
}