[プレビュー] デバイスに合わせた画面サイズを選択できるようにしました - #2488
Open
gakigaki wants to merge 7 commits into
Open
Conversation
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.
概要
プレビューモードで、現在の画面・PC・タブレット・スマホの表示幅を切り替えて確認できるようにしました。
プレビュー画面では、選択した表示幅を保ったまま「画面に合わせる」と「等倍表示」を切り替えられます。これにより、ブラウザの開発者ツールを使わなくても、レスポンシブ表示を確認できます。
変更内容
?mode=previewによるプレビューは、引き続き利用できます。背景と目的
従来のプレビューモードは、編集用ボタンなどを非表示にできますが、表示幅は利用中のブラウザに依存していました。そのため、スマホやタブレットでの見え方を確認するには、ブラウザ幅を手動で変更するか、開発者ツールを使用する必要がありました。
一般の編集者でも日常の更新作業の中でレスポンシブ表示を確認しやすくするため、プレビューモード内で代表的な画面サイズへ切り替えられるようにしました。
特記事項
public/mix-manifest.jsonも更新しています。X-Frame-Optionsで、同一オリジンのiframeが許可されている必要があります。リリース前にデプロイ相当環境での確認が必要です。実行結果
レビュー完了希望日
軽微な機能追加のため、急ぎません。
関連Pull requests/Issues
なし
参考
確認手順
DB変更の有無
無し
チェックリスト