Skip to content

feat(scout-for-lol): add hero, duel hero, face, strip, bar and rank lockup components - #5245

Merged
shepherdjerred merged 2 commits into
mainfrom
scout-redesign-a3-domain
Nov 27, 2026
Merged

shepherdjerred merged 2 commits into
mainfrom
scout-redesign-a3-domain

Conversation

@shepherdjerred

@shepherdjerred shepherdjerred commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #5209 (primitives) and #5208 (variables). Tracker AI-966.

Why

The redesigned pages share a handful of domain pieces: a lead panel with a
champion fading in, a matchup lead with two champions, round faces for
champions and people, the last-games strip, a win-rate bar and a rank lockup.
They belong in the design system, built once on the soft surface primitives and
friendly.css variables, before any page composes them.

What

All in design-system/src/domain/profile/ (the flat domain/ directory is at
the repository's file budget), exported through the existing ./domain/* map.

  • HeroPanel: words on one side, champion splash fading in from the other
    (align="start" | "end"), an action slot floating over the art, works with
    no art. DuelHero: two champions facing each other around a centred verdict.
    Both sit on Panel variant="hero" and render as a section, so a caller
    names the landmark with aria-labelledby.
  • Art facing: art.face is the direction the champion in the source art looks
    ("left" | "right") and art.mirrored is an explicit override. Art is
    flipped when it looks away from the words. No facing data exists yet, so art
    without face is shown as it is; a later facing file only has to supply
    face.
  • ChampionFace (sizes 26, 36, 40, 46, 76, 92; win or loss mark with text for
    assistive technology) and PersonInitial (sizes s, m, l; you; live dot;
    champion badge). The initial is the first letter or digit of the name, with
    a grapheme fallback.
  • ResultStrip: oldest to newest, wins filled, losses hollow rings in the loss
    colour, the current streak (two or more) on a soft tint, an accessible text
    summary, empty slots at the old end, and only the newest slots kept.
  • WinRateBar: bar (filled track, value, optional 50% mark, you tint) and
    range (dot on a track, optional 50% "even" label and likely range). It
    throws on a value outside 0 to 100 or a backwards range.
  • RankLockup wraps RankDisplay, which gains size and detail.
  • NameText: a name in a row, one line with an ellipsis, the whole name kept
    as text and in title, so rows keep one height. The stories' rows (win-rate
    ranking, faces in a feed, people beside names) use it.
  • Narrow (390) layouts: the duel hero's two champions overlap by a tenth, the
    end one fading in across the overlap so the halves blend into each other,
    and one fade into the panel runs across both, leaving the heading a clean
    ground (stacking a fade on each half left a seam at the first half's edge).
    The hero panel's narrow rules had lost on specificity to the desktop side
    rules, so its art was offset inside its box; they now win.
  • Rules are in styles/friendly-domain.css, with --scout-loss-soft next to
    --scout-win-soft in friendly.css. Values come from d9, d10 and d11 CSS.
  • One story per component with real champion art, long names, no-art, empty
    and mirrored cases; the catalog test mounts all of them in modern dark,
    modern light and classic light.

text-scout-warning

It was genuinely undefined in the app's Tailwind theme (used in
dare-progress.tsx and dare-list.tsx), so it rendered as inherited text.
Mapping it to the warning fill would have been a regression rather than a
one-line fix: the fill is 2.3:1 on the modern dark surface and 3.6:1 on the
classic dark one. So this adds a warningOnSurface token (as success and danger already
have): the existing value on the two light themes and #E0A24F / #D9A04F on
the dark ones (at least 6:1 on every ground), in themes.json, the schema, the
generator and the generated files, and maps scout-warning to it in the app.
The built app CSS now contains
.text-scout-warning{color:var(--scout-color-warning-on-surface)}. The frontend
still maps scout-warning to the fill, as it does for the colours A1 left
alone; it is not touched here.

Demo

Review fixes (before and after)

