Title: External Integration Widgets: Choosing the Layout of Boxes and Giving Them an Accent Color
Hello,
I am developing the Prix Carburants external integration. A user made two comments about the “My Station” card that I cannot fix on the integration side, as they depend on the display of widgets in Gladys.
1. Box Layout
Currently, boxes (value / gauge) wrap to the next line when space is insufficient (flex-wrap, minimum width 96 px). With 3 boxes on a narrow card, we get 2 half-width boxes and 1 full-width box below. The user would find it clearer to have 3 boxes of the same width, one below the other.
Gladys does not send the screen width to the integration, so the integration cannot choose.
Proposal: an optional field in the widget content, for example tiles_layout:
auto: as today (default);row: all boxes on a single line, same width;stack: one box per line, full width.
An unknown value defaults to auto, so nothing changes for existing integrations.
2. Accent Color per Box
Allowed colors are “semantic” colors: neutral, primary, success, warning, danger, info. This is great for saying “ok / warning / error”, but we cannot use them to identify a box at a glance. For example, the user would like to see the colors of the fuel pumps. And orange (warning) is already used in my card to indicate a break: using the same colors for both would mix the two meanings.
Proposal: an optional accent field on the boxes, displayed as a small colored bar or dot, separate from color (which keeps its current role on the value). Two options possible:
- a free color
#RRGGBB, verified by Gladys; - or, to stay consistent with light and dark themes, a small list of named colors:
green,yellow,blue,orange,red,purple,gray.
Finally
Both additions are optional and do not change existing widgets. I can propose a PR if the idea suits you.
Thank you!