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
2 changes: 1 addition & 1 deletion .plugin-data
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "2.0.0",
"version": "2.0.1",
"slug": "blockparty-tabs"
}
2 changes: 1 addition & 1 deletion .wordpress-org/blueprints/blueprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"pluginData": {
"resource": "git:directory",
"url": "https://github.com/BeAPI/blockparty-tabs",
"ref": "2.0.0",
"ref": "2.0.1",
"refType": "tag"
},
"options": {
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 2.0.1 - 2026-09-29

- Fix full-width (`alignfull`) tabs so panel padding is reset correctly
- Scope add/remove tab toolbar controls per block type (avoid ambiguous deletions from the panels wrapper)
- Update French translations

## 2.0.0 - 2026-09-28

- Require WordPress 6.2 or later
Expand Down
4 changes: 2 additions & 2 deletions blockparty-tabs.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Description: Accessible Tabs block for WordPress gutenberg.
* Requires at least: 6.4
* Requires PHP: 8.1
* Version: 2.0.0
* Version: 2.0.1
* Author: Be API Technical team
* Author URI: https://beapi.fr
* License: GPL-2.0-or-later
Expand All @@ -14,7 +14,7 @@

namespace Blockparty\Tabs;

define( 'BLOCKPARTY_TABS_VERSION', '2.0.0' );
define( 'BLOCKPARTY_TABS_VERSION', '2.0.1' );
define( 'BLOCKPARTY_TABS_URL', plugin_dir_url( __FILE__ ) );
define( 'BLOCKPARTY_TABS_DIR', plugin_dir_path( __FILE__ ) );
define( 'BLOCKPARTY_TABS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"translation-revision-date":"2026-09-24 15:04+0200","generator":"WP-CLI\/2.11.0","source":"build\/blockparty-tabs-nav\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Add tab":["Ajouter un onglet"],"Remove tab":["Supprimer l\u2019onglet"],"Settings":["R\u00e9glages"],"Label":["Libell\u00e9"],"Describe the purpose of this tabbed interface for assistive technologies.":["D\u00e9crivez l'objectif de cette interface \u00e0 onglets pour les technologies d'assistance."]}}}
{"translation-revision-date":"2026-09-29 13:46+0200","generator":"WP-CLI\/2.11.0","source":"build\/blockparty-tabs-nav\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Add tab":["Ajouter un onglet"],"Remove tab":["Supprimer l\u2019onglet"],"Settings":["R\u00e9glages"],"Label":["Libell\u00e9"],"Describe the purpose of this tabbed interface for assistive technologies.":["D\u00e9crivez l'objectif de cette interface \u00e0 onglets pour les technologies d'assistance."]}}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"translation-revision-date":"2026-09-24 15:04+0200","generator":"WP-CLI\/2.11.0","source":"build\/blockparty-tabs-nav-item\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Add tab":["Ajouter un onglet"],"Remove tab":["Supprimer l\u2019onglet"],"Move tab before":["D\u00e9placer l\u2019onglet \u00e0 gauche"],"Move tab after":["D\u00e9placer l\u2019onglet \u00e0 droite"],"Icon":["Ic\u00f4ne"],"Item\u2026":["\u00c9l\u00e9ment\u2026"]}}}
{"translation-revision-date":"2026-09-29 13:46+0200","generator":"WP-CLI\/2.11.0","source":"build\/blockparty-tabs-nav-item\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Add tab":["Ajouter un onglet"],"Remove tab":["Supprimer l\u2019onglet"],"Move tab before":["D\u00e9placer l\u2019onglet \u00e0 gauche"],"Move tab after":["D\u00e9placer l\u2019onglet \u00e0 droite"],"Icon":["Ic\u00f4ne"],"Item\u2026":["\u00c9l\u00e9ment\u2026"]}}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"translation-revision-date":"2026-09-24 15:04+0200","generator":"WP-CLI\/2.11.0","source":"build\/blockparty-tabs-panel-item\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Add tab":["Ajouter un onglet"],"Remove tab":["Supprimer l\u2019onglet"]}}}
{"translation-revision-date":"2026-09-29 13:46+0200","generator":"WP-CLI\/2.11.0","source":"build\/blockparty-tabs-panel-item\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Add tab":["Ajouter un onglet"],"Remove tab":["Supprimer l\u2019onglet"]}}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"translation-revision-date":"2026-09-24 15:04+0200","generator":"WP-CLI\/2.11.0","source":"build\/blockparty-tabs\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Add tab":["Ajouter un onglet"],"Remove tab":["Supprimer l\u2019onglet"],"Align top left":["Aligner en haut \u00e0 gauche"],"Align top center":["Aligner en haut au centre"],"Align top right":["Aligner en haut \u00e0 droite"],"Align top justified":["Aligner en haut justifi\u00e9"],"Align sidebar right":["Barre lat\u00e9rale \u00e0 droite"],"Align sidebar left":["Barre lat\u00e9rale \u00e0 gauche"]}}}
{"translation-revision-date":"2026-09-29 13:46+0200","generator":"WP-CLI\/2.11.0","source":"build\/blockparty-tabs\/index.js","domain":"messages","locale_data":{"messages":{"":{"domain":"messages","lang":"fr_FR","plural-forms":"nplurals=2; plural=(n != 1);"},"Add tab":["Ajouter un onglet"],"Remove tab":["Supprimer l\u2019onglet"],"Align top left":["Aligner en haut \u00e0 gauche"],"Align top center":["Aligner en haut au centre"],"Align top right":["Aligner en haut \u00e0 droite"],"Align top justified":["Aligner en haut justifi\u00e9"],"Align sidebar right":["Barre lat\u00e9rale \u00e0 droite"],"Align sidebar left":["Barre lat\u00e9rale \u00e0 gauche"]}}}
Binary file modified languages/blockparty-tabs-fr_FR.mo
Binary file not shown.
14 changes: 7 additions & 7 deletions languages/blockparty-tabs-fr_FR.po
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Blockparty Tabs 1.0.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/blockparty-tabs\n"
"POT-Creation-Date: 2026-09-24T13:02:27+00:00\n"
"PO-Revision-Date: 2026-09-24 15:04+0200\n"
"POT-Creation-Date: 2026-09-29T11:45:30+00:00\n"
"PO-Revision-Date: 2026-09-29 13:46+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr_FR\n"
Expand All @@ -18,7 +18,7 @@ msgstr ""
#. Plugin Name of the plugin
#: blockparty-tabs.php
msgid "Blockparty Tabs"
msgstr ""
msgstr "Blockparty Onglets"

