Skip to content

Rebuild /display left rail for editor-completion Phase 1 fidelity - #318

Closed
WilfordGrimley wants to merge 2 commits into
masterfrom
editor-completion-phase1-left-rail
Closed

Rebuild /display left rail for editor-completion Phase 1 fidelity#318
WilfordGrimley wants to merge 2 commits into
masterfrom
editor-completion-phase1-left-rail

Conversation

@WilfordGrimley

Copy link
Copy Markdown

Summary

Phase 1 of the owner-approved editor-completion package (authority: the editor-completion spec + mockup scoped in #244) — the left-panel fidelity rebuild on /display. Visual foundation only; no interactions.

  • E1–E6: filters collapsed by default (additive initialSettingsVisible on useGridSelectorSearch), full-width stacked disclosure (additive layout="stacked" on SelectVersionResults, additive hiddenSections on GridSelectorFilters), Group-by/Facet removed from the rail, card-display-style toggle removed (compressed hard-pinned true), artist line + a confidence-element placeholder promoted always-visible above the fold.
  • §7.5: CardDetailedViewModal's body extracted into CardDetailedViewBody.tsx (behavior-preserving, region-level sub-blocks: identifier copy, meta table, download/favorite, printing tags, report). The rail's demoted Card Details/Printing Tags/Report sections reuse the same sub-blocks, lazy-mounted so opening a slot doesn't fire their backend fetches until the section is actually expanded.
  • E18/E20: dark (never-white) empty/loading/failed sheet slot states — grey-pinline background on both the slot div and its <img> (kills the white pre-paint flash), an animated loading bar, and a failed state with a muted ✗ plus a deterministic Scryfall "Find this card ↗" link (zero-crawl: URL constructed from the query, never fetched).
  • E19: lime rounded corner-only cut guides on screen. Confirmed upstream (upstream/master's PDF.tsx) already has the corner-only geometry (CutLineCorner, cutLineShape: "InsideOnly") — built the screen-side guide on that existing shape rather than reinventing it. True PDF-side color/preset parity is not shipped in this PR (see Deviations).

All shared-component changes are additive-optional props; existing callers (GridSelectorModal) are unaffected.

Deviations from spec

  1. Confidence element (ConfidenceElement.tsx) is the narrower placeholder the task explicitly scoped: no live vote dispatch, no Scryfall hover popover, and the "not this printing" button only renders for a suggested printing — the mockup also shows it for the confirmed state, which this PR does not replicate. D14 is flagged in the spec as needing further definition; this is a deliberate stopping point, not an oversight.
  2. E19 PDF-side parity deferred: the screen preview's lime corner guides ship; the actual exported PDF's cut-line color/preset is not changed in this PR (out of this task's screen-only cut; upstream's shape machinery is confirmed reusable when that's picked up).
  3. FilterChipBar relocated, not deleted: the spec's literal wording ("chip wall folded away... removed from this surface") was read as "folded into the Filters disclosure" rather than deleted outright, since it's real, tested functionality (art-as-filter, "More like this"). It now lives inside the (collapsed-by-default) Filters section instead of always-visible.
  4. Lazy-mounted demoted sections: Card Details/Printing Tags/Report only fetch their backend data once their accordion section is actually expanded, rather than on every slot selection — an addition beyond the literal spec, to avoid new unconditional backend traffic per click.
  5. Two pre-existing Playwright flakes (unrelated to this change, confirmed via A/B testing against unmodified origin/master) remain: a phone-viewport dialog-count race and the D17 sheet-position-pill race under scroll timing. The latter is documented in docs/troubleshooting.md.

Test plan

  • npx tsc --noEmit clean
  • npx prettier@2.7.1 --check clean on all changed files
  • npx eslint --fix applied, next lint clean
  • CardDetailedViewModal.visual.spec.ts passes unmodified — the extraction's acceptance proof
  • DisplayPage.spec.ts updated for the new rail structure (selectors moved, none loosened), passes except the pre-existing D17 flake noted above
  • SelectVersionSection.spec.ts updated (Filters now needs opening for the two filter-chip tests), passes
  • New DisplaySlotStates.spec.ts (4 tests) — asserts computed background-color is never white across filled/loading/failed/empty-select-version states, plus the Scryfall link's presence; passes
  • Live-browser screenshot comparison against the mockup at 1400px (dark rail theme, promoted header/artist/confidence zone, always-open Select Version, demoted accordion order) — visual match confirmed, temp comparison specs not committed
  • docs/features/grid-selector.md updated in place for the rename/promotion; docs/troubleshooting.md gained the D17 flake entry

Extractable-primitives ledger: checked — CardDetailedViewBody's sub-blocks (PrintingTagsBlock, ReportBlock) remain entangled with the tag-vote/consensus system, so this extraction does not produce a clean new ledger row. No ledger change made.

Wiki checklist (merge-time)

  • wiki: /display (Editor) page needs a note that the left rail now opens with Select Version expanded and Filters collapsed, with Card Details/Printing Tags/Report moved into a demoted, lazy-loading accordion below it.

Do not merge — awaiting owner review, per this task's explicit instruction (Phase 1 of a multi-phase package; interactions/context-menu/drag/multi-select/undo are Phase 2 and intentionally not built here).

Closes nothing (umbrella tracking against the editor-completion spec, not a single issue).

Filters collapsed by default, Select Version promoted/always-open with
stacked full-width disclosure, artist + confidence line promoted above
the fold, Card Details/Printing Tags/Report demoted to lazy-mounted
accordion sections, and dark (never-white) empty/loading/failed slot
states with a deterministic Scryfall "Find this card" link.

CardDetailedViewModal body extracted into CardDetailedViewBody so the
rail's demoted sections and the /editor modal share one implementation;
modal visual spec passes unmodified as the extraction's proof.

No interactions (context menu/drag/multi-select/undo) - Phase 2.
…hase1-left-rail

# Conflicts:
#	docs/troubleshooting.md
@WilfordGrimley

Copy link
Copy Markdown
Author

Superseded by #319 (merged): identical content recut onto post-#317 master after this branch's merge state became unresolvable. Branch left in place per the no-delete-on-close convention; cleanup pass later.

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