Skip to content

Stop text selection while dragging the expanded Mermaid viewer - #9

Merged
AdiRishi merged 1 commit into
mainfrom
claude/mermaid-expand-fit-saonv2
Oct 12, 2026
Merged

AdiRishi merged 1 commit into
mainfrom
claude/mermaid-expand-fit-saonv2

Conversation

@AdiRishi

@AdiRishi AdiRishi commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Requested by Adi · project thread

Before: dragging to pan the expanded Mermaid viewer highlighted the diagram's labels as a text selection.

After: dragging only pans; nothing gets selected.

How: the pan surface in PanZoom.tsx gets select-none (user-select: none), which the SVG text inherits. Checked in the dev server with Playwright: the same drag selected "Bob\nAlice\nBob" before the change and nothing after. pnpm check passes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y8zZi9uphvmprNJWq9UTWm


Generated by Claude Code

Summary by CodeRabbit

  • Style
    • Text can no longer be selected on the diagram pan-and-zoom surface.

Dragging to pan started a native text selection across the diagram's
labels. The pan surface is now user-select: none.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y8zZi9uphvmprNJWq9UTWm
@AdiRishi AdiRishi self-assigned this Oct 12, 2026
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 335b234e-5596-4394-9ee2-d700085b9365

📥 Commits

Reviewing files that changed from the base of the PR and between 59ec622 and 91d8650.


📒 Files selected for processing (1)
  • src/features/markdown/render/diagram/PanZoom.tsx

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.



📝 Walkthrough

Walkthrough

The pan/zoom surface now applies select-none along with its existing cursor, touch, and grid classes.

Changes

Pan/Zoom Surface

Layer / File(s) Summary
Pan/zoom surface classes
src/features/markdown/render/diagram/PanZoom.tsx
The pan/zoom surface adds select-none to its CSS classes.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix


Merge Risk: ⚪ Minimal · up to 91d86

The change supports panning without native text selection. No material regression requiring a fix was established.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: preventing text selection while dragging the expanded Mermaid viewer.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment Ready!

Application Preview URL Status
Render MD Visit Preview ✅ Ready

@AdiRishi
AdiRishi merged commit 49abf87 into main Oct 12, 2026
3 checks passed
@AdiRishi
AdiRishi deleted the claude/mermaid-expand-fit-saonv2 branch October 12, 2026 02:34
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.

2 participants