Form builder: long fieldtype labels widen the sidebar and get cut off

オープン 初心者向け
#16,083 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
php
領域
frontend

調査の方向性

resources/js/components/forms/builder/FieldtypeSelector.vueから始めて、幅が狭いときのサイドバーリストのグリッドクラスを調べてください。長いfieldtypeラベルと1列のサイドバーで再現し、カードがパネル内に収まり、ラベルが省略表示されるか確認してください。issueでは、明示的にグリッドを1列にするかmin-w-0を追加することが提案されています。同じ方法でレイアウトの修正を確認してください。

索引モデルが issue の本文から書いたものです。

説明

forms ui
Bug description

In the form builder, the fieldtype sidebar is cut off on the right when one of the labels is long. All cards get wider, not only the one with the long label, and the right edge of every card disappears. The labels are not truncated with an ellipsis, even though the buttons have truncate.

It shows up in German with «Felder verknüpfen», the translation I'm proposing for "Link Existing" in an upcoming PR.

Bildschirmfoto 2026-11-26 um 22 37 02
How to reproduce
  1. Set the CP language to German (or register a fieldtype with a long title).
  2. Have at least one fieldset, so the "Link Existing" card appears under "Fieldsets".
  3. Open a form in the form builder, with the window narrow enough for the sidebar to show a single column.
  4. The cards in the sidebar are wider than the panel and cut off on the right.
Likely cause

In resources/js/components/forms/builder/FieldtypeSelector.vue, the list is grid @min-[250px]:grid-cols-2. Below 250px there is no explicit column, so the implicit track is auto and grows to the min-content width of the longest label. The buttons are w-full, so they all grow with it, and truncate never kicks in.

Adding grid-cols-1 to that <ul> (which is minmax(0, 1fr)), or min-w-0 on the <li>, should fix it. The outer <ul class="... grid gap-8"> may need the same.

Additional suggestion

"Link Existing" is shared between this sidebar card, the blueprint editor button and the command palette. In the sidebar it sits under the "Fieldsets" heading, so a shorter label would be enough there (in German just «Verknüpfen»). Elsewhere it needs to say what gets linked. A separate string for the sidebar card would let translations keep it short. This wouldn't replace the layout fix, since other long labels would still widen the sidebar.

Logs

Environment
Environment
Laravel Version: 13.44.1
PHP Version: 8.4.27
Composer Version: 2.11.2
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Timezone: UTC
Locale: en

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: file
Database: sqlite
Logs: stack / single
Mail: log
Queue: sync
Session: file

Storage
public/storage: NOT LINKED

Statamic
Addons: 0
License Key: Not set
Sites: 1
Stache Watcher: Enabled (auto)
Static Caching: Disabled
Version: 6.44.0 PRO
Installation

Fresh statamic/statamic site via CLI

Additional details

No response

主要言語
PHP
スター
4.9k
フォーク
647
平均マージ
1日 45分
マージ済み PR(30日)
221

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

statamic/cms のほかの issue

statamic/cms の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。