-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from happyprime/feature/summary-block
Add a block to manage style and contents of `<summary>`
- Loading branch information
Showing
24 changed files
with
410 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/block.json", | ||
"apiVersion": 3, | ||
"name": "happyprime/show-hide-details", | ||
"title": "Show Hide Details", | ||
"textdomain": "show-hide-section-block", | ||
"category": "widgets", | ||
"description": "The remaining content in a details section.", | ||
"icon": "media-document", | ||
"parent": [ "happyprime/show-hide-section" ], | ||
"attributes": {}, | ||
"supports": {}, | ||
"editorScript": "file:index.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => 'f8e755a9302508f08a71'); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => '6d145d837d616cf3ec00'); | ||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-i18n'), 'version' => '70bf254dd1647cf40738'); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '4b0c5c44be5b8cf85a75'); | ||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => 'beb08742a35f54543878'); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/block.json", | ||
"apiVersion": 3, | ||
"name": "happyprime/show-hide-summary", | ||
"title": "Show Hide Summary", | ||
"textdomain": "show-hide-section-block", | ||
"category": "widgets", | ||
"description": "The summary element in a details section.", | ||
"icon": "media-document", | ||
"parent": [ "happyprime/show-hide-section" ], | ||
"attributes": { | ||
"summary": { | ||
"type": "string", | ||
"source": "html", | ||
"selector": "summary" | ||
} | ||
}, | ||
"supports": { | ||
"anchor": true, | ||
"align": true, | ||
"alignWide": true, | ||
"color": { | ||
"background": true, | ||
"enableContrastChecker": true, | ||
"text": true, | ||
"link": true, | ||
"gradients": true | ||
}, | ||
"defaultStylePicker": true, | ||
"dimensions": { | ||
"minHeight": true | ||
}, | ||
"html": false, | ||
"multiple": true, | ||
"position": { | ||
"sticky": false | ||
}, | ||
"spacing": { | ||
"margin": true, | ||
"padding": true | ||
}, | ||
"typography": { | ||
"fontSize": true, | ||
"lineHeight": true | ||
} | ||
}, | ||
"editorScript": "file:index.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-i18n'), 'version' => '10db6c2a73bed31cef63'); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,133 @@ | ||
# Copyright (C) 2023 Happy Prime | ||
# Copyright (C) 2024 Happy Prime | ||
# This file is distributed under the same license as the Show / Hide Section Block plugin. | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Show / Hide Section Block 2.0.0\n" | ||
"Project-Id-Version: Show / Hide Section Block 2.0.3\n" | ||
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/show-hide-section-block\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"POT-Creation-Date: 2023-03-03T16:41:52+00:00\n" | ||
"POT-Creation-Date: 2024-11-05T22:28:28+00:00\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"X-Generator: WP-CLI 2.6.0\n" | ||
"X-Generator: WP-CLI 2.10.0\n" | ||
"X-Domain: show-hide-section-block\n" | ||
|
||
#. Plugin Name of the plugin | ||
#: plugin.php | ||
msgid "Show / Hide Section Block" | ||
msgstr "" | ||
|
||
#. Plugin URI of the plugin | ||
msgid "https://github.com/happyprime/show-hide-section" | ||
#: plugin.php | ||
msgid "https://wordpress.org/plugins/show-hide-section-block/" | ||
msgstr "" | ||
|
||
#. Description of the plugin | ||
#: plugin.php | ||
msgid "Display an accessible show/hide interface with details and summary elements." | ||
msgstr "" | ||
|
||
#. Author of the plugin | ||
#: plugin.php | ||
msgid "Happy Prime" | ||
msgstr "" | ||
|
||
#. Author URI of the plugin | ||
#: plugin.php | ||
msgid "https://happyprime.co/" | ||
msgstr "" | ||
|
||
#: blocks/show-hide-group/index.js:37 | ||
#: build/show-hide-group.js:1 | ||
msgid "Close all" | ||
msgstr "" | ||
|
||
#: blocks/show-hide-group/index.js:47 | ||
#: blocks/show-hide-group/index.js:86 | ||
#: blocks/show-hide-group/index.js:119 | ||
#: build/show-hide-group.js:1 | ||
msgid "Open all" | ||
#: build/show-hide-details/index.js:1 | ||
#: src/show-hide-details/index.js:12 | ||
msgid "Remaining" | ||
msgstr "" | ||
|
||
#: blocks/show-hide-group/index.js:57 | ||
#: build/show-hide-group.js:1 | ||
#: build/show-hide-group/index.js:1 | ||
#: src/show-hide-group/index.js:57 | ||
msgid "Has open/close all toggle" | ||
msgstr "" | ||
|
||
#: blocks/show-hide-group/index.js:63 | ||
#: build/show-hide-group.js:1 | ||
#: build/show-hide-group/index.js:1 | ||
#: src/show-hide-group/index.js:63 | ||
msgid "Open/close all toggle will display." | ||
msgstr "" | ||
|
||
#: blocks/show-hide-group/index.js:67 | ||
#: build/show-hide-group.js:1 | ||
#: build/show-hide-group/index.js:1 | ||
#: src/show-hide-group/index.js:67 | ||
msgid "Open/close all toggle will not display." | ||
msgstr "" | ||
|
||
#: blocks/show-hide-section/index.js:37 | ||
#: blocks/show-hide-section/index.js:38 | ||
#: build/show-hide-section.js:1 | ||
#: build/show-hide-group/index.js:1 | ||
#: src/show-hide-group/index.js:37 | ||
msgid "Close all" | ||
msgstr "" | ||
|
||
#: build/show-hide-group/index.js:1 | ||
#: src/show-hide-group/index.js:47 | ||
#: src/show-hide-group/index.js:86 | ||
#: src/show-hide-group/index.js:108 | ||
msgid "Open all" | ||
msgstr "" | ||
|
||
#: build/show-hide-section/index.js:1 | ||
#: build/show-hide-summary/index.js:1 | ||
#: src/show-hide-section/index.js:19 | ||
#: src/show-hide-summary/index.js:18 | ||
#: src/show-hide-summary/index.js:19 | ||
msgid "Summary" | ||
msgstr "" | ||
|
||
#: blocks/show-hide-group/block.json | ||
#: build/show-hide-section/index.js:1 | ||
#: src/show-hide-section/index.js:23 | ||
msgid "Details" | ||
msgstr "" | ||
|
||
#: build/show-hide-details/block.json | ||
#: src/show-hide-details/block.json | ||
msgctxt "block title" | ||
msgid "Show Hide Details" | ||
msgstr "" | ||
|
||
#: build/show-hide-details/block.json | ||
#: src/show-hide-details/block.json | ||
msgctxt "block description" | ||
msgid "The remaining content in a details section." | ||
msgstr "" | ||
|
||
#: build/show-hide-group/block.json | ||
#: src/show-hide-group/block.json | ||
msgctxt "block title" | ||
msgid "Show Hide Group" | ||
msgstr "" | ||
|
||
#: blocks/show-hide-group/block.json | ||
#: build/show-hide-group/block.json | ||
#: src/show-hide-group/block.json | ||
msgctxt "block description" | ||
msgid "A group of accessible summaries that can be toggled to show or hide additional details." | ||
msgstr "" | ||
|
||
#: blocks/show-hide-section/block.json | ||
#: build/show-hide-section/block.json | ||
#: src/show-hide-section/block.json | ||
msgctxt "block title" | ||
msgid "Show Hide Section" | ||
msgstr "" | ||
|
||
#: blocks/show-hide-section/block.json | ||
#: build/show-hide-section/block.json | ||
#: src/show-hide-section/block.json | ||
msgctxt "block description" | ||
msgid "A section of collapsible content contained in a details element with a summary." | ||
msgstr "" | ||
|
||
#: build/show-hide-summary/block.json | ||
#: src/show-hide-summary/block.json | ||
msgctxt "block title" | ||
msgid "Show Hide Summary" | ||
msgstr "" | ||
|
||
#: build/show-hide-summary/block.json | ||
#: src/show-hide-summary/block.json | ||
msgctxt "block description" | ||
msgid "The summary element in a details section." | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": "https://json.schemastore.org/block.json", | ||
"apiVersion": 3, | ||
"name": "happyprime/show-hide-details", | ||
"title": "Show Hide Details", | ||
"textdomain": "show-hide-section-block", | ||
"category": "widgets", | ||
"description": "The remaining content in a details section.", | ||
"icon": "media-document", | ||
"parent": [ "happyprime/show-hide-section" ], | ||
"attributes": {}, | ||
"supports": {}, | ||
"editorScript": "file:index.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { registerBlockType } from '@wordpress/blocks'; | ||
import { InnerBlocks } from '@wordpress/block-editor'; | ||
import { __ } from '@wordpress/i18n'; | ||
|
||
// Internal dependencies. | ||
import metadata from './block.json'; | ||
|
||
const Edit = () => { | ||
const TEMPLATE = [ | ||
[ | ||
'core/paragraph', | ||
{ placeholder: __('Remaining', 'show-hide-section-block') }, | ||
], | ||
]; | ||
|
||
return ( | ||
<> | ||
<InnerBlocks template={TEMPLATE} templateLock={false} /> | ||
</> | ||
); | ||
}; | ||
|
||
const Save = () => { | ||
return <InnerBlocks.Content />; | ||
}; | ||
|
||
// Register the block. | ||
registerBlockType(metadata, { | ||
edit: Edit, | ||
save: Save, | ||
}); |
Oops, something went wrong.