Skip to content

Polish Where cards, calendar, and region colors - #170

Merged
kyleve merged 28 commits into
mainfrom
codex/where-ui-polish
Aug 2, 2026
Merged

Polish Where cards, calendar, and region colors#170
kyleve merged 28 commits into
mainfrom
codex/where-ui-polish

Conversation

@kyleve

@kyleve kyleve commented Aug 2, 2026

Copy link
Copy Markdown
Owner

Posted by an AI agent on kyleve’s behalf.

Summary

  • Refine the Locations cards and calendar: thinner regular-card rosettes, a thinner current-month outline, subtly blue current-month text, and larger continuous month-card corners.
  • Expand the persisted region-color palette with gold, lime, coral, magenta, silver, slate, and charcoal, and derive uncustomized fallback colors from that same complete palette.
  • Give region-editor previews the Locations card’s live tilt and Liquid Glass context, including a readable static fallback before motion samples, under Reduce Motion, and during snapshots.
  • Replace the spectral foil overlay with a grayscale soft-light sheen so motion adds depth without shifting gray or saturated card colors.
  • Keep security ink region-tinted in light mode; in dark mode, mix the background ink toward white and composite it by luminosity so rosettes, silhouettes, and microprint lift the dark glass without becoming oversaturated on touch. The prominent entry stamp retains normal compositing.
  • Reuse each regular card’s RegionKit silhouette as a large watermark, a fill-only geographic entry-stamp seal, and a repeated microprint border. Compact cards keep the simpler symbol treatment.
  • Remove redundant heavy, perforated, dotted, and dashed outer frames so Liquid Glass alone owns the card edge in direct previews and production containers.
  • Keep RegionKit’s source-outline cache full fidelity while exposing projection-aware simplification. WhereUI owns cached full, medium, small, and micro SwiftUI paths for its rendering sizes.
  • Preserve thin stamp geography such as Long Island with the small path, while using a coarser subpixel micro path for the repeated eight-point border.
  • Confine 60 Hz tilt observation to the lightweight sheen modifier so motion does not invalidate card text or Canvas artwork.
  • Add a DEBUG-only Card Designer Studio under Settings → Appearance. Its pinned preview supports regular/compact cards, light/dark appearance, region and color selection, and controls for card geometry, typography, stamp, artwork, microprint, rosettes, sheen, ink, and shadows.
  • Persist the Studio draft while keeping “Apply to App” session-only. Resetting recovers corrupt or unsupported drafts, and enabling artwork or switching card variants immediately restarts outline loading.
  • Export the complete design—or only values differing from app defaults—as shareable or clipboard JSON and paste-ready Swift.
  • Localize all Studio copy through WhereUI’s generated string-catalog symbols, including Settings metadata and persistence errors.
  • Add light/dark Card Designer and region-editor snapshots, including a neutral-gray card, and refresh only intended card, calendar, Your Year, and developer-map references.

Validation

  • ./test — all 895 affected unit/integration tests and all 30 affected snapshot suites passed
  • ./test --snapshots — all 33 snapshot suites passed; no references changed for the final review fixes
  • ./test WhereUITests — all 343 tests passed during the final focused review pass
  • swift run bumper config ., swift run bumper test ., and swift run bumper lint . --timings — passed
  • ./swiftformat --lint — passed
  • ./xcstrings --lint — passed
  • Device iterations installed and exercised the card’s light/dark touch treatment, grayscale sheen, region artwork, microprint, live tilt, and Card Designer exports on Kyle’s iPhone 17

Review notes

Card compositing and motion

The motion sheen uses only white, gray, and black luminance stops under soft-light compositing. Live tilt geometry is unchanged, while a stylesheet-owned portrait fallback pose keeps the glint away from the card center before the first sensor sample, under Reduce Motion, and during snapshot capture.

Dark-mode background security print resolves to a 65% white-mixed region tint under luminosity compositing. This keeps the printed details lighter than the dark glass without amplifying hue or saturation during Liquid Glass touch interaction. The entry stamp remains normal-composited for clarity. Live sensor fields are read only inside TiltSheen, keeping the rest of each card stable at the motion cadence.

Region artwork and caching

RegionKit decodes and actor-caches only the requested region’s full source outline. Its stateless Ramer–Douglas–Peucker helper preserves multipart identity and handles antimeridian projection, while the root-injected WhereUI cache owns rendering policy and bounded SwiftUI Path artifacts keyed by region and full/medium/small/micro resolution.

The watermark uses the medium path, the geographic stamp uses the small path, and the repeated border uses the micro path. Every fidelity retains the full outline’s framing. The small-path 1/240 tolerance preserves thin geography such as Long Island; the micro path uses 1/60, where its deviation remains subpixel at eight-point border size. The tiny stamp is fill-only because stroking acute coastline joins produced visible spikes.

The microprint border stamps the cached silhouette at 8 pt with 11 pt spacing and 22% tint opacity around a continuous inset perimeter. It loads, projects, and simplifies no additional geometry; compact cards remain unchanged.

Card Designer delivery contract

The Studio edits a versioned presentation-only configuration layered over WhereStylesheet.CardStyles; it does not create a second production styling system or alter count animation and outline-cache policy. One root-owned model persists the draft, while app-wide application always starts disabled.

Full and diff-only exports share the same deterministic JSON/Swift encoders for both ShareLink and clipboard actions. Sparse JSON retains its schema version, while sparse Swift starts from .standard and applies only changed leaf assignments. All visible labels, enum choices, Settings search metadata, and custom errors resolve through manual Localizable.xcstrings entries and generated symbols.