Before After
Duel hero, 390, light: glare band, heading over the art
Duel hero, 390, dark
Duel hero, 390, long names
Hero panel, 390 (art was pushed off its box)
Win-rate rows, long name
Win-rate rows, 390
Faces in a narrow feed, 390
Person initial beside long names, 390

All stories

New components, so there is no prior state. Rendered from the Storybook build,
modern dark and light.

Heroes

Story Dark Light
Hero panel, 1440
Hero panel, 390
Words on the right, 1440
Long name, 1440 and 390
No art, 1440
No art, 390
Art facing away from the words (mirrored), 1440
Duel hero, 1440
Duel hero, 390
Duel hero, long names
Duel hero, words only

Faces, people, strip, bars, rank

Story Dark Light
Champion face: every size, win and loss
Champion faces in a feed
Person initial: sizes, live, champion badge
Person initial: unusual names
Person initial beside names, "you"
Result strip: win streak
Result strip: loss streak
Result strip: few games, none
Result strip, narrow column
Win rate: friends ranking
Win rate: likely range
Win rate: below even, extremes
Rank lockup
Rank lockup, long secondary line

Verification

  • bunx turbo run build typecheck test lint --filter=@scout-for-lol/design-system --filter=@scout-for-lol/app --filter=@scout-for-lol/frontend --filter=@scout-for-lol/design-audit: 41 of 41 tasks successful.
  • bun run test:e2e in packages/scout-for-lol/packages/design-system: 879 passed (after the review fixes), every story (the new ones included) in modern dark, modern light and classic light with the page-error, broken-image and axe checks.
  • New src/domain/profile/profile.test.tsx (28 tests: streak and summary, padding and truncation, percent formatting and track positions, range and bar markup, loud failure on bad input, initials, face marks, facing and mirroring, hero and duel markup, rank lockup, NameText) and additions to friendly-styles.test.ts (loss tint, warning contrast in all four themes, the app mapping).
  • Screenshots were captured with Playwright's Chromium from the built Storybook, not PinchTab: the PinchTab daemon kept failing launchctl bootstrap ("Input/output error") while other agents were running. They are the same pages the catalog test mounts.
  • The classic skin was exercised by the catalog test (classic light) only, not inspected by eye; classic dark is not covered by either, though the new contrast test covers its tokens.
  • Extended tier: none of the touched packages has extended steps.
  • Not run: live deployment; no page uses these components yet.

🤖 Generated with Claude Code

https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y

@shepherdjerred

shepherdjerred commented Nov 26, 2026 •

Copy link
Copy Markdown
Owner Author

@greptile-apps

greptile-apps Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Automatic reviews are disabled for this repository. Configure in Code Review Settings.

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@shepherdjerred
shepherdjerred force-pushed the scout-redesign-a3-domain branch from 6e4ccf0 to bd591aa Compare November 26, 2026 18:25
@shepherdjerred
shepherdjerred removed this pull request from stack #5246 November 26, 2026 19:20
@shepherdjerred
shepherdjerred removed this pull request from stack #5269 November 26, 2026 19:35
@shepherdjerred
shepherdjerred force-pushed the scout-redesign-a2-primitives branch 2 times, most recently from 2181e70 to 4f6c645 Compare November 26, 2026 23:10
Base automatically changed from scout-redesign-a2-primitives to main November 27, 2026 03:14
@shepherdjerred
shepherdjerred marked this pull request as ready for review November 27, 2026 04:36
@shepherdjerred

Copy link
Copy Markdown
Owner Author

@codex review

