Skip to content

Research page: data-driven card grid layout#44

Merged
jmxpearson merged 5 commits into
masterfrom
claude/research-card-grid
May 12, 2026
Merged

Research page: data-driven card grid layout#44
jmxpearson merged 5 commits into
masterfrom
claude/research-card-grid

Conversation

@jmxpearson
Copy link
Copy Markdown
Member

@jmxpearson jmxpearson commented May 12, 2026

Summary

Convert the research page from the long-scroll Markdown layout into a data-driven card grid with summary + "Read more" disclosure, matching the original report's scannability recommendation.

  • Data: _data/research.yml (new) — one entry per project. title, optional image + caption, required summary (one-sentence pitch on the closed card), body (markdown, full description revealed via <details>).
  • Template: research.html (replaces research.md) — Liquid loop, each project is a col-md-6 card with summary visible and body inside an HTML5 <details> element. No JS — native browser disclosure.
  • Styles: css/research.css — flexbox row so card pairs match height; styled <summary> as a subtle "▸ Read more" / "▾ Read less" link; widened inter-card horizontal whitespace from Bootstrap's default 15px gutter to 30px.

Content preserved exactly from the original research.md; summaries paraphrased from the existing prose — please review and edit the summaries to match the lab's voice.

What it looks like

Closed (default): all four projects fit in a single viewport at 1400×900 — image at top of each card, title, one-sentence summary, "▸ Read more" toggle.

Expanded (one card open): clicked card grows to fit the full body description (and any inline <figure>); paired sibling stretches to match height (clean grid alignment, with unused space below the closed sibling); subsequent rows reflow down.

(Screenshots intentionally not committed to the repo — see commit 5314689 for the rationale. If you'd like to see them inline, I can describe what they look like in more detail or you can preview locally with bundle exec jekyll serve.)

Test plan

  • bundle exec jekyll build clean
  • vnu HTML validation → 0 errors
  • scripts/check_image_refs.py → clean
  • All four projects render with correct image/caption/summary/body
  • Closed and one-expanded states verified via Playwright (1400×900)
  • Native <details> semantics: keyboard-accessible, no JS required
  • CI passes
  • Visual spot-check post-merge

Notes

  • Summaries are my paraphrases of the existing prose — they're a starting point, not authoritative. The lab should review/edit before relying on them.
  • The "Efficient coding in the retina" card has no thumbnail (matches original research.md). Easy to add by dropping image: ... into its YAML entry.
  • Adding a fifth project is a single YAML entry — no template edits.
  • Layout tradeoff: when one card in a row is expanded, the sibling stretches to match height (clean grid, but unused space below the closed sibling). Alternative would be uneven row heights. Either way the page total height is the same; I picked stretch for visual consistency.

https://claude.ai/code/session_01S5QXfkxZBNSAf2Y1XAD8H7

claude added 5 commits May 12, 2026 16:54
Convert the long-scroll research.md to a data-driven card grid layout.
Each of the four current projects is a col-md-6 card with thumbnail
image (optional), title, and full description; cards pair side-by-side
on desktop and collapse to one per row on smaller viewports.

Schema in _data/research.yml mirrors the people YAML pattern:
  - title: string
    image: string                (optional thumbnail)
    caption: string              (optional, italic under thumbnail)
    body: string                 (markdown, rendered via markdownify)

The body field accepts inline markdown links and HTML <figure> blocks
for secondary images (used by the real-time-analysis project to embed
its second figure inline). This matches research.md's previous content
exactly — no editorial changes, just structural ones.

Files:
- _data/research.yml (new)
- research.html (new) — data-driven Liquid loop, replaces research.md
- research.md (removed)
- css/research.css (new) — card grid + thumbnail + body figure styles
- docs/screenshots/research-card-grid.png — Playwright capture at
  1400x900 attached so the PR description can render inline
Per the original report's recommendation, switch from full-body cards
to summary-only cards with a "Read more" disclosure that reveals the
full description inline. Closed page now fits all four projects in a
single viewport, which is the original report's scannability goal.

Schema gains a required `summary` field — one-sentence pitch shown on
the closed card. Body goes inside <details> for the inline expand.
Initial summaries extracted from the existing prose; lab should review.

CSS styles the native <details>/<summary> as a subtle link ("▸ Read
more" closed, "▾ Read less" open). align-items: stretch keeps card
rows clean even when one card is expanded (sibling has unused space
below; alternative is uneven row heights — same total page height
either way).

docs/screenshots/ updated with both states (closed + one expanded)
so the PR description can render them inline.
The ::before pseudo-element was rendering "▸ Read more" AND the literal
<summary>Read more</summary> text was rendering, producing
"▸ Read moreRead more" closed and "▾ Read lessRead more" open.

Fix: keep only the arrow indicator in ::before (▸ / ▾, with explicit
margin-right for spacing), and swap the literal label text via two
spans toggled by the details[open] state:
  <summary><span class="show-closed">Read more</span><span class="show-open">Read less</span></summary>

Both labels stay in the DOM for predictable screen reader output;
CSS hides whichever one isn't current.
These were a workaround for not having a way to share images directly
with reviewers from my sandbox — committing them and linking from the
PR description got the images visible inline, but at the cost of
~1 MB of repo growth per screenshotted PR. Same anti-pattern that
issue #34's broken-image hook + #35's orphan cleanup were trying to
prevent.

Going forward: describe changes textually in PR descriptions; if
screenshots are needed, the user can drop them into PR comments via
the GitHub web UI (those go to user-attachments.githubusercontent.com,
never the repo).

Add docs/screenshots/ to .gitignore so accidental future commits get
caught locally rather than at the size-cap hook.
@github-actions
Copy link
Copy Markdown
Contributor

Summary

Status Count
🔍 Total 723
✅ Successful 59
⏳ Timeouts 1
🔀 Redirected 26
👻 Excluded 637
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 0

Errors per input

Errors in _site/learning.html

Full Github Actions output

@jmxpearson jmxpearson merged commit ee00d94 into master May 12, 2026
1 of 2 checks passed
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.

2 participants