Skip to content

v0.7.0 — 9 new widgets, +27% surface

Choose a tag to compare

@tannevaled tannevaled released this 06 Jul 08:41

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

Closes the gap vs GTK 4 (libadwaita) and DaisyUI 4 identified in the 2026-07 audit. All 9 widgets follow the existing conventions: Base embedding, Draw(painter.Painter, *Theme) signature, existing fillRect/strokeRect/DrawText helpers, 100% statement coverage.

Tier 1 — small text-bearing / status widgets

  • Switch — compact iOS-style toggle (distinct from ToggleButton). Track SurfaceAlt/Accent + Surface knob sliding L/R. OnEvent flips On + fires OnToggle.
  • Badge — small pill counter/indicator (Accent fill, Background ink). Auto-sizes when Bounds().W == 0.
  • Kbd — keyboard-shortcut chip ("⌘K" style). Surface + Border stroke + OnSurface text.
  • Alert — persistent semantic banner distinct from Notification (no Life, no Visible). AlertKind enum (Info/Success/Warning/Error): Info = theme Accent; others fixed RGB tuned for meaning (sea green / amber / brick red).

Tier 2 — structural DaisyUI-style

  • Card — three-zone container (Title header + Body multi-line + Footer strip); each zone optional. Surface fill + Border stroke wrap.
  • Breadcrumbs — horizontal nav path (OnBackground text + Border chevron), auto-positioned via TextWidth.
  • Steps — horizontal step indicator [1]—[2]—[3]—[4] with Accent fill up to and including Current, SurfaceAlt for pending. 1-px Border connector between badges. Optional caption below each badge.

Tier 3 — larger structural

  • HeaderBar — GTK client-side-decorations pattern: Title + optional Subtitle + Start[] widgets (LTR from left edge) + End[] widgets (RTL from right edge). Constants HeaderBarHeight = 40, HeaderBarPad = 8, HeaderBarSubtitleGap = 2.
  • Table — structured data grid (Columns/Rows/Selected). Header row + zebra-striped body + optional selection highlight + column separators + auto/fixed column widths + \"(no data)\" placeholder for empty rows. Reuses the theme.Extra[\"OnAccent\"] fallback pattern from Button/ListBox/TreeView.

Development note

Built in parallel by 4 sub-agents (worktree-isolated per the org's parallel-agent-worktree-isolation rule). Each agent worked in its own clone from v0.6.2; the 4 batches merged verbatim with no naming conflicts and 100% cov end-to-end — the sub-agent approach scales cleanly when widgets are decoupled by file scope.

Verified

  • go vet ./... clean
  • go test -cover ./...100.0% of statements across the entire package
  • CI green in 9s on the first push

Compatibility

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

To pin:

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

What's next

Still missing vs GTK / DaisyUI: Popover, SearchEntry, Avatar, Toast (transient), Banner, ActionRow / PreferencesPage pattern, Skeleton, Diff, ChatBubble, ViewSwitcher, Rating, Pagination. Fair game for a follow-up cycle.

License

BSD-3-Clause.