Skip to content

gpuicn v0.9.5

Choose a tag to compare

@github-actions github-actions released this 04 Nov 19:16
· 30 commits to main since this release
bfd7767

gpuicn v0.9.5

Two more requests from Matty: a clickable author name on messages, and toasts
that tell the app when they leave. 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

  • Message: the author name can open something, such as a profile card
    (#123).
    • on_author_click(handler) draws the name as a link-styled button that
      takes focus with Tab, runs on click, Enter or Space and underlines on
      hover. The handler gets the click and the name's bounds in window
      coordinates, to anchor a popover.
    • author_element(element) puts your own element in place of the name,
      such as the hover_popover trigger you already wrap around the avatar.
      It inherits the name's weight, size and color.
    • Both work in standard and compact density.
  • Toast: the app can follow a notification's life (#122).
    • Notice::on_dismiss(handler) runs once when a notice starts to leave,
      with a NoticeDismissal: Action, Cancel (such as "Later"), Close,
      Timeout, Dismissed (the app called dismiss) or Replaced (the app
      pushed the same ID again). NoticeDismissal::by_reader is true for Cancel
      and Close. The handler runs after the current update, so it may push
      again.
    • ToastState::contains(id) says whether a notice is queued or on screen
      and not already leaving.
    • ToastState::set_placement(ToastPlacement) moves the stack to any corner
      or the middle of the top or bottom edge (bottom left stays the default),
      and set_inset(horizontal, vertical) sets its distance from the window
      edges, such as to clear a composer.

Upgrading

cargo install gpuicn-cli --version 0.9.5 --locked
gpuicn update --to 0.9.5

Crate users: cargo update -p gpuicn.