Skip to content

fix: expand kanban column drop zone to full height#18897

Open
JASSBR wants to merge 1 commit intotwentyhq:mainfrom
JASSBR:fix/kanban-drop-zone
Open

fix: expand kanban column drop zone to full height#18897
JASSBR wants to merge 1 commit intotwentyhq:mainfrom
JASSBR:fix/kanban-drop-zone

Conversation

@JASSBR
Copy link
Copy Markdown

@JASSBR JASSBR commented Mar 24, 2026

Summary

  • Added flex: 1 to StyledColumnContainer in RecordBoardColumns.tsx
  • The column wrapper wasn't stretching vertically, so the droppable area only covered the top of each column where cards existed
  • Now the entire column height is a valid drop target

Test plan

  • Open a board/kanban view
  • Drag a card from one column
  • Drop it in the lower/empty area of another column
  • Verify the drop registers correctly

Fixes #18842

The droppable area in kanban columns was limited to near the top,
making it difficult to drop cards lower in the column.

Fixes twentyhq#18842
Copilot AI review requested due to automatic review settings March 24, 2026 10:02
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@github-actions
Copy link
Copy Markdown
Contributor

Welcome!

Hello there, congrats on your first PR! We're excited to have you contributing to this project.
By submitting your Pull Request, you acknowledge that you agree with the terms of our Contributor License Agreement.

Generated by 🚫 dangerJS against 79e41ee

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file


Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to make Kanban columns accept drag-and-drop across their full vertical height by ensuring the columns container stretches to fill the available board space.

Changes:

  • Added flex: 1 to the columns wrapper (StyledColumnContainer) so the column layout can expand vertically with the board.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 8 to 12
const StyledColumnContainer = styled.div`
display: flex;
flex: 1;

& > *:not(:first-of-type) {
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

Adding flex: 1 here may not fully address the Kanban drop-zone issue described in #18842. The current @hello-pangea/dnd setup still renders droppableProvided.placeholder outside the element that receives droppableProvided.innerRef/droppableProps (see RecordBoardColumn.tsx vs RecordBoardColumnCardsContainer.tsx), which violates the library’s contract and can still lead to incorrect droppable measurements during drag. Consider fixing the placeholder placement (or an equivalent approach that keeps memoization) and/or verify with a repro that this CSS change alone resolves the drop behavior in scrolled/empty column areas.

Copilot uses AI. Check for mistakes.
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.

Kanban drag-and-drop only registers drops near the top of a column

2 participants