Merged
Conversation
Release 1.0.4
Chore/blueprint
Adds the standard WordPress `screen-reader-text` class alongside `sr-only` to ensure the close button label is correctly hidden visually while remaining accessible to screen readers when the "display icon only" option is active.
Adds a PHP step to the blueprint that automatically creates a sample page showcasing the Blockparty Modal block. Updates the landing page configuration to direct users to the editor for this newly created post instead of a blank new post.
Ensures existing block content remains valid by providing a fallback for the markup used before the `screen-reader-text` class was added to the close button label.
Chore blueprint
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| }, | ||
| { | ||
| "step": "runPHP", | ||
| "code": "<?php require_once 'wordpress/wp-load.php'; $page_content = '<?php require_once 'wordpress/wp-load.php'; $page_content = '<!-- wp:buttons -->\n<div class=\"wp-block-buttons\"><!-- wp:button {\"linkedModalId\":\"m-e16de3fe79f9\"} -->\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\">Open my modal window</a></div>\n<!-- /wp:button --></div>\n<!-- /wp:buttons -->\n\n<!-- wp:blockparty/modal {\"title\":\"My Modal\",\"modalId\":\"m-e16de3fe79f9\",\"displayIconOnly\":true,\"style\":{\"spacing\":{\"padding\":{\"top\":\"var:preset|spacing|40\",\"bottom\":\"var:preset|spacing|40\",\"left\":\"var:preset|spacing|40\",\"right\":\"var:preset|spacing|40\"}}}} -->\n<dialog class=\"wp-block-blockparty-modal\" style=\"padding-top:var(--wp--preset--spacing--40);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--40);padding-left:var(--wp--preset--spacing--40)\" id=\"modal-m-e16de3fe79f9\" aria-modal=\"true\" closedby=\"any\"><div class=\"wp-block-blockparty-modal__header\"><h2 class=\"wp-block-blockparty-modal__title\">My Modal</h2></div><div class=\"wp-block-blockparty-modal__content\"><!-- wp:paragraph -->\n<p>Blockparty Modal is a WordPress plugin that lets you add accessible modal dialogs to your content via the Gutenberg block editor. You define the modal content and behaviour in the editor; on the frontend, the modal is shown when the user activates a linked trigger (such as a button block).</p>\n<!-- /wp:paragraph --></div><button type=\"button\" class=\"wp-block-blockparty-modal__close-button\"><span class=\"sr-only\">Close this dialog window</span><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24\" height=\"24\" aria-hidden=\"true\"><path d=\"m13.06 12 6.47-6.47-1.06-1.06L12 10.94 5.53 4.47 4.47 5.53 10.94 12l-6.47 6.47 1.06 1.06L12 13.06l6.47 6.47 1.06-1.06L13.06 12Z\"></path></svg></button></dialog>\n<!-- /wp:blockparty/modal -->'; $page_id = wp_insert_post(array('post_title' => 'Blockparty Modal', 'post_content' => $page_content, 'post_status' => 'publish', 'post_type' => 'page')); echo 'Page created with ID: ' . $page_id; ?>'; $page_id = wp_insert_post(array('post_title' => 'Blockparty Modal', 'post_content' => $page_content, 'post_status' => 'publish', 'post_type' => 'page')); echo 'Page created with ID: ' . $page_id; ?>" |
There was a problem hiding this comment.
Duplicated PHP code in blueprint runPHP step
High Severity
The code field in the runPHP step contains the entire PHP snippet duplicated — the full script is nested inside itself as the value of $page_content. The outer copy opens a single-quoted string ($page_content = '<?php require_once ') which is immediately terminated by the unescaped single quote before wordpress in the inner copy, causing a PHP parse error. The WordPress Playground blueprint will fail to create the demo page.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Release 1.0.5
Note
Low Risk
Low risk: changes are mainly version bumps, documentation, and a small markup/class tweak to the modal close label with a deprecation entry to keep existing content valid.
Overview
Releases v1.0.5 by bumping version references across plugin metadata (
blockparty-modal.php,package.json,block.json,.plugin-data) and updating changelogs inREADME.md/readme.txt.Updates the modal close button label so icon-only mode also applies the
screen-reader-textclass (in botheditandsaveoutput), and registers a newdeprecatedsave variant to preserve block validation for existing posts.Adds
blueprint.jsonfor WordPress Playground testing, including a scripted step to install/activate the tagged plugin and open a pre-created editor page.Written by Cursor Bugbot for commit fb71f84. This will update automatically on new commits. Configure here.