Skip to content

Wrap the Dashboard's chips instead of squeezing their names - #6

Merged
farukkamcici merged 2 commits into
farukkamcici:mainfrom
andostronaut:fix/dashboard-chips-wrap
Sep 30, 2026
Merged

farukkamcici merged 2 commits into
farukkamcici:mainfrom
andostronaut:fix/dashboard-chips-wrap

Conversation

@andostronaut

@andostronaut andostronaut commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

In Settings → Menu Bar, the Dashboard row put every grouped reading on a single line (HStack). Once most modules were grouped there was not enough room, so SwiftUI squeezed each chip until its name broke into a column of single letters. The chips now keep their full width and wrap onto another line.

Before

The Dashboard row with eight grouped modules squeezed into one line, each name broken into single letters stacked vertically

After

The same Dashboard row with the chips on one line each, wrapping onto a second row: CPU, Memory, Battery, Network, Disk, GPU, then Fans and Device

  • Wrapping layout. The chips sit in a small flow layout (ChipFlowLayout) that places each one at its natural width and starts a new line when the next one would not fit.
  • Names stay on one line. GroupedModuleChip is fixedSize() with lineLimit(1), so a name never breaks inside its capsule.
  • The add button stays on the trailing edge. The flow takes layout priority over the spacer, so the chips fill the row's width before the spacer does.

How I verified it

  • swift test passes in Packages/MetricsKit
  • xcodebuild -project Mectrics.xcodeproj -scheme Mectrics -configuration Debug build succeeds with no new warnings — built unsigned like CI (CODE_SIGNING_ALLOWED=NO …); the app suite runs 181 tests, 0 failures
  • Checked in the running app (menu bar + popover), not only in tests — the screenshots above are the Menu Bar pane with all eight readings on the Dashboard, before and after

Conventions checklist

  • Everything in the diff is in English — code, comments, docs, commit messages
  • User-facing strings go through String(localized:) or SwiftUI Text
  • Menu bar item width still does not depend on the current value (width template updated if a format changed)
  • Missing readings render as a dash, never as a fabricated 0
  • No telemetry, and no network call outside the explicit update check
  • xcodegen generate was run if files were added or removed; Mectrics.xcodeproj/ is not committed
  • No AI attribution in commits (no Co-Authored-By: or "Generated with" trailers)

@andostronaut andostronaut changed the title Fix/dashboard chips wrap Wrap the Dashboard's chips instead of squeezing their names Sep 29, 2026
@farukkamcici
farukkamcici merged commit aea8e26 into farukkamcici:main Sep 30, 2026
3 checks passed
@farukkamcici

farukkamcici commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Thanks for the contribution @andostronaut, merged.

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.

2 participants