Skip to content

Add SF Symbol row icons to sidebar server, channel, and PM rows#32

Merged
buggerman merged 1 commit intomainfrom
sidebar-row-icons
Apr 26, 2026
Merged

Add SF Symbol row icons to sidebar server, channel, and PM rows#32
buggerman merged 1 commit intomainfrom
sidebar-row-icons

Conversation

@buggerman
Copy link
Copy Markdown
Owner

Summary

  • Improve at-a-glance scannability of the sidebar by prefixing each row with a small SF Symbol indicating its type. Inspired by Textual's iconography but rendered with native system glyphs so they tint with the system accent and adapt to Liquid Glass automatically.
  • Server rows pick up a slashed-out variant when the server is in the stable .disconnected state — same idiom as wifi.slash, microphone.slash. Transient .connecting / .disconnecting states keep the active icon and let the existing dot color carry the signal so the icon doesn't flash mid-handshake.
  • No # stripping on channel names; #linux still renders as #linux. The icon is purely additive.

Changes

  • Sources/Brygga/Views/ContentView.swift:
    • ServerRow — adds an Image(systemName: serverIconName) between the existing connection-state Circle and the server-name Text. New private serverIconName returns "antenna.radiowaves.left.and.right.slash.circle.fill" when state == .disconnected and "antenna.radiowaves.left.and.right.circle.fill" otherwise.
    • ChannelRow — adds an Image at the start of its HStack. "number.circle.fill" for regular channels, "person.crop.circle.fill" for PMs (channel.isPrivateMessage).
    • All icons render at 13pt with .secondary foreground style — same weight as the existing chevron.down / moon.fill accents in the row, so they sit visually below the colored connection dot and the channel name.

Test plan

  • swift build — passes
  • swift test — 131 tests pass (no test changes; UI-only)
  • swiftformat --lint . — clean
  • Manual:
    • Connect to a server. Sidebar shows ● ⊕ Libera style row (state dot + antenna-in-circle icon + name).
    • Disconnect (Cmd+W on the server, or /quit). The icon flips to the slash variant, the dot turns grey.
    • Reconnect. During the brief .connecting window, dot is yellow but the icon stays unslashed.
    • Open a channel #swift — sidebar row shows (number-in-circle) #swift. The # is preserved in the name.
    • PM with ChanServ — row shows (person-in-circle) ChanServ.
    • All three icon shapes share the .circle.fill family so they share weight and cap height.
    • Switch between light and dark mode; verify icons tint correctly.

Risk / rollback

  • Pure view-layer change; no model, persistence, or networking touch.
  • antenna.radiowaves.left.and.right.slash.circle.fill is shipped in macOS 15 SF Symbols; the deployment floor is already 15.
  • Revert: this single commit.

@buggerman buggerman merged commit 8c3281d into main Apr 26, 2026
1 check passed
@buggerman buggerman deleted the sidebar-row-icons branch April 26, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant