Skip to content

fix: match the frame details spacing and background to the image details - #3734

Open
LeonardoRosaa wants to merge 3 commits into
mainfrom
fix-frame-details-wrapper
Open

LeonardoRosaa wants to merge 3 commits into
mainfrom
fix-frame-details-wrapper

Conversation

@LeonardoRosaa

@LeonardoRosaa LeonardoRosaa commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

What has changed and why?

  • The video frame details page had no card background and no padding. The image and annotation details pages have both.
  • A new shared SampleDetailsPageContainer gives the image, annotation and frame details pages the same background and padding.
  • The "Number" label in the frame sidebar showed the tooltip "Width". It now shows "Number".

How has it been tested?

  • Added a unit test for SampleDetailsPageContainer.
  • Opened the image, annotation and frame details pages in the GUI and compared them.
Frame details, before Frame details, after
Frame details, before Frame details, after
No padding and a black background. Same padding and card background as image details.
Image details, before Image details, after
Image details, before Image details, after
Reference. Unchanged.

Did you update CHANGELOG.md?

  • Yes
  • Not needed (internal change)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Video frame details pages now match image details pages in spacing and background, providing a more consistent viewing experience.
    • Frame number tooltips now correctly identify the displayed value as “Number.”
    • Annotation, image, and video frame details now use consistent page-container styling.

Frame details had no card background and no padding. A shared
SampleDetailsPageContainer now wraps the image, annotation and frame
details pages. The frame Number label also gets the correct tooltip.
@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

A shared container now wraps annotation, frame, and non-group image details. The frame-number tooltip title changes to “Number,” and the changelog records the frame details page’s spacing and background update.

Changes: Sample details layout

Layer / File(s) Summary
Shared details container
lightly_studio_view/src/lib/components/SampleDetails/SampleDetailsPageContainer/SampleDetailsPageContainer.svelte, lightly_studio_view/src/lib/components/index.ts, lightly_studio_view/src/lib/components/SampleDetails/SampleDetailsPageContainer/SampleDetailsPageContainer.test.ts
A new container renders its child snippet inside a full-size, card-colored container and forwards div attributes. The component barrel exports it, and a test checks forwarded attributes and child content.
Detail page integration
lightly_studio_view/src/routes/.../annotations/[annotationId]/+page.svelte, lightly_studio_view/src/routes/.../frames/[sample_id]/+page.svelte, lightly_studio_view/src/routes/.../images/[sampleId]/+page.svelte, lightly_studio_view/src/lib/components/frames/FrameDetailsSegment/FrameDetailsSegment.svelte, CHANGELOG.md
Annotation, frame, and non-group image detail content uses the shared container. The frame-number tooltip title changes from “Width” to “Number.” The changelog records the frame details page spacing and background update.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: michal-lightly, iunir, gabrielfruet

Merge Risk: Minimal · up to 14cd4

This change makes the frame details page match the image details page in spacing and background, and fixes one tooltip title. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the primary change: the frame details page is aligned with the image details page in spacing and background. It matches the changeset, which adds a shared SampleDetailsPageContainer an…
Description check Passed The description follows the template. It has a 'What has changed and why?' section that explains the missing background and padding, the new shared container, and the tooltip fix. The 'How has it been…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the primary change: the frame details page is aligned with the image details page in spacing and background. It matches the changeset, which adds a shared SampleDetailsPageContainer and applies it to the image, annotation, and frame pages. The title is specific and concise, and it does not cover the minor tooltip fix, which is acceptable.

Full details: Description check

Explanation

The description follows the template. It has a 'What has changed and why?' section that explains the missing background and padding, the new shared container, and the tooltip fix. The 'How has it been tested?' section lists a unit test, a manual GUI comparison, and before-and-after screenshots. The CHANGELOG checkbox is marked Yes, and the summary confirms that CHANGELOG.md was updated. The description is complete and specific.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between bc5afcd and 14cd44b.

Files selected for processing: 3

  • CHANGELOG.md
  • lightly_studio_view/src/lib/components/SampleDetails/SampleDetailsPageContainer/SampleDetailsPageContainer.svelte
  • lightly_studio_view/src/lib/components/SampleDetails/SampleDetailsPageContainer/SampleDetailsPageContainer.test.ts
Files skipped from review as they are similar to previous changes: 1

  • CHANGELOG.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

@LeonardoRosaa
LeonardoRosaa marked this pull request as ready for review December 3, 2026 11:46
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-03T11:47:40.337481Z bc5afcd Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

All reported issues were addressed across 8 files

Tip: cubic used a learning from your PR history. Let your coding agent read cubic learnings directly with the cubic MCP.

View guided diff | Turn on auto-fix | Re-trigger cubic

@lightly-fast-track-bot

lightly-fast-track-bot Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

❌  Fast Track: checks did not pass

Guardrail Result Message
frontend/complexity ✅ 7 file(s) checked, no violations.
diff-size ✅ PR adds 76 non-test line(s) (limit: 215).
frontend/coverage ❌ 6 file(s) checked at 90%.
[PASS] lightly_studio_view/src/lib/components/SampleDetails/SampleDetailsPageContainer/SampleDetailsPageContainer.svelte: 100.0%
[FAIL] lightly_studio_view/src/lib/components/frames/FrameDetailsSegment/FrameDetailsSegment.svelte: not found in coverage report
[PASS] lightly_studio_view/src/lib/components/index.ts: no executable added lines
[FAIL] lightly_studio_view/src/routes/datasets/[dataset_id]/[collection_type]/[collection_id]/annotations/[annotationId]/+page.svelte: not found in coverage report
[FAIL] lightly_studio_view/src/routes/datasets/[dataset_id]/[collection_type]/[collection_id]/frames/[sample_id]/+page.svelte: not found in coverage report
[FAIL] lightly_studio_view/src/routes/datasets/[dataset_id]/[collection_type]/[collection_id]/images/[sampleId]/+page.svelte: not found in coverage report

View the guardrail run

To run the guardrails locally, from fast_track/ run make install once, then make run-guardrails (or GUARDRAILS=<name1>,<name2> make run-guardrails for some guardrails).

Reflects 14cd44b.

@LeonardoRosaa

Copy link
Copy Markdown
Contributor Author

/review

import type { Snippet } from 'svelte';
import type { HTMLAttributes } from 'svelte/elements';
interface Props extends HTMLAttributes<HTMLDivElement> {

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.

Not blocking: rest is spread after the static class, so if someone passes class later it replaces the base classes and the card loses its padding and background. Maybe just block it?

interface Props extends Omit<HTMLAttributes<HTMLDivElement>, 'class'> {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch, Props now omits class, so a caller can't replace the base classes.

render(SampleDetailsPageContainer, {
props: {
'data-testid': 'sample-details',
'data-onboarding-detail': '',

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.

Nit: the image page passes the bare attribute, so the prop is true, not ''. Maybe use true here so the test matches the real call?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done, the test now passes true like the image page does.

This branch has not been deployed

No deployments
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