Repository navigation
gpuicn v0.9.4
gpuicn v0.9.4
Six requests from Matty: presence dots on avatars, menus that fit the window,
hover profile cards, quoted posts, accessible-name audits and sortable lists.
Everything is additive; the runtime pins are unchanged: GPUI Kit 0.9.0 on
gpui-pre 0.3.11 and gpui-icons 0.6.0.
Added
- Avatar:
status(AvatarStatus)draws a presence dot over the
bottom-right corner, sized to the avatar (8, 10 or 12px), in a ring of the
surface color (#115).- Online, Away and Dnd use the
success,warninganddestructive
tokens; Offline is a hollow ring;Custom { color, label }covers the
rest. Set the tokens in your theme to restyle every dot. ring_colormatches the ring to the surface, such ascolors.sidebar.- The status joins the accessible name: "Ana Lopez, away".
- Online, Away and Dnd use the
- Popover:
hover_popover(id, label)for profile cards (#118).- The trigger is one focusable button named
label, usable on an avatar
or an inline name;trigger_style_withrestyles it. - Resting the pointer opens it after 500ms without moving focus, and the
pointer can move into the card; it closes 300ms after the pointer leaves
(open_on_hoversets both delays). - Click, Enter or Space opens it with focus inside, and it stays until
Escape (which returns focus to the trigger), a click outside or the
trigger again.
- The trigger is one focusable button named
- Embed:
QuotedMessagefor pasted permalinks and forwards (#119): the
author's avatar, name and time with a Jump link, "Originally posted in
{channel}", a body clamped to four lines with "Show more", and an optional
attachment strip. It takesdensitylike the other embeds and is named
"Quoted message from {author}". - Sortable, a new component (#121):
Sortable,SortableGroupand
SortableRow.- Dragging a row shows a copy of it at reduced opacity and a line where it
will land; an empty or collapsed group highlights and takes the row at
its end. - With focus in a row, Alt+Shift+Up and Down move it one place, across
groups at either end, and announce the new position. reorder_groups(true)lets headers drag and take the same keys.on_reorderreports aSortableMove;SortableMove::applyand
move_groupapply moves to your data. Nothing animates.
- Dragging a row shows a copy of it at reduced opacity and a line where it
- Accessibility audits (#120): with the new
test-supportfeature,
gpuicn::audit::unnamed_controls(window)lists interactive elements with
no accessible name in the last frame, andA11yAuditOverlayoutlines them
in the destructive color and logs their paths. Buttons, toggles,
checkboxes, switches, selects, menus, tabs, inputs, the composer, sidebar
rows and dialog triggers already registered; this release adds the
remaining interactive parts.
Changed
- Menu panels are as tall as the window allows before they scroll, on
whichever side of the trigger has more room; context menus and submenus
use the window height. Submenus open after 200ms of hover, and a sibling
row closes them (#117).
Upgrading
cargo install gpuicn-cli --version 0.9.4 --locked
gpuicn update --to 0.9.4Crate users: cargo update -p gpuicn. For the audit, enable the feature in
your dev-dependencies: gpuicn = { version = "0.9.4", features = ["test-support"] }.