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

Aberta Para iniciantes
#16,083 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
76/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
php
Domínio
frontend

Direção de pesquisa

Comece em resources/js/components/forms/builder/FieldtypeSelector.vue e inspecione as classes de grid da lista da barra lateral em larguras reduzidas. Reproduza o problema com um rótulo de fieldtype longo e uma barra lateral de uma única coluna; depois, verifique se os cards permanecem dentro do painel e se os rótulos são truncados. A issue sugere adicionar uma única coluna de grid explícita ou min-w-0; verifique a correção do layout com a mesma reprodução.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
PHP
Estrelas
4.9k
Forks
647
Merge médio
1d 45min
PRs com merge (30d)
221

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de statamic/cms

Todas as issues de statamic/cms

Issues semelhantes

Mais issues de PHP

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.