fix: align drag handle with table blocks (fixes #2604)#2614
fix: align drag handle with table blocks (fixes #2604)#2614iyedbenhamadi wants to merge 1 commit intoTypeCellOS:mainfrom
Conversation
|
@iyedbenhamadi is attempting to deploy a commit to the TypeCell Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughCSS adjustment to table wrapper styling in the editor to correct drag handle alignment. Added a negative margin-top rule using the handle-size custom property to shift the table wrapper upward, addressing vertical misalignment of the drag handle relative to the table. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/mantine
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
Summary
Fix the drag handle floating ~9px above table blocks.
Rationale
The side menu (drag handle) positions itself using the
blockContentelement's bounding box via Floating UI withleft-startplacement. For tables, the.tableWrapperhaspadding-top: var(--bn-table-handle-size)(9px) reserved for row/column handle overlays. This internal padding is included in the bounding box, causing the drag handle to align to the top of the paddinginstead of the visible table border.
Changes
Added
margin-top: calc(-1 * var(--bn-table-handle-size))to.bn-editor [data-content-type="table"] .tableWrapperineditor.cssThis pulls the wrapper up by the exact padding-top amount, so the bounding
box top edge matches the visible table start while preserving the internal
padding needed for table handles
Impact
internal padding is preserved
Testing
Manual testing:
Screenshots/Video
Checklist
Additional Notes
Fixes #2604
Single CSS line change ,no JS modifications needed.
Summary by CodeRabbit