nvrsion: Add: Update EXPERIMENTAL Pill Colors to span full width on BuildBanner.

Nucleic-Promote: 1
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-07 01:17:09 -07:00
co-authored by Nucleic
parent 3a00873d23
commit 4a262bf76e
@@ -85,10 +85,9 @@ struct BuildInfo {
/// Header warning that this is a non-release build — the same channel colors, icons, and copy /// Header warning that this is a non-release build — the same channel colors, icons, and copy
/// as the Mac's `BuildBanner`. A channel-colored stripe — red for local builds, canary-yellow /// as the Mac's `BuildBanner`. A channel-colored stripe — red for local builds, canary-yellow
/// for canary, blue for beta, gold for a release candidate — hugs just the one row it labels /// for canary, blue for beta, gold for a release candidate — spans the full width, with its
/// (channel name, build label, and an all-caps "EXPERIMENTAL" pill), pinned to the leading /// content (channel name, build label, and an all-caps "EXPERIMENTAL" pill) held at the
/// edge rather than bleeding across the full window header. Renders nothing for a shipping App /// leading edge. Renders nothing for a shipping App Store release.
/// Store release.
struct BuildBanner: View { struct BuildBanner: View {
var info: BuildInfo = .current var info: BuildInfo = .current
@@ -113,13 +112,10 @@ struct BuildBanner: View {
.foregroundStyle(.white.opacity(0.92)) .foregroundStyle(.white.opacity(0.92))
.padding(.horizontal, 12) .padding(.horizontal, 12)
.padding(.vertical, 3) .padding(.vertical, 3)
// The channel-colored stripe wraps only this row of content — channel name, build
// label, and the EXPERIMENTAL pill — instead of bleeding across the full window
// header, then sits at the leading edge with a little breathing room around it.
.background(style.tint.opacity(0.9), in: .rect(cornerRadius: 8))
.padding(.horizontal, 12)
.padding(.vertical, 4)
.frame(maxWidth: .infinity, alignment: .leading) .frame(maxWidth: .infinity, alignment: .leading)
// The channel-colored stripe spans the full width, with the content (channel name,
// build label, and the EXPERIMENTAL pill) held at the leading edge.
.background(style.tint.opacity(0.9))
.accessibilityLabel(style.tooltip(version: info.version, build: info.buildLabel)) .accessibilityLabel(style.tooltip(version: info.version, build: info.buildLabel))
} }
} }