fix(attachment): dialog image fits between the chrome, one zoom clamp for wheel, pinch and buttons - #1153
Merged
Merged
Conversation
… for wheel, pinch and buttons The per-slide stage now reserves the fixed header and zoom-control heights, so zoom 1 fits inside the chrome instead of behind it. Wheel and trackpad pinch zoom exponentially and share the button clamp (0.25 to 8) instead of stopping at 1. The header moves to z-20 so the viewer no longer paints over the title. PDF and video drop their ad hoc viewport offsets, both entry points drop a headerClassName that never rendered, and the dialog uses the wrapper class from params.ts instead of an inline copy. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In the attachment dialog a tall image at the default zoom spans the full viewport, so the fixed header and the zoom controls overlap it. Trackpad pinch (and mouse wheel) could not zoom out below 1, which is exactly the fit that collides with the chrome. The header and the viewer also shared
z-10, so the image painted over the title bar.Changes
attachmentDialogStageClassName(pt-12 sm:pb-14, hardcoded on purpose) pads the per-slide container in dialog mode so zoom 1 fits between the header and the controls. Overflow still clips at the padding edge, so a zoomed-in image can slide under the translucent chrome as before. The bottom inset only applies fromsmup, where the pan/zoom controls render.render/image-zoom.tsholds the floor (0.25), ceiling (8), button step and wheel sensitivity. Buttons, mouse wheel and trackpad pinch all pass through it; wheel zoom is exponential ondeltaY, so pinch is continuous and a mouse notch is roughly 20%.z-20, the viewer loses itsz-10.headerClassNamethat never rendered (no title, so noDialogHeader), the dialog uses the shared wrapper class instead of an inline copy, the controls center with a translate instead of a50vwcalculation, PDF and video drop their ad hoc viewport offsets in favor of the padded stage.Verification
Fork impact
Unpinned template files only; forks pick this up on the next sync without a migration.
🤖 Generated with Claude Code