Conversation
Fixes the broken PHP script in the blueprint and uses base64 encoding for the demo page content to prevent escaping issues. Updates the landing page to point directly to the newly created demo page.
…d code Replaces the dual `screen-reader-text sr-only` classes with a localized `sr-only` class and corresponding CSS to reduce external dependencies. Removes the deprecated block version and applies general code style formatting updates across the modal components.
Updates the blockparty-modal resource reference from the 1.0.5 tag to the chore/blueprint branch to incorporate recent changes.
Adds a leading slash to the wp-load.php path to ensure the script correctly bootstraps WordPress within the Playground environment.
This reverts commit bfd33cb.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| save, | ||
| deprecated, | ||
| } ); | ||
| }); |
There was a problem hiding this comment.
Removing block deprecation breaks existing saved blocks
High Severity
The deprecated array is removed from registerBlockType while simultaneously changing the save function output (class 'screen-reader-text sr-only' → 'sr-only'). Blocks saved with version 1.0.5 have screen-reader-text sr-only in the serialized HTML. Without a deprecation entry containing the old save function, WordPress block validation will fail for all those existing blocks, causing "This block contains unexpected or invalid content" errors in the editor.
Additional Locations (1)
| { | ||
| "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; ?>" | ||
| "code": "<?php\nrequire_once '/wordpress/wp-load.php';\n$page_content = base64_decode( 'PCEtLSB3cDpidXR0b25zIC0tPgo8ZGl2IGNsYXNzPSJ3cC1ibG9jay1idXR0b25zIj48IS0tIHdwOmJ1dHRvbiB7ImxpbmtlZE1vZGFsSWQiOiJtLWUxNmRlM2ZlNzlmOSJ9IC0tPgo8ZGl2IGNsYXNzPSJ3cC1ibG9jay1idXR0b24iPjxhIGNsYXNzPSJ3cC1ibG9jay1idXR0b25fX2xpbmsgd3AtZWxlbWVudC1idXR0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modal',\n\t'post_name' => 'blockparty-modal-demo',\n\t'post_content' => $page_content,\n\t'post_status' => 'publish',\n\t'post_type' => 'page',\n) );\necho 'Page created with ID: ' . $page_id;\n?>" |
There was a problem hiding this comment.
Blueprint demo content mismatches installed plugin version
Low Severity
The blueprint installs the plugin from the 1.0.5 git tag, which doesn't include the new .sr-only CSS class added in style.scss. However, the base64-encoded demo page content uses class="sr-only" (the new save output). Since v1.0.5's built stylesheet has no .sr-only rule, the close button label text ("Close this dialog window") will render as visible text on the Playground demo frontend instead of being visually hidden. The ref needs to point to a version that includes the .sr-only CSS, or the demo content needs to match v1.0.5's expected markup.


Note
Medium Risk
Removes the block’s
deprecatedsave handler and changes the close-label CSS class, which could cause block validation issues for existing content if older markup is still in use. Other changes are mostly demo/blueprint and styling updates.Overview
Updates the WordPress Playground
blueprint.jsonto land on a new/blockparty-modal-demo/page and creates that page viarunPHPusing base64-encoded block content (with an explicitpost_name).Simplifies the modal close-button label from
screen-reader-text sr-onlyto justsr-onlyin both editor (edit.js) and frontend serialization (save.js), and adds matching.sr-onlyvisually-hidden styling instyle.scss.Drops the block’s
deprecated.jsimplementation and stops registering it inindex.js(plus minor JSON/formatting tidy-ups).Written by Cursor Bugbot for commit 6120247. This will update automatically on new commits. Configure here.