fix: Prevent side menu from being clipped in toggle+column layout#2782
fix: Prevent side menu from being clipped in toggle+column layout#2782mkcash wants to merge 1 commit into
Conversation
|
Someone is attempting to deploy a commit to the TypeCell Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughThe column's rendered DOM element now explicitly sets ChangesColumn overflow visibility
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 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 |
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 `@packages/xl-multi-column/src/pm-nodes/Column.ts`:
- Around line 75-77: The loop that applies HTMLAttributes via
column.setAttribute may overwrite the earlier column.style.overflow = "visible"
if HTMLAttributes includes a style key; update the code that iterates
HTMLAttributes (the for loop over Object.entries(HTMLAttributes) which calls
column.setAttribute) to either skip the "style" attribute and instead merge
styles, or apply HTMLAttributes first and then explicitly set
column.style.overflow = "visible" after the loop; ensure you handle merging of
existing style string with the overflow rule so overflow: visible is preserved
(reference symbols: HTMLAttributes, column.setAttribute, column.style.overflow).
🪄 Autofix (Beta)
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
Run ID: 68500642-e3bf-475c-8fc8-ac5f4903d2ea
📒 Files selected for processing (1)
packages/xl-multi-column/src/pm-nodes/Column.ts
| column.style.overflow = "visible"; | ||
| for (const [attribute, value] of Object.entries(HTMLAttributes)) { | ||
| column.setAttribute(attribute, value as any); // TODO as any |
There was a problem hiding this comment.
overflow: visible is currently overwritten by later style attribute assignment.
On Line 75 you set column.style.overflow = "visible", but Line 77 can overwrite it when HTMLAttributes contains style (e.g., flex-grow from width attrs). That makes this fix non-deterministic and can reintroduce the clipping bug.
Suggested fix
column.className = "bn-block-column";
column.setAttribute("data-node-type", this.name);
- column.style.overflow = "visible";
for (const [attribute, value] of Object.entries(HTMLAttributes)) {
column.setAttribute(attribute, value as any); // TODO as any
}
+ column.style.overflow = "visible";📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| column.style.overflow = "visible"; | |
| for (const [attribute, value] of Object.entries(HTMLAttributes)) { | |
| column.setAttribute(attribute, value as any); // TODO as any | |
| column.className = "bn-block-column"; | |
| column.setAttribute("data-node-type", this.name); | |
| for (const [attribute, value] of Object.entries(HTMLAttributes)) { | |
| column.setAttribute(attribute, value as any); // TODO as any | |
| } | |
| column.style.overflow = "visible"; |
🤖 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/xl-multi-column/src/pm-nodes/Column.ts` around lines 75 - 77, The
loop that applies HTMLAttributes via column.setAttribute may overwrite the
earlier column.style.overflow = "visible" if HTMLAttributes includes a style
key; update the code that iterates HTMLAttributes (the for loop over
Object.entries(HTMLAttributes) which calls column.setAttribute) to either skip
the "style" attribute and instead merge styles, or apply HTMLAttributes first
and then explicitly set column.style.overflow = "visible" after the loop; ensure
you handle merging of existing style string with the overflow rule so overflow:
visible is preserved (reference symbols: HTMLAttributes, column.setAttribute,
column.style.overflow).
Fix
Prevents side menu (+ button) from disappearing when hovering left column in toggle blocks.
Problem
Side menu icons were clipped/hidden in multi-column layouts inside toggle blocks. Column wrapper needed overflow:visible.
Fix
Added overflow:visible to column div render.
Fixes #2526
Summary by CodeRabbit
Release Notes