Skip to content

Card flip: screenshot backgrounds + front/back flip card - #5

Closed
ekoslow1-creator wants to merge 61 commits into
mainfrom
worktree-project-card-screenshot-backgrounds
Closed

Card flip: screenshot backgrounds + front/back flip card#5
ekoslow1-creator wants to merge 61 commits into
mainfrom
worktree-project-card-screenshot-backgrounds

Conversation

@ekoslow1-creator

Copy link
Copy Markdown
Collaborator

Summary

  • Replace whole-card link with a front/back flip card (title-only link on front, tags + description on back)
  • Layer project website screenshot backgrounds (with scrim) into ProjectCard
  • Add npm run screenshots to pre-generate project website screenshots into a manifest
  • Accessibility/UX fixes: hide flipped front-face link from keyboard/a11y tree, disable pointer-events on hidden face, prevent flip-away on text selection, hover color on title

Test plan

  • npm run dev and confirm cards flip on click/hover as expected
  • Verify keyboard navigation doesn't focus the hidden front-face link when flipped
  • Verify text selection on the card doesn't trigger a flip
  • npm test

saengel and others added 30 commits June 30, 2026 09:01
Documents the component architecture, live API integration
(sefaria.org/api/powered-by), and the project_category data-quality
handling agreed on during brainstorming.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The API's project_category field decomposes against 5 real form
labels (one legacy naming variant) plus freeform "Other:" text -
not the 6 categories shown on developers.sefaria.org as originally
assumed. Verified by decomposing all 36 live entries with zero
unmatched leftovers.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sefaria Intern and others added 23 commits July 28, 2026 11:19
…r bucketing

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…pty experience trend

- getToolUsageCounts now filters sefaria_tools_used to string entries before
  normalizing, so a non-string entry (null, number, etc.) in this free-text
  user-submitted field is skipped instead of throwing and blanking out all
  four Charts & Analytics charts via the outer catch handler.
- Move the experienceTrend.length === 0 empty-state message inline (matching
  the pie chart's own conditional-render guard) instead of an early return,
  so the two bar charts and the pie chart still render when there's no
  experience-level data.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Shares VIBE_CODED_SERIES between submissionsTrend.js and
ChartsAndAnalytics.jsx (mirroring the EXPERIENCE_LEVELS precedent)
instead of hardcoding the strings twice, and adds a one-sentence
caption noting vibe_coded is a newly-tracked field so the chart isn't
misread as a real overnight trend reversal.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Extracts known technology names from the free-text tech_used_raw field
via case-insensitive substring matching, with "Claude Code" checked and
excluded first so it doesn't double-count toward the generic
Claude/Anthropic API bucket. Shows the top 8 by project count as a
horizontal bar chart, matching the existing keyword-frequency chart's style.
Reuses the fixed-order categorical hue palette already used in the
charts (blue/orange/aqua/violet/magenta, gray for Uncategorized).
Background and border are computed via color-mix() at low strength
so each pill stays pale; text is mixed toward --text-h for a muted
look instead of a fully saturated hue.
…chart

Recharts' category axis auto-hides tick labels it calculates would
overlap; interval={0} disables that, and the wider axis column gives
longer labels like "Claude/Anthropic API" room to fit.
…, screenshot URL validation)

- screenshots.test.js: update the positive-case test to expect the real
  manifest path now that screenshotManifest.json is populated, and add a
  case covering the numeric id form used by ProjectCard.jsx
- index.css: give has-screenshot cards their own hover background on the
  scrim pseudo-element so hovering isn't washed out by the 88%-opacity
  overlay
- generate-screenshots.mjs: validate project_link before navigating to it,
  rejecting non-http(s) schemes and localhost/private/link-local hosts to
  close an SSRF/file-read path from unauthenticated submissions
The flip-card's hidden face was still hit-testable in the region behind
the visible face's centered content (backface-visibility only affects
painting, not pointer events), so clicking the center of a flipped-back
card could trigger the hidden front title's link instead of unflipping.
Scope pointer-events to whichever face is currently visible.