Automated re-review request for 2d2db3c from the CI review gate.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T04:39:43.181967Z 2d2db3c Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d2db3ccba

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +201 to +204
.scout-result-strip__dot {
flex: none;
width: 19px;
height: 19px;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Let result dots shrink within narrow desktop containers

At viewport widths above 720px, the new NarrowColumn story constrains the strip to 20rem (320px), but its 20 non-shrinking 19px dots require over 450px once gaps are included, and the streak wrapper adds more space. The strip therefore overflows its panel instead of fitting the column. The responsive override only considers viewport width, so it cannot handle narrow columns on desktop. Allow the dots and streak to shrink based on the available container width.

Useful? React with 👍 / 👎.

shepherdjerred and others added 2 commits November 26, 2026 22:41
…ockup components

Why
The redesigned pages share a handful of domain pieces: a lead panel with a
champion fading in, a matchup lead with two champions, round faces for
champions and people, the last-games strip, a win-rate bar and a rank lockup.
They belong in the design system, built once on the soft surface primitives.

What
- `domain/profile/`: `HeroPanel` (art, `align`, an `action` slot, works with
  no art) and `DuelHero`; `ChampionFace` (sizes 26 to 92, win/loss mark) and
  `PersonInitial` (sizes, `you`, live dot, champion badge); `ResultStrip`
  (oldest to newest, hollow loss rings, soft current-streak highlight,
  accessible summary); `WinRateBar` (a filled bar, or a dot on a track with an
  optional 50% mark and likely range); `RankLockup`.
- Art takes `face` (the way the champion in the source art looks) and a
  `mirrored` override, so a later facing file can flip the art toward the
  words without touching call sites. No facing data exists yet; art is shown
  as it is until `face` is given.
- `RankDisplay` gains `size` and `detail`; `RankLockup` wraps it.
- `styles/friendly-domain.css` carries the rules, values from d9, d10 and d11
  CSS, plus a `--scout-loss-soft` variable beside `--scout-win-soft`.
- A story per component with real champion art, long names, empty and no-art
  cases; the catalog test runs them in its three themes.
- `text-scout-warning` was used by the app but never mapped, so it rendered
  as inherited text. Mapping it to the fill would be 2.3:1 (modern) and 3.6:1 (classic) on the
  dark themes, so this adds a `warningOnSurface` token to all four themes
  (light: the existing value; dark: #E0A24F and #D9A04F, at least 6:1 on every
  ground), the schema and the generator, and maps `scout-warning` to it in the
  app. A test holds the contrast.

Verification
- bunx turbo run build typecheck test lint --filter=@scout-for-lol/design-system
  --filter=@scout-for-lol/app --filter=@scout-for-lol/frontend
  --filter=@scout-for-lol/design-audit.
- bun run test:e2e in the design-system package: every new story in modern
  dark, modern light and classic light with axe.
- Stories rendered and inspected in modern dark and light at 1440 and 390.
- Extended tier: none of the touched packages has extended steps.
- Not run: live deployment; no page uses these components yet.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
…one line in rows

Why
Review of the new domain components found two problems at 390 wide: the duel
hero's two art halves met in a bright vertical band with the heading sitting
over the bottom of the art, and a long name in a win-rate row wrapped to four
lines.

What
- Narrow duel hero: the two champions overlap by a tenth and the end one fades
  in across the overlap, so the halves blend into each other and never into
  the panel colour. One fade into the panel runs across both, which gives the
  heading a clean ground. Stacking a fade on each half had left a seam at the
  first half's edge.
- Narrow hero panel: its rules lost on specificity to the desktop side rules,
  so the art was offset inside its box and carried a horizontal mask. They now
  match the desktop specificity.
- `NameText`: one line with an ellipsis, the whole name kept as text and in
  `title`. The win-rate ranking, faces in a feed and people beside names
  stories use it, with narrow and long-name variants.

Verification
- bun run test:e2e in the design-system package: 879 passed, every story in
  modern dark, modern light and classic light with axe.
- 83 design-system unit tests pass, including NameText.
- eslint, tsc and prettier clean for the touched files.
- Stories re-captured at 390 and 1440 in modern dark and light.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
@shepherdjerred
shepherdjerred force-pushed the scout-redesign-a3-domain branch from 2d2db3c to d18276f Compare November 27, 2026 06:41
@shepherdjerred
shepherdjerred merged commit ca251d2 into main Nov 27, 2026
8 checks passed
@shepherdjerred
shepherdjerred deleted the scout-redesign-a3-domain branch November 27, 2026 19:25
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