Repository navigation
feat(scout-for-lol): add the Recent changes block and its patch-notes accessor - #5411
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
|
780a180 to
590665c
Compare
|
@coderabbitai review Automated re-review request for |
Action not completed
|
|
@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. Hooray! 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". |
… accessor Why The public champion page needs the mockup's Recent changes block. The parsed patch notes had a reader per subject but nothing that groups a champion's lines by patch with a direction per patch and per row. What - data: selectRecentChanges / getRecentChampionChanges return a champion's changes over the newest N patches in the notes, grouped by patch, newest first. A group's direction is the champion's own (buff or nerf only when all its lines agree); every row keeps its own direction, and callers can add item lines to the patches where the champion changed. Unknown champions and empty windows return []. - design-system: domain/recent-changes (RecentChanges) on Panel and the soft surface tokens. Per-row marks appear only when a patch mixes directions. Optional per-patch win rate before and after, an optional renderAbilityLabel slot for later tooltips, and an empty state. - Stories use real entries from patch-changes.generated.json: buffed, nerfed, mixed across rows and within the champion, long names and values, win rates, label slot, empty. Verification - bunx turbo run typecheck test lint --filter=@scout-for-lol/data --filter=@scout-for-lol/design-system: 16 tasks green (data 2078 tests). - Storybook catalog e2e (axe, both skins and modes) for domain-recentchanges: 30 passed. - Rendered and inspected at 1440 and 390 in modern dark and light. - jscpd ratchet and directory-file-counts passed; lefthook pre-commit passed. - Not run: extended tier (no touched workspace step is extended), live checks. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
590665c to
0a74c20
Compare
Why
The public champion page needs the mockup's Recent changes block (
D11-Public). The parsed patch notes could be read per subject, but nothing grouped a champion's lines by patch with a direction for the patch and for each row.What
data/src/data-dragon/patch-changes-recent.ts: pureselectRecentChanges(lines, { championId, patches, itemIds? }), bound to the committed JSON bygetRecentChampionChangesinpatch-changes.ts.[]for an unknown champion or an empty window.directionis the champion's own (overallDirectionof its lines: buff or nerf only when every line agrees, otherwise adjust). Every row keeps its own direction. Item lines never affect the group direction; the caller opts items in withitemIds, and they appear only in patches where the champion has a line, because the notes do not tie an item to a champion.design-system/src/domain/recent-changes.tsx(RecentChanges): built onPaneland the soft-surface tokens, values fromstyles/d11.css.winRates(before and after, with game counts, keyed by patch; renders without it),renderAbilityLabel(slot for later tooltips, no new dependency),allChangesHref,windowPatches(empty state) andnow.RWrecast uses the ultimate's icon), item icon for items, champion portrait for base stats.Domain/RecentChanges) use real entries frompatch-changes.generated.json.Demo
New component, so no before state. Real data from the generated notes, modern dark and light.
Mixed directions (Kayle 26.22: champion buffs beside Doran's Bow nerf and Overlord's Bloodmail buff and nerf), 1440 then 390:
Nerf plus an adjusted patch with base stats and the Mimic recast (LeBlanc), 1440:
Long ability name and values (Qiyana), 390:
Win rate before and after (sample figures; the weekly pipeline is not built), 1440:
Empty state:
Accessor output, Kayle over 10 patches with Doran's Bow and Overlord's Bloodmail: one group,
26.22, directionbuff, rows Radiant Blast (buff), Divine Judgment (buff), Doran's Bow (nerf), Overlord's Bloodmail (buff), Overlord's Bloodmail (nerf).Verification
bunx turbo run typecheck test lint --filter=@scout-for-lol/data --filter=@scout-for-lol/design-system: 16 tasks green (data: 116 files, 2078 tests).bunx turbo run typecheck lint --filter='...[origin/main...HEAD]': 74 tasks green.domain-recentchanges: 30 passed. The first run caught pill contrast under 4.5:1 in two themes; the pill text now mixes toward the text colour.bun run jscpdratchet passed;bun run check-directory-file-countspassed (warning only:design-system/src/domainnow has 22 source files, over the 20 soft limit);bunx lefthook run pre-commitpassed.datanordesign-systemhastier: "extended"steps inci-tests.json, so there is nothing to run. Not run: live checks (component is not used by a page yet).🤖 Generated with Claude Code
https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
bunx turbo run build typecheck test lint --filter=...[origin/main...HEAD],bun run verify:extended(nothing to run),bun run jscpd,bun run check-directory-file-counts) at0a74c20cab; Woodpecker bypassed with Jerred's authorization. On that head the turbo run was 58/75 green: the only failures were 5s load timeouts inhomelabanddatatests that pass when run alone (homelab107/107,data2078/2078 with the package config).bun run jscpdfails on that head with a temporal test clone that also fails on cleanorigin/main, so it is not caused by this PR.