Repository navigation
Show a flag's state as a circle at the top of its card, and wrap long names - #79
Conversation
… names Long flag names have no spaces, so they ran out of their card and pushed against the switch. Names now wrap between PascalCase words and after . _ -, in the card and the table. Each card now reads top to bottom: - the state as a circle (empty when off, half for some, full for everyone, coloured by kind) with the state and its note in words; - the name, beside the actions button only when one is registered, and the description across the full width; - markers and tags as text rather than pills; - the last change and the switch in a footer pinned to the bottom, so switches line up across a row.
bbd8675 to
0bbcc6d
Compare
Review: two small points, then fine to mergeReviewed at Before merging
What I checked
Built and tested
|
Re-review at
|
Summary
Long flag names have no spaces, so in the card view they ran out of the card and pushed against the switch. This reworks the card, chosen from the layout mockups (option C with the large circle).
State circle: empty when off, half for an audience, conditions or Custom, full for everyone. Coloured with Umbraco's tokens: grey, default blue, amber for Custom, green for everyone.
Names wrap between PascalCase words and after
._-(nameParts()indisplay.ts).flagName()uses it, so long names in the table view wrap at sensible points too. The table's name column also falls back tooverflow-wrap: anywhere.Fewer pills: markers become coloured text with a dot, and tags a plain list after a tag icon.
Footer holds the last change and the switch, pinned to the bottom so switches line up across a row.
The card is a plain element styled like a
uui-box, because that's what lets the footer be pinned. The actions button only takes space when an entity action is registered for flags, as in the table view.Filter dropdowns:
uui-selectpads its native select by only 6px a side, which left the browser's arrow against the right edge. The filters set--uui-select-padding-xto--uui-size-3(9px).Evidence
npm test: 126 tests pass, including new ones fornameParts()andstateFill().npm run buildsucceeds.Merge danger
Two-way door. It only changes how the built-in card and table views look. Element tag names, the collection views and their styles aren't part of the promised public surface (
docs/backoffice.md), and there are no API or settings changes.docs/design.mdnow describes the card as a plain element styled like auui-box, and the card view's state circle and text markers.There's no issue for this change. It came from installing the package on a site and finding that long flag names broke the card layout.