M8: clamp Dynamic Type at ScarfGo scene root

ScarfGo is a developer tool that benefits from tighter defaults
than Apple's spacious baseline, but shouldn't lock out users who
need accessibility sizes. `.dynamicTypeSize(.xSmall ... .accessibility2)`
at the WindowGroup gives both: compact-first layout, still scalable
to ~XL accessibility for low-vision users.

Going past .accessibility2 collapses multi-column rows and forces
text truncation in ScarfGo's dense list layouts — not a win for
anyone. Matches Use-Your-Loaf's "Restricting Dynamic Type Sizes"
guidance from the M8 density research.

One-line change ahead of the TabView migration (2.2) so every
subsequent UX-density decision factors in the clamped range.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alan Wizemann
2026-04-24 13:35:51 +02:00
parent e1f862e2f9
commit cecc1060c6
+11
View File
@@ -51,6 +51,17 @@ struct ScarfIOSApp: App {
WindowGroup { WindowGroup {
RootView(model: root) RootView(model: root)
.task { await root.load() } .task { await root.load() }
// Clamp Dynamic Type at the scene root. ScarfGo is a
// developer tool that needs more density than Apple's
// .xxxLarge default, but we still scale from .xSmall
// to .accessibility2 so users who need larger text can
// get it without breaking the layout. Going past
// .accessibility2 (~XL accessibility) collapses
// multi-column rows and forces text truncation not
// a win for anyone. Cross-checked against
// Use-Your-Loaf's "Restricting Dynamic Type Sizes"
// guidance (M8 density research).
.dynamicTypeSize(.xSmall ... .accessibility2)
} }
} }
} }