close
Skip to content

improvement(files): match the preview toolbar's height to the tab strip above it - #6973

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fileviewer-toolbar-height
Aug 22, 2026
Merged

improvement(files): match the preview toolbar's height to the tab strip above it#6973
waleedlatif1 merged 1 commit into
stagingfrom
fileviewer-toolbar-height

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Give the file preview toolbar the same height as the resource tab strip stacked directly above it. It had no height of its own — py-1 around a 30px chip came to 39px against the strip's 41px, so two stacked bars sat two pixels apart, which reads as a mistake rather than as two different bars
  • The toolbar now takes the same 40px content box over a 1px border, so its chips centre in the same band the tabs do
  • One change covers all four previews that mount it — pdf, docx, pptx, and the zoomable image/svg surface — none of which override its height
  • The shared 30px chipGeometryClass is untouched; this is the toolbar's own padding

Type of Change

  • Improvement

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

…ip above it

The toolbar had no height of its own — `py-1` around a 30px chip came to 39px
against the tab strip's 41px. Two stacked bars two pixels apart read as a
mistake rather than as two different bars, and the toolbar's chips still stood
taller than the 26px tabs. It now takes the same 40px content box over a 1px
border, so the chips centre in the same band the tabs do.

Covers all four previews that mount it — pdf, docx, pptx and the zoomable
image/svg surface — none of which override its height.
@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
Image docs Skipped Skipped Aug 22, 2026 3:46am

Request Review

@cursor

cursor Bot commented Aug 22, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Cosmetic layout tweak on a shared preview toolbar; no logic, data, or security changes.

Overview
Sets the shared file preview toolbar to a fixed 41px height (40px content plus 1px border) so it lines up with the resource tab strip above it.

Removes py-1 padding that made the bar 39px and visually off by two pixels. Applies to all previews that use PreviewToolbar (PDF, DOCX, PPTX, and zoomable image/SVG).

Reviewed by Cursor Bugbot for commit c36da07. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR replaces intrinsic vertical padding with a fixed 41px height so the shared file-preview toolbar matches the adjacent resource tab strip.

  • Applies consistently to PDF, DOCX, PPTX, image, and SVG previews through the shared toolbar.
  • Preserves the existing 30px chip geometry and centers those controls within the new height.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The fixed toolbar height matches the resource tab strip, accommodates the existing 30px controls, and is safely contained by every current preview layout.

Important Files Changed

Filename Overview
apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-toolbar.tsx Changes the shared preview toolbar from padding-derived height to a fixed 41px height; existing controls and caller layouts remain compatible.

Reviews (1): Last reviewed commit: "improvement(files): match the preview to..." | Re-trigger Greptile

@waleedlatif1
waleedlatif1 merged commit 8689237 into staging Aug 22, 2026
30 checks passed
@waleedlatif1
waleedlatif1 deleted the fileviewer-toolbar-height branch August 22, 2026 03:51
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