Skip to content

gpuicn v0.9.4

Choose a tag to compare

@github-actions github-actions released this 04 Nov 17:56
· 24 commits to main since this release
ec47ca1

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, warning and destructive
      tokens; Offline is a hollow ring; Custom { color, label } covers the
      rest. Set the tokens in your theme to restyle every dot.
    • ring_color matches the ring to the surface, such as colors.sidebar.
    • The status joins the accessible name: "Ana Lopez, away".
  • 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_with restyles 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_hover sets 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.
  • Embed: QuotedMessage for 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 takes density like the other embeds and is named
    "Quoted message from {author}".
  • Sortable, a new component (#121): Sortable, SortableGroup and
    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_reorder reports a SortableMove; SortableMove::apply and
      move_group apply moves to your data. Nothing animates.
  • Accessibility audits (#120): with the new test-support feature,
    gpuicn::audit::unnamed_controls(window) lists interactive elements with
    no accessible name in the last frame, and A11yAuditOverlay outlines 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.4

Crate users: cargo update -p gpuicn. For the audit, enable the feature in
your dev-dependencies: gpuicn = { version = "0.9.4", features = ["test-support"] }.