Skip to content

Fix mobile file preview switch overflow - #1659

Open
ymichael wants to merge 1 commit into
mainfrom
bb/fix-oversized-mobile-preview-switch-thr_iupv9cfr7j
Open

Fix mobile file preview switch overflow#1659
ymichael wants to merge 1 commit into
mainfrom
bb/fix-oversized-mobile-preview-switch-thr_iupv9cfr7j

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

Summary

  • size coarse-pointer Preview/Raw tabs so the complete bordered switch fits the 36px file header
  • share the corrected sizing across markdown, CSV, and HTML preview toggles
  • document the relationship between the inner tab height and the switch border/padding

Verification

  • Dev Browser at a 390x844 viewport with coarse-pointer emulation: switch reduced from 42px to 36px, with measured overflow reduced from 6px to 0
  • pnpm exec turbo run typecheck --filter=@bb/app
  • pnpm exec turbo run test --filter=@bb/app --force (347 files, 2,765 tests)

AGENT GENERATED: by GPT-5.6

@bb-slop-cop

bb-slop-cop Bot commented Aug 15, 2026

Copy link
Copy Markdown

🚨 SLOP COP 🚨 · review

I am SlopCop. I am reviewing this change now. I will check security, code quality, performance, architecture, and the mobile workflow.

@bb-slop-cop bb-slop-cop 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.

🚨 SLOP COP 🚨 · review

Plain-English summary

This change makes the Preview/Raw switch fit inside the mobile file header. It sets each inner tab to 30 pixels on narrow touch screens. The border and padding then make the full switch 36 pixels high.

Review

I found no blocking issues.

  • Security: The change only uses static CSS classes. It does not change data, URLs, permissions, or code execution.
  • Code quality: The local constant removes duplicate classes from the Preview and Raw buttons.
  • Performance: The change adds no state, effect, event, request, or repeated layout work.
  • Code structure: The codebase has no shared control with the same size and behavior. The local constant is a good fit.

Validation

  • A mobile browser test used the exact pull request SHA at 390 by 844 pixels with a coarse pointer.
  • The switch and header both measured 36 pixels high. Each tab measured 30 pixels high.
  • The switch had no vertical overflow or layout shift.
  • The Raw button changed state correctly.
  • git diff --check passed.
  • All required GitHub checks passed.

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