Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 2 additions & 7 deletions .github/workflows/quality-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@ name: Javascript Quality Checks

on:
pull_request:
paths:
- 'src/**'
push:
paths:
- 'src/**'
branches:
- main
paths:
- 'src/**'

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
Expand Down
2 changes: 1 addition & 1 deletion .plugin-data
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "1.0.4",
"version": "1.0.5",
"slug": "blockparty-icons"
}
9 changes: 6 additions & 3 deletions .wp-env/themes/icon-block-theme/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,27 @@ function wpc_mime_types( $mimes ) {

add_action( 'blockparty_icons_init', function () {
register_icon_collection(
'Bootstrap',
'icon-bootstrap',
[
'label' => 'Bootstrap Icons',
'type' => 'sprite',
'source' => get_theme_file_path( '/icons/bootstrap-icons.svg' ),
]
);

register_icon_collection(
'Social',
'icon-social',
[
'label' => 'Social Icons',
'type' => 'sprite',
'source' => get_theme_file_path( '/icons/social.svg' ),
]
);

register_icon_collection(
'Folder',
'icon-user',
[
'label' => 'User Icons',
'type' => 'folder',
'source' => get_theme_file_path( '/icons/user' ),
]
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ This plugin **doesn't run any sanitization on SVGs** before using them. Only use

## Changelog

### 1.0.5 - 2026-02-23

- Set label collection on tabs item in icons selector modal instead of collection slug
- Add tooltip to icon selector buttons
- Remove quality js workflow on merge

### 1.0.4 - 2026-02-20

- Improve search result display in icons selector modal.
Expand Down
4 changes: 2 additions & 2 deletions blockparty-icons.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Description: Provides blocks in WordPress editor to add custom SVG icons.
* Requires at least: 6.2
* Requires PHP: 8.1
* Version: 1.0.4
* Version: 1.0.5
* Author: Blockparty
* Author URI: https://beapi.fr
* License: GPL-2.0-or-later
Expand All @@ -29,7 +29,7 @@
include_once __DIR__ . '/vendor/autoload.php';
}

define( 'BLOCKPARTY_ICONS_VERSION', '1.0.4' );
define( 'BLOCKPARTY_ICONS_VERSION', '1.0.5' );
define( 'BLOCKPARTY_ICONS_URL', plugin_dir_url( __FILE__ ) );
define( 'BLOCKPARTY_ICONS_DIR', plugin_dir_path( __FILE__ ) );
define( 'BLOCKPARTY_ICONS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blockparty-icons",
"version": "1.0.4",
"version": "1.0.5",
"description": "Provides blocks in WordPress editor to add custom SVG icons from your theme.",
"author": "Be API Technical team",
"license": "GPL-2.0-or-later",
Expand Down
2 changes: 1 addition & 1 deletion src/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "blockparty/icon",
"version": "1.0.4",
"version": "1.0.5",
"title": "Icon",
"category": "widgets",
"description": "Easily add custom vector icon to your content.",
Expand Down
6 changes: 4 additions & 2 deletions src/components/icon-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -535,14 +535,16 @@ function IconModal( { collections, onClose, handleIconSelectButtonClick } ) {
'blockparty-icons'
),
capitalize(
c.name
c.label ||
c.name
),
c.icons
?.length ??
0
)
: capitalize(
c.name
c.label ||
c.name
),
} )
) }
Expand Down
49 changes: 27 additions & 22 deletions src/components/icon-selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
* WordPress dependencies
*/
import { memo } from '@wordpress/element';
import { Button } from '@wordpress/components';
import { Button, Tooltip } from '@wordpress/components';

import IconContent from './icon-content';
import { capitalize } from '../utils';

/**
* IconSelector component
Expand All @@ -28,28 +29,32 @@ function IconSelector( {
children,
} ) {
return (
<Button
className="block-editor-block-types-list__item"
onClick={ () => handleIconSelectButtonClick( collection, icon ) }
>
<span className="block-editor-block-types-list__item-icon">
<span className="block-editor-block-icon has-colors">
<IconContent
iconData={ {
content: icon.content,
icon,
iconColor,
padding,
size,
} }
type={ icon.type }
/>
<Tooltip text={ capitalize( icon.label || icon.name ) }>
<Button
className="block-editor-block-types-list__item"
onClick={ () =>
handleIconSelectButtonClick( collection, icon )
}
>
<span className="block-editor-block-types-list__item-icon">
<span className="block-editor-block-icon has-colors">
<IconContent
iconData={ {
content: icon.content,
icon,
iconColor,
padding,
size,
} }
type={ icon.type }
/>
</span>
</span>
</span>
<span className="block-editor-block-types-list__item-title">
{ children }
</span>
</Button>
<span className="block-editor-block-types-list__item-title">
{ children }
</span>
</Button>
</Tooltip>
);
}

Expand Down
Loading