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

Aperta Adatta ai principianti
#16,083 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
php
Ambito
frontend

Direzione di ricerca

Inizia da resources/js/components/forms/builder/FieldtypeSelector.vue e controlla le classi grid dell’elenco nella barra laterale alle larghezze ridotte. Riproduci il problema con un’etichetta di fieldtype lunga e una barra laterale a colonna singola, poi verifica se le schede rimangono all’interno del pannello e le etichette vengono troncate. L’issue suggerisce di aggiungere una singola colonna grid esplicita o min-w-0; verifica la correzione del layout con la stessa riproduzione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
PHP
Stelle
4.9k
Fork
647
Merge medio
1g 45m
PR unite (30g)
221

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di statamic/cms

Tutte le issue di statamic/cms

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.