Skip to content

feat(labelary-preview): inset background and overflow scrolling for o…#9

Merged
u8array merged 1 commit into
mainfrom
feature/labelary-preview-ui
May 5, 2026
Merged

feat(labelary-preview): inset background and overflow scrolling for o…#9
u8array merged 1 commit into
mainfrom
feature/labelary-preview-ui

Conversation

@u8array
Copy link
Copy Markdown
Owner

@u8array u8array commented May 5, 2026

…versized labels

@u8array u8array merged commit 9ed32b4 into main May 5, 2026
2 checks passed
@u8array u8array deleted the feature/labelary-preview-ui branch May 5, 2026 20:44
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the LabelPreviewModal by refining border styles and introducing a scrollable container for label previews to improve visibility. A review comment suggests adding 'max-w-none' and 'max-h-none' to the preview image to ensure it renders at its natural size and correctly triggers the new scrollable behavior.

Comment on lines +91 to +95
<img
src={previewUrl}
alt="Label preview"
className="block shrink-0"
/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

To allow oversized labels to actually overflow and trigger the scrollbars as intended, you should add max-w-none and max-h-none to the img tag. By default, Tailwind's preflight (and most CSS resets) applies max-width: 100% and height: auto to images, which will scale the label down to fit the modal width even if the container is scrollable. Adding these classes ensures the image renders at its natural size from the Labelary API.

            {!loading && !error && previewUrl && (
              <img
                src={previewUrl}
                alt="Label preview"
                className="block shrink-0 max-w-none max-h-none"
              />
            )}

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