Repository navigation
Style boards and flavours as shared data - #30
Merged
Merged
Conversation
src/data/styles.ts is the one source for the ten style boards and sixteen flavours. The portal and the console keep byte-identical copies below the header and pin its hash; scripts/check-styles.mjs holds the data's rules and prints that hash. The portal's values win where the two copies disagreed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
First step of
tmp/design-guidance/styles-page.md§1.src/data/styles.tsbecomes the one source for the ten style boards and sixteen flavours. The portal and console will keep copies that are byte-identical below the header, pinned by hash like the console's drop-zone check. This PR changes nothing in those repos.Hash for the downstream pins
SHA-256 of the file body below its header:
npm run checkprints it on every run. The shared body starts at the line// Framework-free on purpose: no imports, no DOM, no Astro.What the file carries
id,label,word,feel,paletteas{ name, hex }[],type,shape,motion,suitsand an optionaldemo.traits.typeistype.note, itstraits.colouris a newcolourfield, and its fonts aretype.heading,type.bodyandtype.label. Its drawing detail sits underdraw:onAccent,eyebrow,heading,texture,radius,align,mark, themotionkind andsample.FONT_STACKScomes across unchanged.traitsarray is always the feel line split on ", ", sofeelParts(board)returns exactly what it shows today.STYLE_PICKS_MAX = 2,STYLE_FLAVORS_MAX = 3,STYLE_FEEL_MAX = 80. The portal and console already agree on all three.isStyleId,isFlavorId,styleBoard,styleWord,flavorLabel. Two small extras are added because the portal uses them:styleFlavor, itsflavorById, andfeelParts.styleWordandflavorLabelbehave exactly like the console's. Unknown ids pass through as themselves.rolesandcontrastPairsfor rendering and its contrast check. The console keepsflavorsOfandstylePicksOffor reading accounts.Differences reconciled: the portal's value wins
High-techHigh tech(the portal's short name)#0B1220 #1E293B #38BDF8 #E2E8F0#0b1220 #e6edf7 #38bdf8 #16213a#FFFFFF #F4F4F5 #18181B #2563EB#ffffff #1a1a1a #2f5bea #f3f3f1#1F2A44 #7A1F2B #F5EFE0 #B08D57#fbf7ee #1b2a4a #7a1f2b #efe6d2#5B6B3A #A67C52 #E9E1D0 #2F4A3A#f4efe4 #2f3a2c #4e6b34 #e4dccb#1A1423 #3B1F2B #C9A227 #F3EAD3#141115 #f3ead8 #c9a45c #221d24#FF6B6B #FFD93D #6BCB77 #4D96FF#fff8ec #2a1a4a #ff6b5e #ffd84d#E53935 #FDD835 #1E88E5 #43A047#fffdf5 #161616 #1f4fd1 #ffd60a#E07A5F #F2CC8F #81B29A #3D405B#f3e3c3 #3b2317 #1f5f5b #e8b64c#000000 #FFFFFF #FF3B00 #FFE600#ffffff #0a0a0a #0033ff #ffe500#8C6A4F #D9C4A5 #F6EFE6 #5A3E2B#f7f1e8 #3d2b1f #8c4a2f #ebdfccPalettes now always run ground, ink, accent, surface, in lowercase. That means the console's colour strip will show the colours clients actually picked from. Names, feel lines, traits, flavour ids and labels, and the three limits already matched.
Demo links set
Only two vertical demo sites exist in the Website repo's
src/data/site.ts: Mainstreet and Supper. The other superherotech.ai subdomains there are client work, not demos. Both demos were checked in a browser.No other board has a demo. Mainstreet is not Classic, even though the design note used it as its example. It has no serif, and no navy, burgundy or cream.
For review
suitsis new. Neither copy had it. Each board's entry names the trade of its own made-up sample business, such as "Accountants, lawyers and advisers" for Classic. Please widen or correct these before the public page uses them.Check
scripts/check-styles.mjsruns at the end ofnpm run check, which passes. It checks for:pairsWithnaming a board#rrggbbpalettes with the four roles in orderdemo.hrefA planted uppercase hex,
httpdemo, duplicate flavour and unknownpairsWithboard each failed the check by name. The file also passes a stricttscrun.Next come the site, then the portal and console. Each copies the body and pins the hash above.
🤖 Generated with Claude Code