Skip to content

[Backport] Fix thumbnail dashboard card#3850

Open
joaoantoniocardoso wants to merge 2 commits intobluerobotics:1.4from
joaoantoniocardoso:backports/1.4/fix-thumbnail-dashboard-redirect
Open

[Backport] Fix thumbnail dashboard card#3850
joaoantoniocardoso wants to merge 2 commits intobluerobotics:1.4from
joaoantoniocardoso:backports/1.4/fix-thumbnail-dashboard-redirect

Conversation

@joaoantoniocardoso
Copy link
Member

@joaoantoniocardoso joaoantoniocardoso commented Mar 24, 2026

Summary

  • Backport of Fix thumbnail dashboard card #3849 into 1.4
  • Stop click propagation on VideoThumbnail controls so buttons don't trigger parent navigation
  • Constrain thumbnail frame height and use object-fit: contain so the full image fits within its parent

Test plan

  • Verify camera thumbnail play/camera buttons work without navigating away
  • Verify thumbnail image is fully contained within its parent card

Summary by Sourcery

Backport video thumbnail interaction and layout improvements to the 1.4 branch.

Bug Fixes:

  • Prevent video thumbnail control clicks from triggering parent navigation actions.

Enhancements:

  • Ensure video thumbnails are fully visible within their container by constraining frame height and using contained object-fit behavior.

…gation on controls

Prevents the play/camera buttons from triggering navigation to the
Video Manager page when the thumbnail is embedded in the dashboard.

Closes bluerobotics#3848
…thin parent

Constrain the thumbnail frame height to its parent and use object-fit
contain so the full image is visible without overflow or cropping.
@sourcery-ai
Copy link

sourcery-ai bot commented Mar 24, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Backports video thumbnail interaction and layout improvements to 1.4 by preventing thumbnail control clicks from bubbling to parent navigation and adjusting thumbnail image sizing to fully fit within its card.

Sequence diagram for updated video thumbnail click handling

sequenceDiagram
  actor User
  participant ParentCard as ParentCardRouterLink
  participant VideoThumbnail
  participant ThumbnailControls
  participant Router

  User->>ParentCard: click on card area
  ParentCard->>Router: navigate to video detail

  User->>ThumbnailControls: click play or camera button
  ThumbnailControls->>ThumbnailControls: @click.stop.prevent
  ThumbnailControls-->>VideoThumbnail: emit play_or_camera_event
  VideoThumbnail-->>Router: no navigation triggered
  VideoThumbnail-->>User: video or camera action executed without leaving page
Loading

File-Level Changes

Change Details Files
Adjust thumbnail image styling so the entire image fits within its parent card.
  • Change image CSS inline style from object-fit: cover to object-fit: contain while keeping full width and height.
  • Constrain the thumbnail frame with max-height: 100% to prevent the image area from exceeding its container.
core/frontend/src/components/video-manager/VideoThumbnail.vue
Prevent clicks on video thumbnail controls from triggering parent navigation handlers.
  • Add @click.stop.prevent to the thumbnail controls container to stop event propagation and prevent default navigation when interacting with control buttons.
core/frontend/src/components/video-manager/VideoThumbnail.vue

Possibly linked issues

  • #(not specified): PR prevents play/control clicks from navigating away, matching issue’s request to keep interaction in dashboard.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@joaoantoniocardoso joaoantoniocardoso marked this pull request as ready for review March 24, 2026 16:06
Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • Consider moving the inline style="width: 100%; height: 100%; object-fit: contain;" on the <img> into a CSS class so that thumbnail layout behavior is centralized and easier to maintain.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider moving the inline `style="width: 100%; height: 100%; object-fit: contain;"` on the `<img>` into a CSS class so that thumbnail layout behavior is centralized and easier to maintain.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@joaoantoniocardoso joaoantoniocardoso changed the title Backport of #3849 into 1.4 [Backport] Fix thumbnail dashboard card Mar 24, 2026
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