Repository navigation
WordPress 7.1 maintenance: standards, dependencies, wp-env - #51
Draft
jeremyfelt wants to merge 15 commits into
Draft
jeremyfelt wants to merge 15 commits into
jeremyfelt wants to merge 15 commits into
Conversation
Drop the inline php-compatibility package repository, which was also declared twice, and the direct php-compatibility require. The standard now provides PHPCompatibility 10 from real releases. Rename the ruleset to phpcs.xml.dist, reference HappyPrime by name, and enforce the text domain and global prefixes so WordPress.org-style checks run locally. Point PHPStan at the plugin file and use the vendor path for the shared config. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013bcRqFEoHDKH2NkZzMRogr
Enforce the toggle-block text domain through the WordPress i18n ESLint rules, lint CSS with @happyprime/stylelint-config, and lint package.json. Rename the lint scripts to lint:js and fix:js so the shared js-checks workflow finds them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013bcRqFEoHDKH2NkZzMRogr
Replace phpcs.yml and phpstan.yml with php-checks.yml, add js-checks.yml for the lint scripts, and refresh plugin-check.yml and verify-build.yml from the shared templates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013bcRqFEoHDKH2NkZzMRogr
Plugin Check fails on trunk because Tested up to trails the current WordPress release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013bcRqFEoHDKH2NkZzMRogr
Babel 8 switches preset-react to the automatic JSX runtime and turns on its development mode by default. The development runtime is not a WordPress script handle, so the editor script would never load. Turn it off; the built script now depends on react-jsx-runtime, which WordPress has shipped since 6.6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013bcRqFEoHDKH2NkZzMRogr
Run WordPress 7.1 on PHP 8.4 at port 8980 with no tests environment, so this site does not collide with other plugins on 8888 and 8889. env:start builds the block, starts the site, and runs env:seed, which activates Twenty Twenty-Five, sets pretty permalinks, and creates pages that exercise each feature: hidden and visible targets, screen reader text, a toggle group with a default toggle, a body class, and a toggle inside a Navigation block. Keep the new dev files out of the distributed plugin and ignore local wp-env overrides and test output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013bcRqFEoHDKH2NkZzMRogr
When two toggles control the same block, such as an open button outside a panel and a close button inside it, only the pressed toggle updated aria-expanded. The other kept announcing the wrong state. Update every toggle that controls the block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013bcRqFEoHDKH2NkZzMRogr
When a toggle opens a block that contains links, buttons, or form fields, focus moves to the first one. A keyboard user would otherwise have to tab through everything between the toggle and the block, which can be the whole page when the toggle sits in a header. Blocks with nothing to focus leave focus on the toggle. Escape closes the open toggled block that holds focus and returns focus to a toggle that controls it. A toggle inside the block it closes also hands focus back to the toggle outside, so focus does not land on a hidden element. Fixes #2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013bcRqFEoHDKH2NkZzMRogr
Deprecations do not inherit supports from block.json. Toggles saved by 0.4.0 or earlier that have an anchor or custom spacing failed validation in the editor, and ones with preset colors lost them on migration. All three deprecated saves shipped with the same supports, so declare them once and share them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013bcRqFEoHDKH2NkZzMRogr
TextControl has no description prop, so the help text for these two fields never rendered. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013bcRqFEoHDKH2NkZzMRogr
Choosing a block without anchor support, such as Custom HTML, looked like it worked: the selector generated an anchor and showed it. The anchor never saved, so the toggle pointed at an ID that did not exist on the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013bcRqFEoHDKH2NkZzMRogr
classList throws on a token that contains a space. A body class such as "is-dark mode" threw during setup and stopped every later toggle on the page from working. Split the value into separate classes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013bcRqFEoHDKH2NkZzMRogr
The button text toolbar offered Link, and a link saved inside the <button> is invalid HTML that keyboard and screen reader users trip over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013bcRqFEoHDKH2NkZzMRogr
The readme never said how to start a target hidden, and the group class only appeared in the changelog. WordPress.org reviewers also ask where the source for compiled JavaScript lives. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013bcRqFEoHDKH2NkZzMRogr
Shows the focus handoff between a toggle outside a panel and one inside it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013bcRqFEoHDKH2NkZzMRogr
✅ Plugin Check passedNo errors or warnings from |
This branch has not been deployed
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.
What changed
happyprime/coding-standards^1.0.0-alpha3. Drops the duplicated inline php-compatibility package repository.phpcs.xml.distusesHappyPrimeand enforces thetoggle-blocktext domain and prefixes. PHPStan stays at level 9, scoped totoggle-block.php. ESLint now runs the WordPress i18n rules, and Stylelint and package.json linting are added. Lint scripts are renamed tolint:js/fix:js.phpcs.ymlandphpstan.ymlbecomephp-checks.yml,js-checks.ymlis added, andplugin-check.ymlandverify-build.ymlare refreshed from the templates.readme.txt, the plugin header, andblueprint.json. This clears the Plugin Check failure on trunk.@wordpress/eslint-plugin27. Babel 8's preset-react defaults to the development JSX runtime, which WordPress does not register, sowebpack.config.jssetsdevelopment: false. The editor script now depends onreact-jsx-runtime. Composer is updated.npm run env:startbuilds, starts, and seeds demo pages. The README has a Development section.aria-expandedstays in sync when several toggles control one block.description, which TextControl ignores.<button>is invalid.toggle-block-hidden,toggle-block-group, the focus behavior, and where the source lives.VersionandStable tagare unchanged.PRs merged
None.
PRs superseded
phpcs.ymlandphpstan.ymlare replaced byphp-checks.yml.Issues
Fixes #2.
Opened: #47 (hidden class does nothing in classic themes), #48 (button sits outside the content column), #49 (screen reader text help and label-in-name), #50 (WordPress.org deploy workflows and assets).
How to test
composer phpcs,composer phpstan,npm run lint:js,npm run lint:css,npm run lint:package,npm run build(no diff).🤖 Generated with Claude Code
https://claude.ai/code/session_013bcRqFEoHDKH2NkZzMRogr