Also add a hover color (var(--accent)) on the project title link, per
request, as a visual affordance that it's clickable.
…ip-away on text selection, remove stale CSS

- Add visibility: hidden alongside pointer-events: none on the flipped
  front face so the title link is removed from the tab order and
  accessibility tree while visually hidden.
- Guard the card's click-to-flip handler against active text selections
  so releasing a text-selection drag inside the back-face description
  no longer flips the card away.
- Remove stale position: relative on .project-card (no longer needed
  now that faces position against .project-card-inner).
- Update stale comment on .project-card-desc to reflect the back-face
  layout (no image/title/link on that face anymore).
@gitvelocity-reviewer

Copy link
Copy Markdown

📊 Code Quality Score: 59/100

59 × 1.0 (Extra Large ESF, 807 effective lines, 17 files) = 59

Category Score Factors
🔭 Scope 14/20 10+ files across components, utilities, scripts, CSS, data; new Puppeteer devDependency; new public-facing UI behavior (flip cards, 3 new charts); new screenshot pipeline; CSV data file with 134 entries
🏗️ Architecture 10/20 New screenshot pipeline pattern with manifest-driven asset serving; flip-card UI pattern; no new service boundaries or external service integrations; follows existing utility module pattern
⚙️ Implementation 13/20 Puppeteer concurrency pool with closure-based index; endpoint normalization with longest-match-first pre-sort; CSS 3D transforms with backface-visibility and pointer-events management; color-mix() theming; recharts 3.x animation workaround; Claude Code vs Claude API disambiguation in tech parsing
⚠️ Risk 8/20 Binary JPEG files committed to git (repo bloat over time); SSRF surface in screenshot script (missing 172.16-31.x.x range); color-mix() browser compatibility gap; no feature flags but all changes are additive; no rollback complexity
✅ Quality 11/15 Strong utility test coverage (sefariaTools: 10 tests, techUsed: 6 tests, categories: 3 tests, screenshots: 3 tests, submissionsTrend: 3 new tests); no tests for UI components or Puppeteer script; good inline comments explaining recharts workaround and CSS coordinate math
🔒 Perf / Security 3/5 isSafeUrl SSRF guard present but incomplete (missing 172.16-31.x.x); JPEG quality 60 for size optimization; concurrency limit of 3 to avoid overwhelming target servers

Was this score accurate? 👍 Yes · 👎 No

How this was scored →

Scored by GitVelocity · How are scores calculated?

@saengel
saengel changed the base branch from main to feature/sc-46083/create-3-5-charts August 4, 2026 10:22
@saengel
saengel changed the base branch from feature/sc-46083/create-3-5-charts to main August 4, 2026 10:22

@saengel saengel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes here as well, mostly that we need to take the screenshots out.

Please note the critical issue around the data that was committed, and remove while wiping history as well.

Comment thread data/powered-by-projects-complete.csv Outdated
@@ -0,0 +1,295 @@
id,submission_date,created_at,updated_at,submission_source,sefaria_tools_used,tech_used_raw,technical_experience,vibe_coded,project_why,project_name,project_link,project_source_code,project_reach,project_desc,project_category,image_url,has_pbs_logo,tags,status,is_buggy,last_checked,consent_to_display,is_published,featured

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be deleted, and the history wiped when you push. See this comment.

Comment thread public/screenshots/1.jpg

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of committing the screenshots to the repository, we should upload them to google cloud storage and include links in the data we're migrating to the DB. Will create a card for this, for now - please remove these screenshots from the PR and code.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming this is irrelevant once we take the screenshots out, please confirm and if so - remove this file.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can keep this script for now, it may need to live elsewhere (like our forthcoming automation - i.e. upon project submission we run a script to collect a screenshot) but for now let's keep it in and only delete the actual screenshots themselves.

Comment thread src/utils/screenshots.js

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also get rid of this

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also get rid of this

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put the test files in a separate test subdirectory

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what's going on here, can you reply with an explanation of the logic and why it is needed?

Comment thread README.md

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great practice updating the README!

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