The Studio preview is pinned above its scrolling controls. Selecting dark appearance applies the same dark page background used by Locations, and the whole Studio follows that selected appearance for a consistent editing context.

@kyleve kyleve left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Posted by an AI agent on kyleve’s behalf.

Please give the sheen fallback in WhereStylesheet, RegionSummaryCard, and HolographicSheen extra scrutiny. Static contexts deliberately retain the full rainbow foil while reducing only the additive white glint; the card switches to full live glint after TiltProvider delivers its first sample. Snapshot and simulator coverage pin the static appearance, but the start, live transition, and stop-on-dismiss lifecycle still need verification on a physical iPhone.

@kyleve kyleve changed the title Polish Where location cards and calendar styling Polish Where cards, calendar, and region colors Aug 2, 2026

@kyleve kyleve left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Posted by an AI agent on kyleve’s behalf.

Please scrutinize the split between RegionAppearanceCatalog.colors and defaultColors. The selector intentionally exposes all eighteen persisted tokens, while the id-derived fallback hash remains fixed to the original eleven-token pool. That preserves existing uncustomized region appearances as the selectable palette grows; RegionAppearanceCatalogTests pins Texas to its prior pink fallback as a compatibility tripwire.

@kyleve kyleve left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Posted by an AI agent on kyleve’s behalf.

Review focus: the card sheen now consists only of grayscale luminance stops plus a white glint, both composited with soft light. Tilt placement, static fallback behavior, and intensity tokens are unchanged. I added light/dark slate-card editor snapshots specifically to make spectral regressions visible; please scrutinize neutral-card contrast and the strength of the glint.

@kyleve kyleve left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed by an AI agent on kyleve’s behalf.

Reviewed follow-up commit df8fdf7 with no blocking findings. Regular cards alone opt into RegionKit artwork; compact cards keep the existing symbol path and do not trigger geometry loading. The loader decodes only the requested bundled region behind an actor-isolated cache, while malformed resources remain visible through a fault and debug assertion. The Canvas preserves multipart geography and antimeridian-spanning shapes, and the refreshed snapshots verify both repeated silhouettes inside the real Locations/editor GlassEffectContainer contexts, including the neutral-gray light/dark card.

@kyleve kyleve left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed by an AI agent on kyleve’s behalf.

Reviewed follow-up commit 3d51fc5 with no blocking findings. RegionSummaryCard now has no ornamental edge overlay, and the obsolete regular/compact frame geometry plus shared perforation/dash tokens were removed rather than left dormant. Liquid Glass supplies the one remaining subtle rim in regular, compact, light/dark, contrast, accessibility, and large-type captures. The full affected run remains green: 864 unit/integration tests and 29 snapshot suites.


/// Keep id-derived defaults stable as the user-selectable palette grows.
/// These are the eleven colors used by the original hash mapping.
private static let defaultColors: [RegionColorToken] = [

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The app isn't shipping, lets just remove this for now. It's Ok if they shift.

path.closeSubpath()

switch placement {
case .watermark:

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this type knowing about the use case, let's add a style type that controls how rendering displays the path, and then place watermark and stamp versions of that style on our card's style on wherestylesheet.

style: regionShape,
placement: .stamp,
)
.frame(width: size * 0.42, height: size * 0.28)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While we're in here let's clean up these constants and move them to the style for the card please.

/// Relative projection geometry and ink strength for the repeated
/// region silhouette: one large security watermark and one stamp seal.
struct RegionShape: Equatable {
var watermarkCenter: CGPoint

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Group watermark vs stamp into two structs please vs all these top level props

kyleve added 16 commits August 1, 2026 23:18
Keep RegionKit's cached outlines at source fidelity and expose a stateless, antimeridian-aware simplifier. Cache render-ready full, medium, and small SwiftUI paths at the Where UI root, use medium/small paths on cards, and isolate live tilt observation to the sheen overlay.
Reuse the cached small region path to fill a tangent-aligned inset perimeter on regular cards. Keep the treatment stylesheet-driven and refresh Locations and editor snapshots.
Tighten the UI-owned small-resolution tolerance so Long Island and similar narrow features retain their silhouette at stamp size. Pin New York's retained path detail and refresh the affected card snapshots.
Add a fourth UI-owned path fidelity for the repeated eight-point microprint while preserving the detailed small path for entry stamps. Pin the fidelity ordering and New York complexity budget, and refresh the intended card snapshots.
Render the small region seal as a fill only so acute coastline geometry cannot produce visible stroke spikes. Remove the unused stylesheet token and refresh the targeted card references.
Resolve a Screen blend from the Broadway color-mode trait and apply it to the shared stamp and security-paper layers. Preserve normal light-mode compositing, pin the trait token, and refresh only the reviewed dark references.
Derive fallback appearances from the same complete palette exposed by the selector now that no compatibility pool is needed. Refresh the region-map references for the resulting pre-release color assignments.
Group watermark and stamp tokens into complete artwork specs owned by the card stylesheet. Keep the Canvas renderer placement-agnostic by passing the selected projection and ink treatment directly.
Collect the stamp rings, content geometry, typography, arc layout, opacity, and rotation under one card-style token. Keep the rendering view declarative and preserve the existing regular and compact snapshots.
Exercise the real New York micro-fidelity path in a colocated SwiftUI preview so the new security-border view satisfies preview coverage and remains easy to inspect.
Update the selected-tool reference for the approved full-palette fallback colors already recorded in the standalone Region Map snapshots.
@kyleve
kyleve enabled auto-merge (squash) August 2, 2026 17:28
@kyleve
kyleve merged commit 96074ac into main Aug 2, 2026
4 checks passed
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