Skip to content

feat(design-system): add difficulty tokens + DailyHub/Practice UI rollout - #78

Merged
wei18 merged 1 commit into
mainfrom
feat/design-system-difficulty-tokens
May 21, 2026
Merged

wei18 merged 1 commit into
mainfrom
feat/design-system-difficulty-tokens

Conversation

@wei18

@wei18 wei18 commented May 21, 2026

Copy link
Copy Markdown
Owner

Resolves Brand audit §未決 #1 (option a) — formalize AppIcon 07's sage/clay/amber trio as real design tokens with calmness-preserving footprint.

Changes

  • docs/designs/design-system.md: +§Difficulty (v2+) — 3 tokens × light/dark
  • Theme/Theme.swift + DefaultTheme.swift: DifficultyTokens struct
  • DailyHubView: card leading tint dot + label color
  • PracticeHubView: segmented Picker + Draw button .tint selected-difficulty-aware

Verification

  • swift build clean
  • swift test (DailyHub|Practice): 18/18 pass
  • 6 snapshot baselines re-recorded

§未決

  • Per-segment Picker tinting needs custom control — backlog
  • Dark-mode hexes designer-picked; no dark-icon source-of-truth yet
  • Card tint footprint scoped to leading dot + label (Liquid Glass preserved)

Source: meetings/2026-05-21_design-system-difficulty-tokens.impl-notes.md.

…llout

Brand audit §未決 #1 resolved with option (a) — extend design-system with
real difficulty color tokens so the AppIcon 07 sage/clay/amber trio is a
vocabulary the App actually speaks, not just icon decoration.

design-system.md
- New §Difficulty (v2+) subsection: 3 tokens × light+dark variants
  - difficulty.easy:   #5C7A4F / #9BB87E
  - difficulty.medium: #C97D5F / #D89A82
  - difficulty.hard:   #E6A857 / #EFC07F
- Calmness contract preserved: signaling-only footprint (cards + Picker),
  NOT general accent use
- Cross-ref to icon 07 + PR #63

Theme/Theme.swift + DefaultTheme.swift
- DifficultyTokens struct (3 ThemeColor entries)
- Added to Theme protocol

DailyHubView
- DailyPuzzleCard leads with 10pt tint circle + difficulty label colored
  by theme.difficulty.* (was text.primary)

PracticeHubView
- Segmented Picker .tint + Draw button .tint follow selected difficulty
  (was static accent.primary)

Verification
- swift build clean
- swift test --filter "DailyHub|Practice": 18/18 pass
- 6 snapshot baselines re-recorded (3 DailyHub + 3 Practice)

§未決 (impl-notes)
- Per-segment Picker tinting needs custom control (SwiftUI segmented has
  one .tint only) — backlog
- Dark-mode token hexes are designer-picked siblings; no dark AppIcon
  source-of-truth yet
- Card tint scope: leading dot + label only (per Liquid Glass usage)

Co-Authored-By: Claude Opus 4.7 <[email protected]>
@wei18
wei18 merged commit 335e702 into main May 21, 2026
@wei18
wei18 deleted the feat/design-system-difficulty-tokens branch May 21, 2026 13:27
wei18 added a commit that referenced this pull request May 21, 2026
v2.3.6 — Settings IAP + HomeView Remove Ads card
- NEW SudokuUI/Components/MonetizationStateController.swift (~133 lines)
  @observable @mainactor shared controller. State: hasPurchasedRemoveAds,
  availableProducts, purchaseInFlight, restoreInFlight, latestMessage.
  bootstrap() reads from AdGateStateStore + IAPClient.availableProducts.
  purchaseRemoveAds() / restorePurchases() shared by Settings rows +
  HomeView 5th card. On success: AdGate.recordPurchase() so banner
  suppression aligns immediately.
- SettingsView: new Section with RemoveAdsRow (unpurchased only) +
  RestorePurchasesRow (always). Spinner during in-flight; Label result.
- HomeView: 5th RemoveAdsCard (unpurchased only), difficulty.medium clay
  accent (commerce intent per PR #78 tokens).
- RootView / RouteFactory threaded with monetizationController.

v2.3.7 — Boot order: UMP → ATT → AdMob init
- NEW AppMonetizationKit/AdsAdMob/MonetizationBootCoordinator.swift (~144
  lines): public actor + closure-based MonetizationBootBridges seam.
  Live wiring calls UMPConsentPresenter → ATTPresenter → adProvider
  sequentially; each step independent, throws never abort sequence.
- AppComposition.bootMonetization() with Telemetry fan-out logging.
- SudokuApp.swift root scene .task wires the boot.

Tests +22 (11 SettingsIAPRow + 4 HomeViewRemoveAdsCard + 7 BootOrder).
Filtered: 25/25 green. Build clean. 3 new snapshot baselines auto-recorded.

§未決 (impl-notes)
- Toast surface deferred (Form Label for now)
- purchaseUpdates() out-of-band refund subscription deferred
- removeAdsProductId duplicated SudokuUI↔IAPStoreKit2 (frozen MonetizationCore)
- iPad/macOS Settings snapshot coverage

Co-authored-by: Claude Opus 4.7 <[email protected]>
wei18 added a commit that referenced this pull request May 22, 2026
…adient (#94)

Brand audit S3 items (#81):

S3-A — light: removed 2 stacked shadow rects per design-system
  "no skeuomorphic shadows" contract

S3-B — both: thickened grid strokes for 60px legibility
  light: stroke-width 12 → 16
  dark:  stroke-width 14 → 18

S3-C — dark: flattened radialGradient to solid #2A3B5C per
  design-system flat-surfaces convention

PNG re-rasterized via qlmanage -t -s 1024. Dimensions 1024×1024 verified.
File sizes:
  AppIcon-Light.png: 22KB → 29KB (thicker strokes)
  AppIcon-Dark.png:  592KB → 33KB (gradient flattened, 18× smaller)

§未決 (impl-notes)
- 60px legibility eye-check on real device; if amber strokes still thin
  on navy, escalate dark to stroke-width 20 in follow-up

Closes #81 (S3 portion; S2 mostly resolved by #78 + accepted §未決 #4(a)).

Co-authored-by: Claude Opus 4.7 <[email protected]>
wei18 added a commit that referenced this pull request Sep 12, 2026
…k round) (#1069)

Brings in the phase-2 body improvements and references/ splits (#73–#78),
the final-check review fixes across all four scopes (#79–#82), and the
gate hardening: fails on MAJOR, warns when the description listing exceeds
the default budget, README mirrors are manual-only. Pointer-only.

Co-authored-by: Claude Fable 5.1 <[email protected]>
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.

1 participant