Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/xl-multi-column/src/pm-nodes/Column.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const Column = Node.create({
const column = document.createElement("div");
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
Comment on lines +75 to 77
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

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.

Suggested change
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).

}
Expand Down