The Board and sidebar empty states are hand-rolled instead of ContentUnavailableView

Open
#397 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
swift
Domain
design, desktop

Research direction

Read Sources/SwitchboardApp/ContentView.swift, especially the sidebar lines 350–357 and Board lines 642–649, alongside the Inbox implementation using ContentUnavailableView. Update both empty states to use ContentUnavailableView with the titles, descriptions, and buttons described in the issue. Done when the sidebar and Board match the system empty-state style and the hand-rolled 40 pt symbol is removed; account for the linked PR #383, which also changes this file.

Written by the indexing model from the issue text.

Description

The Board's and the sidebar's empty states are still hand-rolled, while the Inbox and Issues now use ContentUnavailableView.

What happens

  • The empty Board (ContentView.swift:642-649) is a VStack with a 40 pt square.grid.3x3 symbol, "Start a session to see it here" in secondary text, and two buttons. It doesn't have a title.
  • The empty sidebar (ContentView.swift:350-357) is a VStack with "No sessions" and two buttons, without a symbol or description.

A capture of main with no sessions shows all three side by side. The Inbox shows a system empty state with a title, a description, and Show Board, and the sidebar and Board don't match it.

Why it matters

macOS apps use ContentUnavailableView so empty states share the system's type sizes, symbol size, and spacing. #344 moved the Inbox to it and the Inbox detail already says "Select an item", so these two are the last hand-rolled ones.

Suggested fix

Use ContentUnavailableView for both. For the Board, use "No sessions" with a description and New Session and New Group buttons. For the sidebar, use "No sessions" with Start and Import. This also removes the last .font(.system(size: 40)).

This is finding 8 of the #295 UI once-over. Open PR #383 adds a separate FilterHidesAll empty state for the Board and sidebar when the filter hides every session, and changes ContentView.swift.

Dominant language
Swift
Stars
0
Forks
0
Avg merge
6h 15m
Merged PRs (30d)
308

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from haacked/switchboard

All issues in haacked/switchboard

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.