feat(templates): give each style its own voice, and replace generated artwork - #50
Open
Bccorb wants to merge 1 commit into
Open
feat(templates): give each style its own voice, and replace generated artwork#50Bccorb wants to merge 1 commit into
Bccorb wants to merge 1 commit into
Conversation
… artwork Three styles that differed only in colour still read as one look, because all three set every word in the same typeface. Nothing is downloaded, so the lever is which of the faces an OS already ships each style reaches for: a heavy grotesque in tracked capitals, a neutral UI face, and a monospace for small labels are three genuinely different voices, and every platform has all three. Cinematic gains a backdrop, views, and transitions between them. Vista is a fixed stack of four layers behind the page: two concentrated light sources, concentric rings, a slow conic sweep, and a ruled grid. Every layer is a gradient built from the application's own two colours, so one component still comes out looking like that application, and a style that wants no backdrop sets each layer to none. Cinematic sets all four; Professional keeps only the grid. This replaced per-application SVG artwork. A drawing had to be invented on every run, came out differently each time, and was reliably the least convincing thing on the screen. Light and geometry come out the same every time and cost nothing to produce, so Screen, AuthFrame and EmptyState no longer take a motif at all. Each region a Screen renders is now a view. Cinematic makes a view a full height of the window and lets the page settle between them; the other two resolve it to auto and the same markup is an ordinary scrolling page. The backdrop's layers are scroll-driven and pan against each other, so arriving at the next view changes what is behind it. No JavaScript, and it degrades to visible. The reveal animation is ranged over cover rather than entry. A view as tall as the window never finishes entering, so an entry range stranded it part-way through the animation with its content invisible: opacity 0 on a section sitting square in the middle of the screen.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The shared React kit gains a font token per role, a
Vistabackdrop component, and full-viewport views with scroll-driven transitions. The per-application SVG motif concept is removed.Edited in
shared/react-appand copied out withnpm run sync:shared, so both web starters move together.What changed
Type. Three styles that differed only in colour still read as one look, because all three set every word in the same typeface.
--app-font-display,--app-font-bodyand--app-font-labelname system stacks only, so nothing is downloaded and the lever is which of the faces an OS already ships each style reaches for.Vista. A fixed stack of four layers behind the page: two concentrated light sources, concentric rings, a slow conic sweep, and a ruled grid. Every layer is a gradient built from the application's own two colours, so one component still comes out looking like that application. Cinematic sets all four, Professional keeps only the grid, Generic sets none.
Views. Each region a
Screenrenders is now a view. Cinematic makes a view a full height of the window and lets the page settle between them. The other two resolve it toautoand the same markup is an ordinary scrolling page.Motif removal. A drawing had to be invented on every run, came out differently each time, and was reliably the least convincing thing on the screen.
Screen,AuthFrameandEmptyStateno longer accept amotifprop.Riding along, worth a look
Screen.tsxaddsboardtoBANDED, so board screens go from unbanded to a full brand-coloured header. That is a real visual change to an existing archetype and was not called out in the original commit message. It is in the changeset now.Degradation, since this is the risky part
The four usual ways this kind of change breaks are handled, and I checked each:
100svh, not100vh, so mobile browser chrome does not clip a viewscroll-snap-type: y proximity, notmandatory, so content taller than the viewport never becomes unreachablemin-height, notheight, so an overflowing section still growsanimation-range: cover, notentry, because a view as tall as the window never finishes entering and an entry range strands it atopacity: 0mid-screenBoth scroll-driven behaviours sit behind
@supportsandprefers-reduced-motion. Where a browser has no view timeline the content is simply visible.Coordination required
This must land together with the pipeline side in
seamless-idea-api.reference.tsalready tells the generator there is no Motif file, butspec.tsstill asks the model forpresentation.motif, still validates it as a representational scene, andrenderSpecstill prints it to the user asbackdrop, which nothing draws any more. That work is in flight and removes the stale validation. Two spots to catch while you are there: the doc comment onSpecPresentation.motifintypes.tsstill describes an SVG scene, andrenderSpecstill labels the linebackdrop.Separately, and not this PR's job:
renderThemeCssinseamless-idea-api/src/pipeline/theme.tsoverwritesindex.csswholesale for generated apps, so this CSS now exists in two hand-maintained copies in two repos.npm run validateonly checks shared to template inside this repo, so nothing catches drift between them. They agree today, verified by comparing class and custom-property sets. Worth an issue.Checks
npm run validatepasses, no drift.npm run check(typecheck, lint, format:check, test) andnpm run buildpass in both web starters.