Skip to content

Drop the connection-state dot in favor of icon-tinted state#33

Merged
buggerman merged 1 commit intomainfrom
sidebar-server-state-color
Apr 26, 2026
Merged

Drop the connection-state dot in favor of icon-tinted state#33
buggerman merged 1 commit intomainfrom
sidebar-server-state-color

Conversation

@buggerman
Copy link
Copy Markdown
Owner

Summary

  • Follow-up to Add SF Symbol row icons to sidebar server, channel, and PM rows #32. With the antenna-in-circle icon now in front of the server name, the separate 8pt connection-state dot became redundant: two filled circles with the same role (signaling connection state) sat next to each other. Drop the dot and tint the icon itself with the state color so we have a single source of truth.
  • Color mapping unchanged: green = connected/registered, yellow = connecting, orange = disconnecting. The previously-grey disconnected state is reinforced by the slash variant of the icon, so users with color-vision differences keep the redundant shape signal.

Changes

  • Sources/Brygga/Views/ContentView.swiftServerRow removes the Circle().fill(stateColor).frame(8x8) block. The existing Image(systemName: serverIconName) now applies .foregroundStyle(stateColor) instead of .secondary.

Test plan

  • swift build — passes
  • swift test — 131 tests pass (no test changes; UI-only)
  • swiftformat --lint . — clean
  • Manual:
    • Sidebar server row no longer shows two filled circles. Antenna icon takes on the state color (green / yellow / orange / grey-with-slash).
    • Connect / disconnect cycle: icon color follows the state, the slash variant only appears on stable .disconnected.
    • Light + dark mode both render correctly.

Risk / rollback

  • Pure view-layer change. Revert: this single commit.

@buggerman buggerman merged commit f8f9d78 into main Apr 26, 2026
1 check passed
@buggerman buggerman deleted the sidebar-server-state-color branch April 26, 2026 20:59
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