diff --git a/.github/workflows/push-deploy.yml b/.github/workflows/push-deploy.yml index 0e1cd16..5ba16ec 100644 --- a/.github/workflows/push-deploy.yml +++ b/.github/workflows/push-deploy.yml @@ -21,11 +21,8 @@ jobs: SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} SVN_USERNAME: ${{ secrets.SVN_USERNAME }} - name: Upload release asset - uses: actions/upload-release-asset@v1 + uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ${{ steps.deploy.outputs.zip-path }} - asset_name: ${{ github.event.repository.name }}.zip - asset_content_type: application/zip + files: ${{ github.workspace }}/${{ github.event.repository.name }}.zip diff --git a/README.md b/README.md index e56044d..5b15ca9 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,12 @@ # Insert Special Characters -> A Special Character inserter for the WordPress block editor (Gutenberg). +![Insert Special Characters](https://github.com/10up/insert-special-characters/blob/develop/.wordpress-org/banner-1544x500.png) + +[![Support Level](https://img.shields.io/badge/support-stable-blue.svg)](#support-level) ![WordPress tested up to version](https://img.shields.io/wordpress/plugin/tested/insert-special-characters?label=WordPress) [![GPLv2 License](https://img.shields.io/github/license/10up/insert-special-characters.svg)](https://github.com/10up/insert-special-characters/blob/develop/LICENSE.md) [![Dependency Review](https://github.com/10up/insert-special-characters/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/10up/insert-special-characters/actions/workflows/dependency-review.yml) [![WordPress Plugin Version](https://img.shields.io/wordpress/plugin/v/insert-special-characters?logo=wordpress&logoColor=FFFFFF&label=Playground%20Demo&labelColor=3858E9&color=3858E9)](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/10up/insert-special-characters/develop/.wordpress-org/blueprints/blueprint.json) -[![Support Level](https://img.shields.io/badge/support-stable-blue.svg)](#support-level) [![Release Version](https://img.shields.io/github/release/10up/insert-special-characters.svg)](https://github.com/10up/insert-special-characters/releases/latest) ![WordPress tested up to version](https://img.shields.io/wordpress/plugin/tested/insert-special-characters?label=WordPress) [![GPLv2 License](https://img.shields.io/github/license/10up/insert-special-characters.svg)](https://github.com/10up/insert-special-characters/blob/develop/LICENSE.md) +[![E2E test](https://github.com/10up/insert-special-characters/actions/workflows/cypress.yml/badge.svg)](https://github.com/10up/insert-special-characters/actions/workflows/cypress.yml) [![ESLint](https://github.com/10up/insert-special-characters/actions/workflows/eslint.yml/badge.svg)](https://github.com/10up/insert-special-characters/actions/workflows/eslint.yml) [![PHPCS](https://github.com/10up/insert-special-characters/actions/workflows/phpcs.yml/badge.svg)](https://github.com/10up/insert-special-characters/actions/workflows/phpcs.yml) [![PHP Compatibility](https://github.com/10up/insert-special-characters/actions/workflows/php-compatibility.yml/badge.svg)](https://github.com/10up/insert-special-characters/actions/workflows/php-compatibility.yml) [![CodeQL](https://github.com/10up/insert-special-characters/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/10up/insert-special-characters/actions/workflows/codeql-analysis.yml) + +> A Special Character inserter for the WordPress block editor (Gutenberg). ## Overview @@ -41,8 +45,8 @@ wp.hooks.addFilter( ## Requirements -* PHP 5.6+ -* [WordPress](http://wordpress.org/) 5.5+ +* PHP 7.4+ +* [WordPress](http://wordpress.org/) 6.1+ ## Installation diff --git a/readme.txt b/readme.txt index e0c3c87..14a3385 100644 --- a/readme.txt +++ b/readme.txt @@ -1,9 +1,9 @@ === Insert Special Characters === Contributors: 10up, adamsilverstein, johnwatkins0, jeffpaul -Tags: Special Characters, Character Map, Omega, Gutenberg, Block, block editor +Tags: Special Characters, Character Map, Omega, character inserter, symbols Stable tag: 1.1.2 Requires at least: 6.1 -Tested up to: 6.4 +Tested up to: 6.6 Requires PHP: 7.4 License: GPLv2 License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html @@ -21,7 +21,7 @@ Development takes place in the [GitHub repository](https://github.com/10up/inser == Technical Notes == * Requires PHP 7.4+. -* Requires [WordPress](http://wordpress.org/) 5.7+ +* Requires [WordPress](http://wordpress.org/) 6.1+ * Issues and Pull requests welcome in the [GitHub repository](https://github.com/10up/insert-special-characters). == Installation == diff --git a/src/index.js b/src/index.js index aceddd8..f4addd6 100644 --- a/src/index.js +++ b/src/index.js @@ -13,7 +13,7 @@ import { useMemo, } from '@wordpress/element'; import { BlockControls, RichTextShortcut } from '@wordpress/block-editor'; -import { Popover, ToolbarButton, ToolbarGroup } from '@wordpress/components'; +import { ToolbarButton, Dropdown } from '@wordpress/components'; import { applyFilters } from '@wordpress/hooks'; import { displayShortcut } from '@wordpress/keycodes'; import { __ } from '@wordpress/i18n'; @@ -151,21 +151,10 @@ registerFormatType( type, { }, [ isPopoverActive, memoizedPopoverRef ] ); const characters = applyFilters( `${ name }-characters`, Chars ); - // Display the character map when it is active. - const specialCharsPopover = isPopoverActive && ( - + + // Character map component used by the dropdown render. + const characterMap = () => { + return ( - - ); + ); + }; return ( - - - setIsPopoverActive( ! isPopoverActive ) - } - shortcut={ displayShortcut.primary( character ) } - /> - + + setIsPopoverActive( ! isPopoverActive ) + } + contentClassName="insert-special-character__dropdown-content" + renderToggle={ ( { onToggle, isOpen } ) => ( + + ) } + renderContent={ characterMap } + /> setIsPopoverActive( ! isPopoverActive ) } /> - { specialCharsPopover } ); },