fix(drag): exclude empty glyph bboxes from out-of-bounds check - #1393
Conversation
Hufnagel connector glyphs for ascending intervals (E9B4-E9B8) have zero-sized bboxes that collapse to the SVG origin, which isDragOutOfBounds() always read as out of bounds, permanently locking ligature dragging after the first attempt. Fixes #1389
|
Warning Review limit reached
Next review available in: 38 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe change excludes zero-sized connector glyphs from drag bounds checks. A Cypress test verifies that an ascending Hufnagel ligature can be created, dragged within bounds, and remains selected. ChangesHufnagel ligature dragging
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@cypress/e2e/drag/hufnagel-ligature.cy.ts`:
- Around line 52-57: Strengthen the “safe: move ligature within bounds” test by
asserting an observable drag outcome after drag(), such as a changed rendered
position, updated persisted coordinates, or the expected editor request. Keep
the existing failure-notification check, but do not rely on FIRST_NC and
SECOND_NC selection assertions because those are already true before dragging.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: e4eda02e-b17f-4d34-88eb-63d4521959fc
📒 Files selected for processing (2)
cypress/e2e/drag/hufnagel-ligature.cy.tssrc/utils/DragHandler.ts
Neon's click handler reads metaKey on Mac and ctrlKey elsewhere. The test only set metaKey, so multi-select silently failed on Linux CI runners and #toggle-ligature never appeared.
Addresses CodeRabbit feedback on PR#1393: the prior assertions could pass even if drag() never started a d3 drag or submitted an edit action. Now also checks the element's rendered position changed.
Hufnagel connector glyphs for ascending intervals (E9B4-E9B8) have zero-sized bboxes that collapse to the SVG origin, which isDragOutOfBounds() always read as out of bounds, permanently locking ligature dragging after the first attempt.
Fixes #1389
Summary by CodeRabbit
Bug Fixes
Tests