Repository navigation
[ 機能追加 ] ビューポート(タブレット/モバイル)幅設定 UI を追加 - #4
Merged
Merged
Conversation
Gutenberg PR #79104(settings.viewport.mobile / tablet)に対応し、 有効化トグル + 幅入力の専用 UI を新カテゴリ「ビューポート」として追加。 幅入力は px/em/rem の単位切り替えが必要なため、独自実装ではなく WordPress コアの UnitControl(wp-components)をそのまま採用。 wp-element / wp-components をスクリプト依存に追加し、 wp.element.createElement で admin.js(ビルド工程なし)から直接マウント。 コアコンポーネント未読み込み時はテキスト入力にフォールバックする。 単位はバックエンドの検証パターン(px/em/rem)と合わせて制限。
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
settings.viewport.mobile/tablet)に対応した専用 UI を新カテゴリ「ビューポート」として追加(v0.3.0 → v0.4.0)UnitControl(wp-components)をそのまま採用。wp-element/wp-componentsをスクリプト依存に追加し、wp.element.createElementでadmin.js(ビルド工程なし)から直接マウント。コアコンポーネント未読み込み時はテキスト入力にフォールバック^(?:\d+|\d*\.\d+)(?:px|em|rem)$)に合わせて px/em/rem のみに制限Test plan
composer run phpcs(クリーン)composer run test:unit(3 tests, OK)npx playwright test tests/e2e/admin-page.spec.ts(5 tests, 全パス)