v0.9 Phase 5: CollectibleRow + ItemExpandPanel restyle#70
Conversation
Rebuilds the collectible row and inline expand panel to match the v0.9 Curator design (monogram glyph, meta line with separators, leaving/new pills, two-column expand with month grid + stats stack). Wires data-row-id and a highlightId pulse for the upcoming Phase 6/8 jump-to. Per-row donate toggle moves into the expand panel (matches the spec). MonthGrid re-skinned to .ac-monthgrid; category list wraps in .ac-list. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@codex[agent] Could you review this PR? |
Checked |
|
To use Codex here, create a Codex account and connect to github. |
There was a problem hiding this comment.
Pull request overview
Implements v0.9 Phase 5 UI restyle for the category item list: rebuilds CollectibleRow and the inline ItemExpandPanel to match the Curator design, updates MonthGrid styling/current-month highlighting, and introduces data-row-id + highlight/scroll scaffolding in ACCanvas for future jump-to flows.
Changes:
- Rebuilds
CollectibleRowmarkup (glyph/metadata/pills/chevron) and appends a new Phase 5 CSS block for rows, pills, expand panel, and month grid. - Re-skins
MonthGridto CSS-driven.ac-monthgrid/.ac-monthcellwith optional current-month ring. - Refactors
ItemExpandPanelinto a two-column stats + availability layout; addshighlightIdeffect inACCanvasfor scroll/pulse.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/index.css | Adds Phase 5 styles for rows, pills, expand panel, and month grid (but missing .ac-list/.ac-expand-section rules). |
| src/components/shared/MonthGrid.tsx | Switches from Tailwind/inline styles to .ac-monthgrid/.ac-monthcell and adds current support. |
| src/components/ItemExpandPanel.tsx | Rebuilds panel layout and stats rendering; now uses MonthGrid current-month highlighting. |
| src/components/CollectibleRow.tsx | Rebuilds row UI with glyph initials, meta bits, month pills, and data-row-id stamp for jump-to. |
| src/components/ACCanvas.tsx | Wraps rows in .ac-list, adds highlightId state/effect, and threads highlighting/currentMonth into rows/panels. |
| CHANGELOG.md | Documents Phase 5 additions/decisions (currently references CSS selectors not actually present). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <div className="ac-row-name"> | ||
| <span>{name}</span> | ||
| {checked && ( | ||
| <span className="ac-row-checkmark" aria-label="donated"> |
| const notes = itemNotes(item, category); | ||
| const cm = currentMonth ?? new Date().getMonth() + 1; | ||
| const shadow = isSeaCreature(item) ? item.shadow : undefined; | ||
| const time = isSeaCreature(item) ? item.time : undefined; |
A bare <span> with aria-label is ignored by screen readers. Adding role="img" lets the implicit name surface for assistive tech. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ItemExpandPanel already renders sea-creature time in its own 'active hours' stat. Returning it from itemNotes caused the same string to appear twice in the row. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…e expand panel - Add the missing .ac-list rule referenced by ACCanvas (single rounded surface; rows still divided by .ac-row border-bottom). - Add :focus-visible outline on .ac-row-main so keyboard users see focus. - Remove .ac-expand border-top — .ac-row already draws the seam, the pair was rendering as a 2px line. - When months are absent (fossils, art), collapse .ac-expand to a single column instead of leaving the side panel orphaned beside an empty 240px slot. - Add a minimal .ac-expand-section rule so the wrapper has a defined min-width inside the grid. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Addressed Copilot review comments 1, 2, 3, 5, 6, 8, 9 in commits b75b1f1, 52870f7, 9fc865c. Skipped #4 (nitpick) and #7 (resolved by #8 fix — visual check passes).
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| function metaBits( | ||
| item: AnyItem, | ||
| category: CategoryId, |
| const time = isSeaCreature(item) ? item.time : undefined; | ||
|
|
| /** Kept for back-compat with callers; toggling now happens from inside the expand panel. */ | ||
| onToggle?: () => void; |
| const shadow = isSeaCreature(item) ? item.shadow : undefined; | ||
| const time = isSeaCreature(item) ? item.time : undefined; |
| ): string | undefined { | ||
| if (category === 'sea_creatures' || isSeaCreature(item)) | ||
| return (item as SeaCreature).time; | ||
| if (category === 'sea_creatures' || isSeaCreature(item)) return undefined; |
…prop Round 1 made itemNotes() return undefined for sea creatures, which broke DetailModal's notes block (it calls itemNotes(item) for the global-search detail view). Restore itemNotes' "give me the notes string for this item" contract — return time for sea creatures — and push the duplicate-render suppression into ItemExpandPanel where the duplicate actually exists (time is already rendered as the "active hours" stat). Also drop the dead onToggle prop from CollectibleRow and the GlobalSearchResults passthrough. Bea confirmed "click into modal is fine for now" — no inline donation toggle from global search. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Round 2 addressed:
Skipped:
|
Implements Phase 5 of the v0.9.0-beta plan (
docs/v0.9-plan.md§ Phase 5) — restyles the collectible row and inline expand panel to the Curator design and wires thedata-row-id+ highlight pulse used by Phase 6/8 jump-to.What changed
CollectibleRowrebuilt to the v0.9 design:●accent checkmark + line-through name with--border-strongdecoration.·separators: habitat (fish), part (fossils), shadow (sea), italicbasedOn(art), tabular bells✦.data-row-id={item.id}on outer div; acceptshighlighted,currentMonth,hemisphereprops; adds.ac-row-pulsewhen highlighted.ItemExpandPanelrebuilt as two-column grid (1fr 240px, padded so left column aligns with row text after the glyph). Left: 12-cellMonthGridwith current-month inset ring. Right: bells / shadow / active-hours / notes / donate button. Donate now lives only in the panel.MonthGridre-skinned to.ac-monthgrid/.ac-monthcellwith current-month support.ACCanvasownshighlightIdstate plus an effect that, on change, expands the matching row, runsscrollIntoView({ behavior: 'smooth', block: 'center' })on the next frame, then clears state after the 1.4s pulse so re-jumping retriggers. Phase 6/8 callers will wire to the setter.src/index.css(.ac-row*,.ac-glyph,.ac-pill*,.ac-expand*,.ac-monthgrid/.ac-monthcell+ states,.ac-stat*,.ac-note,.ac-donate-btn*,@keyframes ac-row-pulse, 980px collapse)..ac-listrounded card with internal dividers (replaces the free-floating bordered rows +space-y-3).Decisions
highlightIdlives inACCanvas, notApp. Plan/spec says "App owns highlightId," but every Phase 5 caller (HomeTab in Phase 6, GlobalSearchDropdown in Phase 8, the category list itself) is rendered insideACCanvas, so keeping the state local toACCanvasis simpler. Promoting later is cheap if a caller ever lives above the router outlet.onToggleprop is kept (optional) for back-compat withGlobalSearchResults, which Phase 8 replaces.Fish/BugItemtypes usehours: number[], not a formattedtime: string. Wiring fish/bug active-hours rendering needs a formatter — out of scope for Phase 5; revisit in v0.9.x alongsidehoursrendering.Fishhas noshadowfield. Issue Shadow size not displayed in any UI (fish + sea creatures) #59 partially addressed for sea creatures via the new stats stack; stays open for fish-specific data work.Phase 4 follow-ups noticed (not fixed here)
GlobalSearchResultsstill uses the old per-row donate toggle pattern via theonToggleprop. Left intact since Phase 8 replaces this component wholesale.Test plan
npm run build— ✅ passes (tsc + Vite build clean).npm test— ✅ 59/59 passing.npm run lint— ✅ clean (auto-fix applied a Prettier wrap).🤖 Generated with Claude Code