Skip to content

feat: Click to zoom game cover image#3093

Merged
gantoine merged 5 commits intomasterfrom
copilot/add-click-to-zoom-feature
Mar 9, 2026
Merged

feat: Click to zoom game cover image#3093
gantoine merged 5 commits intomasterfrom
copilot/add-click-to-zoom-feature

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 9, 2026

  • Revert Game.vue (console TV view) - click-to-zoom was added to wrong location
  • Add showCoverZoom ref to Base.vue (common game card component)
  • Add magnify icon button visible on hover (top-right corner of card)
  • Only show zoom button when pointerOnHover is false (non-clickable covers)
  • Button click opens RDialog with full-size cover image
  • @click.stop prevents card navigation from triggering when zoom button is clicked
Original prompt

This section details on the original issue you should resolve

<issue_title>[Feature] Click to Zoom Game Cover</issue_title>
<issue_description>Describe the solution you'd like
When a user clicks the game cover, pop up a zoomed version, just like the behavior with Screenshots.
</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add click to zoom functionality for game cover feat: Click to zoom game cover image Mar 9, 2026
@gantoine
Copy link
Copy Markdown
Member

gantoine commented Mar 9, 2026

@copilot the hover icon should only show when pointerOnHover is false, ie you're on a non-clickable cover art

@gantoine gantoine marked this pull request as ready for review March 9, 2026 02:57
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Mar 9, 2026

@copilot the hover icon should only show when pointerOnHover is false, ie you're on a non-clickable cover art

Done in 89c482c — the zoom button now only renders when !pointerOnHover, so it won't appear on gallery cards that navigate on click.

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Mar 9, 2026

Greptile Summary

This PR adds a "click to zoom" feature to the common game card component (Base.vue). When hovering over a non-clickable game card (pointerOnHover is false), a magnify icon appears in the top-right corner of the cover image. Clicking it opens an RDialog showing the full-size cover. The @click.stop modifier prevents card navigation from also firing.

Key changes:

  • Imports RDialog and adds a showCoverZoom reactive ref in Base.vue
  • Adds a v-fade-transition-wrapped v-btn (magnify icon) conditionally shown on hover when the card is not navigable
  • Places the r-dialog as a sibling to the v-hover block, rendering the large cover image with a loading placeholder
  • Adds .cover-zoom-btn CSS class for absolute positioning (top-right, z-index 1)

Two issues were flagged:

  • The zoom button only stops click propagation but not touchstart/touchend, which may cause card-level touch handlers to fire unintentionally on mobile when tapping the zoom button
  • rom.name can be null for unidentified ROMs, resulting in a blank dialog title; a fallback similar to the rest of the card (e.g. fs_name_no_tags) should be used

Confidence Score: 4/5

  • This PR is safe to merge with minor issues — the feature is well-scoped and follows existing patterns, with two small fixes recommended before shipping to mobile users.
  • The implementation is clean, follows existing component conventions, and correctly uses @click.stop to prevent accidental navigation. The two issues found (touch event propagation on mobile and a potentially empty dialog title for unidentified ROMs) are low-severity and do not break desktop functionality.
  • frontend/src/components/common/Game/Card/Base.vue — review the zoom button's touch event handling and the dialog header fallback for null rom.name

Important Files Changed

Filename Overview
frontend/src/components/common/Game/Card/Base.vue Adds a hover-activated magnify button (top-right corner) and a zoom dialog for non-clickable game covers. Core logic is sound; touch event propagation to the underlying v-img is not suppressed on the new button, and the dialog header can show a blank title for unidentified ROMs.

Sequence Diagram

sequenceDiagram
    actor User
    participant Card as Base.vue (v-img)
    participant ZoomBtn as Zoom Button (v-btn)
    participant Dialog as RDialog (showCoverZoom)

    User->>Card: Hover over card
    activate Card
    Card-->>ZoomBtn: isOuterHovering && !pointerOnHover → show button
    deactivate Card

    User->>ZoomBtn: Click zoom button
    ZoomBtn->>ZoomBtn: @click.stop (prevents card click)
    ZoomBtn->>Dialog: showCoverZoom = true

    activate Dialog
    Dialog-->>User: Display full-size cover image
    User->>Dialog: Click outside / press ESC
    Dialog->>Dialog: closeDialog() → showCoverZoom = false
    deactivate Dialog
Loading

Last reviewed commit: 89c482c

@gantoine gantoine merged commit 115fad8 into master Mar 9, 2026
8 checks passed
@gantoine gantoine deleted the copilot/add-click-to-zoom-feature branch March 9, 2026 03:03
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.

[Feature] Click to Zoom Game Cover

2 participants