Conversation
The editorial header hid the status pill on mobile/tablet via a hand-rolled @media (max-width: 781px) { display: none } rule. WP 7.0 added native per-device block visibility (metadata.blockVisibility.viewport), which handles this without custom CSS. Verified via wp pattern validate and sentinel against the WP 7.1 demo instance.
WP 7.0 added settings.dimensions.dimensionSizes, letting theme.json define a preset scale for the width/height/min-height dimensions block support (core/group and similar — confirmed against core's block.json, which does NOT extend to core/cover's separate legacy minHeight/minHeightUnit attributes, so cover-block min-heights are left untouched). Added a 5-step scale (xs/sm/md/lg/xl) matching the exact min-height values already in use, and converted the two patterns whose group blocks used a bare style.dimensions.minHeight (services-feature-cards.php: 300px -> sm; stats-showcase.php: 40px -> xs). Verified via wp pattern validate and sentinel against the WP 7.1 demo instance.
Covers the two feature commits on this branch: native block visibility on the editorial header, and dimension size presets in theme.json.
Contributor
Author
|
Superseded by #114 (Release 4.10.0), which cherry-picks the WP 7.0 feature work onto current main and bumps the version to 4.10.0. |
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.
Summary
Two independent, low-risk adoptions from WP 7.0/7.1's new theme.json/block-support features, verified against the WP 7.1 demo instance (Pass 1
wp pattern validate+ Pass 3 sentinel, all green). Version bumped to 4.9.3.header-editorial.php): replaces the@media (max-width: 781px) { display: none }hack that hid the status pill on mobile/tablet withmetadata.blockVisibility.viewport, WP 7.0's built-in per-device visibility. Same visual result, no custom CSS.theme.json,services-feature-cards.php,stats-showcase.php): adds asettings.dimensions.dimensionSizesscale (xs/sm/md/lg/xl→ 40/300/330/600/680px) matching the theme's existingmin-heightvalues, and converts the group blocks that reference them from a bare pixel string to the preset var.Scope note
Checked WordPress core's
block.jsondirectly (not just blog summaries) forcovervsgroup:core/coverdoes not support the new dimensions preset system — it keeps its own legacyminHeight/minHeightUnitattributes. Onlycore/group(which does declaresupports.dimensions.minHeight) was eligible, so the ~33minHeightoccurrences onwp:coverblocks (hero/banner/WooCommerce patterns) are intentionally left untouched.Version bump
style.css,package.json,readme.txt(Stable tag+ new= 4.9.3 =entry, added above the existing4.9.2entry) andCHANGELOG.md(new## [4.9.3]section) all bumped 4.9.2 → 4.9.3.Tested up towas already7.1from the prior release — unchanged.Testing
composer check(Pass 2, pt-cli) — cleanwp pattern validate(Pass 1, structural) on the 3 changed pattern files — all PASSnpm run validate:file(Pass 3, sentinel/browser) on the 3 changed pattern files — all PASS, 0 errors/warnings