feat(ios): comprehensive iPhone+iPad UX polish — refined-native design system
Freeze a shared design system (DesignSystem/{Tokens,Typography,StatusStyle,
Primitives}.swift): indigo #7C8CFF accent (root .tint), semantic status colors,
2-4-8-12-16-20-24 spacing + sm8/md12/lg16 radii scale, SF Mono tabular numbers,
reduce-motion-gated animations, haptics, reusable StatusBadge/TelemetryChip/Card/
SectionHeader/DSButtonStyle/ContinueLastBanner. Every changed view consumes tokens
— no hardcoded colors/spacing.
Applied across all surfaces (visual only — zero behavior/logic change, all suites
green): session list rows + status system (shape+color, not color-alone) +
telemetry chips + thumbnail placeholders; terminal gate card (≥44pt approve/reject)
+ keybar + reconnect + quick-reply + digest + SwiftTerm accent theme; pairing hero
+ warning tiers + Projects cards + Timeline/Diff; nav chrome + iPad split placeholder
+ privacy shade + motion. Chinese gate copy. UX finding fixed: timeline class colors
now via DS.Palette (+timelineTool/timelineUser tokens).
Design review 8.5/10. Verified: iPhone 16 290 + iPad Pro 11 290 tests green;
packages + integration green; consistency audit ~clean; zero changes under
ios/Packages, src/, public/.
This commit is contained in:
@@ -14,11 +14,6 @@ struct AwayDigestView: View {
|
||||
let onDismiss: () -> Void
|
||||
|
||||
private enum Metrics {
|
||||
static let spacing: CGFloat = 8
|
||||
static let rowSpacing: CGFloat = 4
|
||||
static let horizontalPadding: CGFloat = 14
|
||||
static let verticalPadding: CGFloat = 10
|
||||
static let cornerRadius: CGFloat = 12
|
||||
/// Recent entries shown when expanded (newest kept — the engine's
|
||||
/// digest is uncapped, the banner must not be).
|
||||
static let maxRecentRows = 12
|
||||
@@ -48,26 +43,31 @@ struct AwayDigestView: View {
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: Metrics.spacing) {
|
||||
VStack(alignment: .leading, spacing: DS.Space.sm8) {
|
||||
summaryRow
|
||||
if isExpanded {
|
||||
recentRows
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, Metrics.horizontalPadding)
|
||||
.padding(.vertical, Metrics.verticalPadding)
|
||||
.background(.thinMaterial, in: RoundedRectangle(cornerRadius: Metrics.cornerRadius))
|
||||
.padding(.horizontal, DS.Space.md12)
|
||||
.padding(.vertical, DS.Space.sm8)
|
||||
.background(.regularMaterial, in: RoundedRectangle(cornerRadius: DS.Radius.md12))
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: DS.Radius.md12)
|
||||
.strokeBorder(DS.Palette.hairline, lineWidth: DS.Stroke.hairline)
|
||||
)
|
||||
.accessibilityElement(children: .contain)
|
||||
}
|
||||
|
||||
private var summaryRow: some View {
|
||||
HStack(spacing: Metrics.spacing) {
|
||||
HStack(spacing: DS.Space.sm8) {
|
||||
Image(systemName: "clock.arrow.circlepath")
|
||||
.foregroundStyle(.secondary)
|
||||
.foregroundStyle(DS.Palette.accent)
|
||||
Text(Self.summary(for: digest))
|
||||
.font(.footnote.weight(.medium))
|
||||
.font(DS.Typography.callout.weight(.medium))
|
||||
.foregroundStyle(DS.Palette.textPrimary)
|
||||
.lineLimit(1)
|
||||
Spacer(minLength: Metrics.spacing)
|
||||
Spacer(minLength: DS.Space.sm8)
|
||||
if !isExpanded {
|
||||
Button(Copy.expandTitle, systemImage: "chevron.down", action: onExpand)
|
||||
.labelStyle(.iconOnly)
|
||||
@@ -76,13 +76,14 @@ struct AwayDigestView: View {
|
||||
.labelStyle(.iconOnly)
|
||||
}
|
||||
.buttonStyle(.borderless)
|
||||
.font(.footnote)
|
||||
.tint(DS.Palette.accent)
|
||||
.font(DS.Typography.callout)
|
||||
}
|
||||
|
||||
/// Newest `maxRecentRows` entries, oldest→newest. Server text (`label`) is
|
||||
/// untrusted display input — rendered as plain Text only.
|
||||
private var recentRows: some View {
|
||||
VStack(alignment: .leading, spacing: Metrics.rowSpacing) {
|
||||
VStack(alignment: .leading, spacing: DS.Space.xs4) {
|
||||
ForEach(
|
||||
Array(digest.recent.suffix(Metrics.maxRecentRows).enumerated()),
|
||||
id: \.offset
|
||||
@@ -93,12 +94,13 @@ struct AwayDigestView: View {
|
||||
}
|
||||
|
||||
private func recentRow(_ event: TimelineEvent) -> some View {
|
||||
HStack(spacing: Metrics.spacing) {
|
||||
HStack(spacing: DS.Space.sm8) {
|
||||
Text(Self.time(of: event))
|
||||
.font(.caption2.monospacedDigit())
|
||||
.foregroundStyle(.secondary)
|
||||
.font(DS.Typography.metaMono)
|
||||
.foregroundStyle(DS.Palette.textSecondary)
|
||||
Text(event.label)
|
||||
.font(.caption)
|
||||
.font(DS.Typography.caption)
|
||||
.foregroundStyle(DS.Palette.textPrimary)
|
||||
.lineLimit(1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user