[6.x]: Control panel: layout shift and nested scrollbars
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- css, php
調査の方向性
Start by comparing the control panel layout styles in Craft 6 with the body width behavior described for Craft 5, then inspect the nav, .cp-details pane, and details panel body scrollbar rules. Reproduce the page and pane shifts on a system with non-overlay scrollbars, including a short entry edit window. Done when the selected scrollbar behavior prevents the reported shifts and makes the nested scroll regions usable; the issue leaves the choice between two fixes open.
索引モデルが issue の本文から書いたものです。
説明
What happened?
Description
Two scrollbar issues in the control panel, with two possible fixes. Related: #20009
| Now | Fix 1 | Fix 2 |
|---|---|---|
Layout shift
This affects browsers where scrollbars take up space in the layout (Windows, Linux, and macOS with "Show scroll bars: Always"). With overlay scrollbars, the default on macOS and mobile, nothing shifts.
The page content moves sideways by the width of the scrollbar (about 15px) when the page scrollbar appears or disappears, for example when switching tabs on an entry edit page. Craft 5 has body { width: 100vw }, Craft 6 has 100%.
The scrolling panel body inside the details pane doesn't have a scrollbar-gutter: stable to stabilize it (unlike the nav and the .cp-details details pane itself ).
In the recording below both shifts (pane and page) are demonstrated.
https://github.com/user-attachments/assets/c0e342f6-5377-4482-a7dd-be877163a57d
Nested scroll regions
With non-overlay scrollbars, a short window on an entry edit page can show three scrollbars at once: the page, the nav and the details panel. It's hard to tell which one the wheel or the arrow keys will scroll. Mostly a usability problem, but it's worse for keyboard and magnifier users.
Other than the possible usability concerns it does look a bit noisy and it was even mentioned on CraftQuest's latest video where the new UI was demonstrated.
Fix 1
body { width: 100vw }, with an inline-end guard the width of the scrollbar so nothing ends up under it- thin inner scrollbars whose thumb keeps 3:1 contrast (the stock one is about 1.7:1), plus, optionaly,
overscroll-behavior: contain scrollbar-gutter: stableon the details panel body
https://github.com/user-attachments/assets/42ef7e6f-53a5-452f-bbb2-b4b2b8077464
Fix 2
Fix 1, plus hiding the inner scrollbars (nav, details panel) until hover or focus, with a fade at the edge where there is more to scroll. The scrollbar space stays reserved, so nothing shifts when it appears. The page scrollbar stays visible. This is the cleaner option from a purely visual standpoint.
Downsides: no scrollbar at rest to show position or to grab. The nav on Craft 5 though did indeed hide its scrollbar.
https://github.com/user-attachments/assets/49160c0b-3958-4877-be8d-0bffadfc8bb5
Craft CMS version
6.x-dev (4d5bbd29)
PHP version
No response
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
- 主要言語
- PHP
- スター
- 3.6k
- フォーク
- 712
- 平均マージ
- 13時間 8分
- マージ済み PR(30日)
- 366
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
craftcms/cms のほかの issue
-
bug repo:cms
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
craftcms/cms#20205 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug repo:cms
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
craftcms/cms#20203 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[5.x] MCP: `configuration.update` fails for Matrix fields with TypeError on `$propagationMethod`オープンbug repo:cms
難易度 4/5 1〜2日 初心者へのやさしさ 55/100
craftcms/cms#20406 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
repo:cms
難易度 3/5 1〜2日 初心者へのやさしさ 73/100
craftcms/cms#20405 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[5.x]: MCP returns `[]` for CKEditor field values対応中かも @i-just が今日担当しました。 オープンrepo:cms
craftcms/cms#20404 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
sync-en
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
sync-en
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
Перевод устарел
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Automattic/blocks-engine#4621 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
YunoHost-Apps/snappymail_ynh#205 ·