enhancement
major
major
major
#29811
TL Views: a <button> ignores the display mode of its command and always shows icon and label
tl-layout-view 8.0.0-alpha10, ButtonElement.
Problem
<button> renders its command with ButtonDisplayMode.ICON_LABEL unconditionally. A small inline action (a "remove" button beside each connection chip of a communication object, a "reset" beside a hint) therefore always shows its full label, which makes dense lists wide and noisy. Toolbars have icon-only commands, an inline <button> has not.
Every view command already offers the attribute display (icon-only, icon-label, label-only, Ticket #29396), and the button control applies it when it is created. ButtonElement then overrides it: as soon as the command carries an image, the display mode is set to icon and label, whatever the command configured.
Expected
The display attribute of the command inside a <button> takes effect: <button><action display="icon-only" image="…"/></button> shows only the icon, with the label as tooltip, as a toolbar does.
Workaround in E-Home
None: projects/device-item.view.xml shows "Verbindung entfernen" with its full label beside every connection.
Lösung
- ButtonElement setzt den Anzeigemodus des Buttons nicht mehr selbst; es gilt das display-Attribut des Kommandos (<action display="icon-only" …/>). Ohne Angabe zeigt ein Button mit Bild weiterhin Bild und Beschriftung, ein Button ohne Bild nur die Beschriftung. Ein eigenes display-Attribut am <button> gibt es nicht: Der Button enthält genau ein Kommando, dessen Attribut die Konfigurationsstelle ist.
- Der Artikel view-layer/commands dokumentiert die Anzeigemodi: display am Kommando, command-display als Vorgabe eines Kommando-Scopes (<panel>, <window>, <full-page>) und des <accordion>, Beschriftung als Tooltip bei icon-only.
- Die Ticket-Karte des React-Demos (board/ticket-card.view.xml) zeigt ihren "Details"-Button nur als Icon.