Polish Where cards, calendar, and region colors - #170
Conversation
kyleve
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
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] = [ |
There was a problem hiding this comment.
The app isn't shipping, lets just remove this for now. It's Ok if they shift.
| path.closeSubpath() | ||
|
|
||
| switch placement { | ||
| case .watermark: |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Group watermark vs stamp into two structs please vs all these top level props
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.
Summary
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 passswift run bumper config .,swift run bumper test ., andswift run bumper lint . --timings— passed./swiftformat --lint— passed./xcstrings --lint— passedReview 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
Pathartifacts 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/240tolerance preserves thin geography such as Long Island; the micro path uses1/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
.standardand applies only changed leaf assignments. All visible labels, enum choices, Settings search metadata, and custom errors resolve through manualLocalizable.xcstringsentries 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.