#. Description of the plugin
#: blockparty-tabs.php
Expand All @@ -37,15 +37,13 @@ msgstr "https://beapi.fr"

#: build/blockparty-tabs-nav-item/index.js:1
#: build/blockparty-tabs-nav/index.js:1
#: build/blockparty-tabs-panel-item/index.js:1
#: build/blockparty-tabs-panels/index.js:1 build/blockparty-tabs/index.js:1
#: build/blockparty-tabs-panel-item/index.js:1 build/blockparty-tabs/index.js:1
msgid "Add tab"
msgstr "Ajouter un onglet"

#: build/blockparty-tabs-nav-item/index.js:1
#: build/blockparty-tabs-nav/index.js:1
#: build/blockparty-tabs-panel-item/index.js:1
#: build/blockparty-tabs-panels/index.js:1 build/blockparty-tabs/index.js:1
#: build/blockparty-tabs-panel-item/index.js:1 build/blockparty-tabs/index.js:1
msgid "Remove tab"
msgstr "Supprimer l’onglet"

Expand Down Expand Up @@ -160,6 +158,8 @@ msgid ""
"Organize content into tabs so visitors can browse sections without scrolling "
"endlessly."
msgstr ""
"Organisez le contenu en onglets afin que les visiteurs puissent parcourir "
"les sections sans avoir à faire défiler la page indéfiniment."

#~ msgid "Add Item Before"
#~ msgstr "Ajouter un élément à gauche"
Expand Down
6 changes: 2 additions & 4 deletions languages/blockparty-tabs.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the GPL-2.0-or-later.
msgid ""
msgstr ""
"Project-Id-Version: Blockparty Tabs 1.1.5\n"
"Project-Id-Version: Blockparty Tabs 2.0.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/blockparty-tabs\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2026-09-24T13:02:27+00:00\n"
"POT-Creation-Date: 2026-09-29T11:45:30+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.11.0\n"
"X-Domain: blockparty-tabs\n"
Expand Down Expand Up @@ -37,15 +37,13 @@ msgstr ""
#: build/blockparty-tabs-nav-item/index.js:1
#: build/blockparty-tabs-nav/index.js:1
#: build/blockparty-tabs-panel-item/index.js:1
#: build/blockparty-tabs-panels/index.js:1
#: build/blockparty-tabs/index.js:1
msgid "Add tab"
msgstr ""

