Skip to content

fix(frontend): size text snapshot editor to content (ARG-454)#2350

Merged
gregberge merged 1 commit into
mainfrom
greg/arg-454-fix-the-editor-size
Jul 9, 2026
Merged

fix(frontend): size text snapshot editor to content (ARG-454)#2350
gregberge merged 1 commit into
mainfrom
greg/arg-454-fix-the-editor-size

Conversation

@gregberge

Copy link
Copy Markdown
Member

Problem

In the build review, a text/ARIA snapshot editor stretched to fill the entire viewport height even when it contained just one line (e.g. button "Click me"), leaving a large empty bordered box.

Root cause

The single text snapshot editor (SnapshotEditor, used for Added/Unchanged/baseline text diffs) is rendered inside a row flex container (flex ... justify-center). The default align-items: stretch stretched the bordered @pierre/diffs viewer to the full panel height. The multi-line Changed diff didn't have this issue because it lives in a column flex, where it already sizes to content.

Fix

Wrapped the editor in a w-full self-start div so it opts out of the row's vertical stretch and sizes to its content. The outer detail panel is already overflow-y-auto, so tall snapshots still scroll — matching how the Changed diff already behaves.

Resolves ARG-454.

🤖 Generated with Claude Code

The single text/ARIA snapshot editor sits in a row flex container whose
default `align-items: stretch` stretched the bordered viewer to the full
panel height, leaving a large empty box for short snapshots.

Wrap it in a `w-full self-start` div so it sizes to its content; the outer
panel is already `overflow-y-auto`, so tall snapshots still scroll.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gregberge gregberge requested a review from jsfez July 9, 2026 19:46
@linear-code

linear-code Bot commented Jul 9, 2026

Copy link
Copy Markdown

ARG-454

@argos-ci

argos-ci Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
argos/default (Inspect) ✅ No changes detected - Jul 9, 2026, 7:48 PM
storybook/default (Inspect) ✅ No changes detected - Jul 9, 2026, 7:48 PM
Deployment Status Branch Updated (UTC)
storybook/preview (Open) Ready greg/arg-454-fix-the-editor-size Jul 9, 2026, 7:47 PM

@gregberge gregberge merged commit 328974b into main Jul 9, 2026
14 checks passed
@gregberge gregberge deleted the greg/arg-454-fix-the-editor-size branch July 9, 2026 20:04
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