fix(core): prevent slide toolbar title overlap on mobile#241
fix(core): prevent slide toolbar title overlap on mobile#241ridemountainpig wants to merge 1 commit into
Conversation
Keep the title from overlapping the toolbar icons on narrow screens, and collapse the copy-link and download actions into a single overflow menu. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@ridemountainpig is attempting to deploy a commit to the Yiwei Ho Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe slide toolbar is refactored to fix title/icon overlap on narrow screens. Copy-link and export operations are extracted into shared async handlers. A new mobile overflow dropdown consolidates these actions, and the title wrapper gains responsive positioning. A ChangesMobile Toolbar Overflow Menu & Responsive Layout Fix
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/core/src/app/routes/slide.tsx (1)
541-548: 💤 Low valueConsider removing the layout comment per coding guidelines.
The comment at lines 541-543 explains the responsive centering strategy. While helpful, the coding guidelines specify "Default to writing no comments" for TypeScript files. The layout behavior is somewhat self-documenting through the class names (
flex-1,min-w-0,md:absolute), though the centering mechanism is subtle. Consider whether the comment adds enough non-obvious insight to justify the exception.As per coding guidelines, "Default to writing no comments. Only add one when the WHY is non-obvious — a hidden constraint, a subtle invariant, a workaround for a specific bug, or behavior that would surprise a reader."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/core/src/app/routes/slide.tsx` around lines 541 - 548, Evaluate and potentially remove the multi-line comment at the InlineTitleEditor section (lines 541-543) explaining the responsive centering strategy. According to coding guidelines, comments should only be retained when they explain non-obvious WHY decisions—not HOW the code works. Since the Tailwind classes (flex-1, min-w-0, md:absolute, md:inset-x-0) are relatively self-documenting of the layout behavior, remove the comment unless you determine it documents a non-obvious constraint or hidden invariant that would surprise readers.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/core/src/app/routes/slide.tsx`:
- Around line 541-548: Evaluate and potentially remove the multi-line comment at
the InlineTitleEditor section (lines 541-543) explaining the responsive
centering strategy. According to coding guidelines, comments should only be
retained when they explain non-obvious WHY decisions—not HOW the code works.
Since the Tailwind classes (flex-1, min-w-0, md:absolute, md:inset-x-0) are
relatively self-documenting of the layout behavior, remove the comment unless
you determine it documents a non-obvious constraint or hidden invariant that
would surprise readers.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4717835b-d5af-4948-937c-f95081ecc071
📒 Files selected for processing (7)
.changeset/fix-mobile-title-overlap.mdpackages/core/src/app/routes/slide.tsxpackages/core/src/locale/en.tspackages/core/src/locale/ja.tspackages/core/src/locale/types.tspackages/core/src/locale/zh-cn.tspackages/core/src/locale/zh-tw.ts
What
Fixes the slide toolbar on narrow screens:
flex-1, so the in-flow title lands at the viewport center, andmin-w-0lets it truncate instead of overlapping. Onmd+the title keeps its original absolute centering.MoreHorizontal) on mobile. Onmd+the standalone copy-link button and download dropdown render as before.The export menu items were extracted into a shared
exportMenuItemsfragment reused by both the desktop download dropdown and the mobile overflow menu, removing duplicated handler code.Before:

After:


Notes
moreActionslocale string across en / ja / zh-cn / zh-tw and theLocaletype.@open-slide/corepatch).tscand Biome pass clean on the changed files.🤖 Generated with Claude Code