#: build/blockparty-tabs-nav-item/index.js:1
#: build/blockparty-tabs-nav/index.js:1
#: build/blockparty-tabs-panel-item/index.js:1
#: build/blockparty-tabs-panels/index.js:1
#: build/blockparty-tabs/index.js:1
msgid "Remove tab"
msgstr ""
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blockparty-tabs",
"version": "2.0.0",
"version": "2.0.1",
"description": "Accessible tabs block for WordPress",
"author": "Be API Technical team",
"license": "GPL-2.0-or-later",
Expand Down
8 changes: 7 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: block, tabs, accessibility
Requires at least: 6.4
Requires PHP: 8.1
Tested up to: 7.1
Stable tag: 2.0.0
Stable tag: 2.0.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -33,6 +33,12 @@ directory take precedence. For example, `/assets/screenshot-1.png` would win ove

== Changelog ==

= 2.0.1 =

* Fix full-width (`alignfull`) tabs so panel padding is reset correctly
* Scope add/remove tab toolbar controls per block type (avoid ambiguous deletions from the panels wrapper)
* Update French translations

= 2.0.0 =

* Require WordPress 6.2 or later
Expand Down
2 changes: 1 addition & 1 deletion src/blockparty-tabs-nav-item/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": 2,
"name": "blockparty/tabs-nav-item",
"version": "2.0.0",
"version": "2.0.1",
"title": "Tab",
"category": "widgets",
"description": "A single tab button used to switch to its matching content panel.",
Expand Down
2 changes: 1 addition & 1 deletion src/blockparty-tabs-nav/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": 2,
"name": "blockparty/tabs-nav",
"version": "2.0.0",
"version": "2.0.1",
"title": "Tabs list",
"category": "widgets",
"description": "Display the tab list for switching between content panels.",
Expand Down
5 changes: 4 additions & 1 deletion src/blockparty-tabs-nav/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ export default function Edit( { attributes, setAttributes, clientId } ) {

return (
<>
<TabsAddRemoveBlockControls clientId={ clientId } />
<TabsAddRemoveBlockControls
clientId={ clientId }
showRemove={ false }
/>
<InspectorControls>
<PanelBody
title={ __( 'Settings', 'blockparty-tabs' ) }
Expand Down
2 changes: 1 addition & 1 deletion src/blockparty-tabs-panel-item/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": 2,
"name": "blockparty/tabs-panel-item",
"version": "2.0.0",
"version": "2.0.1",
"title": "Panel",
"category": "widgets",
"icon": "layout",
Expand Down
6 changes: 5 additions & 1 deletion src/blockparty-tabs-panel-item/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ export default function Edit( {

return (
<>
<TabsAddRemoveBlockControls clientId={ clientId } index={ index } />
<TabsAddRemoveBlockControls
clientId={ clientId }
index={ index }
showAdd={ false }
/>
<div { ...blockProps }>
<InnerBlocks
allowedBlocks={ allowedBlocks }
Expand Down
2 changes: 1 addition & 1 deletion src/blockparty-tabs-panels/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": 2,
"name": "blockparty/tabs-panels",
"version": "2.0.0",
"version": "2.0.1",
"title": "Panels",
"category": "widgets",
"description": "Group the content panels of a tabbed interface.",
Expand Down
10 changes: 2 additions & 8 deletions src/blockparty-tabs-panels/edit.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';
import { TabsAddRemoveBlockControls } from '../blockparty-tabs/TabsAddRemoveControls';

const BLOCKS_CHILD = 'blockparty/tabs-panel-item';
const ALLOWED_BLOCKS = [ BLOCKS_CHILD ];
const LOCK_TEMPLATE = { lock: { move: true, remove: true } };

export default function Edit( { clientId } ) {
export default function Edit() {
const blockProps = useBlockProps();
const innerBlocksProps = useInnerBlocksProps( blockProps, {
allowedBlocks: ALLOWED_BLOCKS,
Expand All @@ -20,10 +19,5 @@ export default function Edit( { clientId } ) {
renderAppender: false,
} );

return (
<>
<TabsAddRemoveBlockControls clientId={ clientId } />
<section { ...innerBlocksProps } />
</>
);
return <section { ...innerBlocksProps } />;
}
73 changes: 53 additions & 20 deletions src/blockparty-tabs/TabsAddRemoveControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -195,25 +195,40 @@ export const useTabsMutations = ( clientId, index ) => {
/**
* Toolbar group with Add tab / Remove tab buttons.
*
* @param {Object} props Component props.
* @param {string} props.clientId Block clientId (any block in the tabs tree).
* @param {number} [props.index] Explicit tab index; falls back to tabsActive.
* @return {Element} Toolbar group.
* @param {Object} props Component props.
* @param {string} props.clientId Block clientId (any block in the tabs tree).
* @param {number} [props.index] Explicit tab index; falls back to tabsActive.
* @param {boolean} [props.showAdd] Whether to show the Add tab control.
* @param {boolean} [props.showRemove] Whether to show the Remove tab control.
* @return {Element|null} Toolbar group.
*/
export const TabsAddRemoveToolbar = ( { clientId, index } ) => {
export const TabsAddRemoveToolbar = ( {
clientId,
index,
showAdd = true,
showRemove = true,
} ) => {
const { canRemove, insertTabAfterActive, removeTab } = useTabsMutations(
clientId,
index
);

if ( ! showAdd && ! showRemove ) {
return null;
}

return (
<ToolbarGroup>
<ToolbarButton onClick={ insertTabAfterActive }>
{ __( 'Add tab', 'blockparty-tabs' ) }
</ToolbarButton>
<ToolbarButton isDisabled={ ! canRemove } onClick={ removeTab }>
{ __( 'Remove tab', 'blockparty-tabs' ) }
</ToolbarButton>
{ showAdd && (
<ToolbarButton onClick={ insertTabAfterActive }>
{ __( 'Add tab', 'blockparty-tabs' ) }
</ToolbarButton>
) }
{ showRemove && (
<ToolbarButton isDisabled={ ! canRemove } onClick={ removeTab }>
{ __( 'Remove tab', 'blockparty-tabs' ) }
</ToolbarButton>
) }
</ToolbarGroup>
);
};
Expand Down Expand Up @@ -241,13 +256,31 @@ export const TabsNavAppender = ( { clientId } ) => {
/**
* BlockControls wrapper for Add / Remove tab actions.
*
* @param {Object} props Component props.
* @param {string} props.clientId Block clientId (any block in the tabs tree).
* @param {number} [props.index] Explicit tab index; falls back to tabsActive.
* @return {Element} Block controls with shared toolbar.
* @param {Object} props Component props.
* @param {string} props.clientId Block clientId (any block in the tabs tree).
* @param {number} [props.index] Explicit tab index; falls back to tabsActive.
* @param {boolean} [props.showAdd] Whether to show the Add tab control.
* @param {boolean} [props.showRemove] Whether to show the Remove tab control.
* @return {Element|null} Block controls with shared toolbar.
*/
export const TabsAddRemoveBlockControls = ( { clientId, index } ) => (
<BlockControls>
<TabsAddRemoveToolbar clientId={ clientId } index={ index } />
</BlockControls>
);
export const TabsAddRemoveBlockControls = ( {
clientId,
index,
showAdd = true,
showRemove = true,
} ) => {
if ( ! showAdd && ! showRemove ) {
return null;
}

return (
<BlockControls>
<TabsAddRemoveToolbar
clientId={ clientId }
index={ index }
showAdd={ showAdd }
showRemove={ showRemove }
/>
</BlockControls>
);
};
2 changes: 1 addition & 1 deletion src/blockparty-tabs/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": 2,
"name": "blockparty/tabs",
"version": "2.0.0",
"version": "2.0.1",
"title": "Tabs",
"category": "widgets",
"description": "Organize content into tabs so visitors can browse sections without scrolling endlessly.",
Expand Down
5 changes: 4 additions & 1 deletion src/blockparty-tabs/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ export default function Edit( { attributes, setAttributes, clientId } ) {
setAttributes( { mode: newAlign } )
}
/>
<TabsAddRemoveToolbar clientId={ clientId } />
<TabsAddRemoveToolbar
clientId={ clientId }
showRemove={ false }
/>
</BlockControls>
<div { ...innerBlocksProps } />
</>
Expand Down
Loading
Loading