Repository navigation
feat(scout-for-lol): add friend row, game sentence row, sticker, setup row, tip list and champion card - #5255
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
|
Automatic reviews are disabled for this repository. Configure in Code Review Settings. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
2d2db3c to
d18276f
Compare
…p row, tip list and champion card
Why
The Players, Server, Home, Player, Champion and public champion pages share a
set of rows and cards: a friend with a rank, a game as a plain sentence, a
weekly award, a setup as rows of icons, generated tips and a champion on the
index. They belong in the design system, on the soft surface primitives.
What
- `domain/rows/` (the flat `domain/` directory is at the file budget):
- `FriendRow`: initial, name, rank, the latest game as a sentence, an
optional live dot, a "You" pill; a `place` switches to the ladder layout.
- `GameSentenceRow`: a champion face with its result mark, or a friend's
initial with a champion badge, then "Won as Ahri, 9/2/11, +21 LP" or
"RiverQuartz won as Jinx with you, 10/3/9", the time and an optional
highlight spark.
- `Sticker`: a weekly award with a face and a spark.
- `SetupRow`: runes, spells and builds as icon rows, in a sequence with
chevrons or a set, with the win rate, games and an optional pick rate.
- `TipList`: generated tips led by their ability icons, with the other
side's tips in a closed native disclosure.
- `ChampionCard`: face, name, lane, win rate, games, lane win rate and tier.
- A person's name in a row is cut to one line with an ellipsis, with the full
name kept as text and in `title` (`NameText` from the profile components; the
sentence lead in a game row does the same).
- `ChampionFace` gains the 72px size the index card uses.
- Rules are in `styles/friendly-rows.css`. Values follow d9, d10 and d11 CSS.
- A story per component with real art, long names and empty cases; the
catalog test mounts them in its three themes.
- Copy follows `briefs/COPY.md`: the components carry labels and facts, no
sentence that explains a page.
Verification
- bun run test:e2e in the design-system package: 993 passed, every story in
modern dark, modern light and classic light with axe.
- 103 design-system unit tests pass, including the new rows tests.
- eslint, tsc and prettier clean for the touched files.
- Stories rendered and inspected at 1440 and 390 in modern dark and light.
- Extended tier: the package has no 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 decimal Why Review of the rows and cards found two problems: champion cards without a lane line centred their content, so their name, role and win rate sat lower than their neighbours', and a rate with a zero decimal printed as "52%" beside "52.6%". What - Champion cards lay their content out from the top, and the tier pill is pinned to the bottom, so the face, name, role, win rate and game count line up across a grid while the cards stay equal height. - `formatPercent`, the one formatter the win-rate bar, the setup row and the champion card use, always renders one decimal: "52.0%", "65.0%", "100.0%". Fixed labels (the 50% even mark) are thresholds, not rates, and are unchanged. The charts show LP and gold, not rates, so they have no percentages to format. - The win-rate value column is wide enough for "100.0%". - Tests: the formatter at 0, a whole number, a fraction and 100, the bar and its range ends, the setup row (including the pick rate) and the card. Verification - bun run test:e2e in the design-system package: every story in modern dark, modern light and classic light with axe. - Design-system unit tests, eslint, tsc and prettier pass. - Affected stories re-captured at 1440 and 390 in modern dark and light. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
eae31d3 to
f8f4b4a
Compare
|
@codex review Automated re-review request for |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Stacked on #5245 (domain components), #5209 and #5208. Tracker AI-967. The
second half of W0-A4 (charts and page states) is the next PR in the stack; the
whole is about 3,800 lines, so it is split as the brief allows.
Why
The Players, Server, Home, Player, Champion and public champion pages share a
set of rows and cards: a friend with a rank, a game as a plain sentence, a
weekly award, a setup as rows of icons, generated tips and a champion on the
index. They belong in the design system, built on the soft surface primitives
and
friendly.cssvariables, before any page composes them.What
All in
design-system/src/domain/rows/(the flatdomain/directory is at therepository's file budget), exported through the existing
./domain/*map.FriendRow: initial, name, rank, the latest game as a sentence, an optionallive dot and a "You" pill. The default layout is the Players list (crest
first);
placeswitches to the server ladder (place first, crest last).GameSentenceRow: a champion face with its win or loss mark, or a friend'sinitial with a champion badge, then the sentence ("Won as Ahri, 9/2/11,
+21 LP", or "RiverQuartz won as Jinx with you, 10/3/9"), the time and an
optional highlight spark. A friend's name leads the sentence and is cut with
an ellipsis rather than wrapping the row.
Sticker: a weekly award with a face (a person or a champion) and a spark.SetupRow: runes, summoner spells, items and skill order as icon rows withwords, as a set or as a sequence with chevrons, the win rate, the games
behind it and an optional pick rate on the right. Icons come through the
game asset helpers.
TipList: generated tips, one sentence each, led by the ability icons theyare about (a lane icon sits in a disc).
reverseadds the other side's tipsin a closed native
<details>that shows the first tip while closed.ChampionCard: face, name, lane, win rate, games, lane win rate and tier.ChampionFacegains the 72px size it uses.grid's names, roles, win rates and game counts line up and the cards stay
equal height.
formatPercent, the oneformatter the win-rate bar, the setup row and the champion card use. The
50% "even" label is a threshold, not a rate, and the charts in the next PR
show LP and gold, so they have no percentages to format.
styles/friendly-rows.css; values follow d9, d10 and d11 CSS.briefs/COPY.md. The components carry labels and facts("Unranked", "You", "In a game now", "Picked 61%", "Wins lane 53.8%"); none
explains a page. Story data is facts only.
one-row cases.
Demo
New components, so there is no prior state. Rendered from the Storybook build,
modern dark and light, at 1440 and 390.
Review fixes (before and after)
All stories
Verification
bun run test:e2einpackages/scout-for-lol/packages/design-system: 993 passed (after the review fixes), every story in modern dark, modern light and classic light with the page-error, broken-image and axe checks.bun run testin the same package: 106 unit tests pass, includingrows.test.tsx(sentences and LP formatting, latest line, friend, sticker, setup and tip markup, card output, small samples) and the one-decimal rate tests for the formatter, the bar and its range ends, the setup row and the card.launchctl bootstrapwhile other agents were running.🤖 Generated with Claude Code
https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y