Skip to content

fix(v2): render match-rom covers at full width in Safari - #3763

Merged
gantoine merged 1 commit into
masterfrom
posthog-code/fix-safari-match-rom-sliver
Jul 16, 2026
Merged

fix(v2): render match-rom covers at full width in Safari#3763
gantoine merged 1 commit into
masterfrom
posthog-code/fix-safari-match-rom-sliver

Conversation

@gantoine

Copy link
Copy Markdown
Member

Description
Explain the changes or enhancements you are proposing with this pull request.

Fixes the manual "Match ROM" dialog rendering result covers as thin vertical slivers in Safari (fine in Chromium).

Root cause

The v2 GameCard derives a non-hero card's width from a fixed height via CSS aspect-ratio (.r-gc { width: auto }.r-gc__art { height: fixed; width: auto }.game-cover { aspect-ratio }).

  • In the gallery, GameCard is a direct flex child of its row, so WebKit resolves the width through flex intrinsic sizing (correct).
  • In MatchRomBodyGrid.vue, each card was wrapped in an extra block-level .match-grid__card-cell (flex: 0 0 auto). There the card's width: auto resolved against a shrink-to-fit containing block whose width depended on the card. WebKit collapses that circular case to a near-zero width, producing the slivers. Chromium resolves it via intrinsic sizing.

Fix

Give .match-grid__card-cell display: flex so its GameCard becomes a flex item and sizes via the same intrinsic-sizing path the gallery already uses. The existing max-width: 100% caps on the card and art box are untouched, so wide-cover scaling is unchanged.

AI assistance disclosure

This change was authored with AI assistance (PostHog Code): diagnosis and the CSS fix. Reviewed by the PR author.

Checklist
Please check all that apply.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

Screenshots (if applicable)

Note: npm run typecheck and trunk fmt/trunk check pass. Visual confirmation in Safari (both themes) still recommended before merge; a CSS-only sliver-repro isn't covered by unit tests.


Created with PostHog Code

The manual "Match ROM" dialog wrapped each GameCard in a block-level
cell, so the card's aspect-ratio-derived width resolved against a
shrink-to-fit containing block. WebKit collapses that circular case to a
near-zero width, rendering covers as thin slivers (Chromium is fine).

Lay the cell out as a flex container so the card sizes via flex intrinsic
sizing, the same path the gallery row already uses.

Fixes #3761

Generated-By: PostHog Code
Task-Id: 85199a96-11de-4403-a30e-e533cf9a8e48
Copilot AI review requested due to automatic review settings July 16, 2026 11:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@greptile-apps

greptile-apps Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes Match ROM cover sizing in Safari. The main change is:

  • Makes each result-card wrapper a flex container so cover width resolves through flex intrinsic sizing.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
frontend/src/v2/components/MatchRom/MatchRomBodyGrid.vue Adds display: flex to the card-cell wrapper while preserving existing shrinking and width constraints.

Reviews (1): Last reviewed commit: "fix(v2): render match-rom covers at full..." | Re-trigger Greptile

@gantoine
gantoine merged commit 030952b into master Jul 16, 2026
12 checks passed
@gantoine
gantoine deleted the posthog-code/fix-safari-match-rom-sliver branch July 16, 2026 12:09
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