Skip to content

v0.8.0 — 12 new widgets, +29% surface

Choose a tag to compare

@tannevaled tannevaled released this 06 Jul 09:28

Additive-only bump: 42 → 54 widgets. Every existing consumer keeps working unchanged.

Wave 2 of the GTK / DaisyUI gap-closure campaign. Same recipe as v0.7.0: Base embedding, Draw(painter.Painter, *Theme), existing fillRect/strokeRect/DrawText helpers, theme.Extra["OnAccent"] fallback pattern.

Visual atoms

  • Avatar — circular initials bubble; fill in a user-supplied Color or theme.Accent by default; ink via the OnAccent fallback.
  • Skeleton — loading placeholder in three flavors (SkeletonText — N SurfaceAlt bars with a natural 60%-width last line; SkeletonAvatar — same rounded shape as Avatar, no glyphs; SkeletonBlock — a single inset filled rect).
  • Rating — N-glyph selector; click routing on EventMouseDown computes which star index landed and fires OnChange.

Overlays

  • Toast — transient bottom-of-screen notification, EventTick-driven Life countdown, ToastKind enum (Info/Success/Warning/Error), fixed RGB per kind mirroring Alert.
  • Banner — persistent full-width message with an optional action-button label + click callback + Revealed state (mirrors AdwBanner).
  • PopoverVisible container for a Child widget with a Surface fill, Border stroke, and optional Title header; forwards EventMouseDown to Child with translated coordinates.

Structural

  • ActionRow — libadwaita AdwActionRow: Title (large) + optional Subtitle (dim) + optional Prefix/Suffix widget slots. Routes EventMouseDown to Prefix/Suffix based on X coordinate, like HeaderBar does with Start/End.
  • ViewSwitcher — segmented tab picker; current view highlighted in Accent with OnAccent ink; click routing computes segment index and fires OnChange.
  • ChatBubble — chat-message bubble with Sender enum (ChatFromUser right-aligned in Accent, ChatFromOther left-aligned in SurfaceAlt), multi-line via '\n' split, ChatBubbleMaxW width cap.

Interactive / data

  • SearchEntry — Entry variant with a ? prefix and a clear-x affordance on the right (visible only when Text != \"\"); handles EventChar, EventKey Backspace, EventMouseDown on the clear slot.
  • Diff — colored line-by-line diff view; DiffKind (DiffContext/DiffAdded/DiffRemoved), added rows in a fixed light-green RGB, removed in a fixed light-red RGB, Context in Surface.
  • Pagination — prev / page-numbers / next navigation with disabled-state ink for edge pages (Current == 1 disables prev, Current == Total disables next); EventMouseDown routes to whichever button rect contains the click.

Development note

Built in parallel by 4 sub-agents in worktree isolation (/tmp/tk-pp-{a,b,c,d}) per the org's parallel-agent-worktree-isolation rule. Each agent worked in its own fresh clone of v0.7.0; the 4 batches merged verbatim with no naming conflicts across the ~30 new package-level constants and enums, and 100.0% cov end-to-end.

Verified

  • go vet ./... clean
  • go test -cover ./...100.0% of statements
  • Cross-compile smoke: js/wasm, linux/arm64, darwin/arm64 all clean
  • CI green

Compatibility

Additive only. No new theme fields, no new external deps beyond github.com/go-widgets/painter. No existing files touched.

To pin:

```go
require github.com/go-widgets/toolkit v0.8.0
```

License

BSD-3-Clause.