Skip to content
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { themeCssVariables } from 'twenty-ui/theme-constants';

const StyledColumnContainer = styled.div`
display: flex;
flex: 1;
& > *:not(:first-of-type) {
Comment on lines 8 to 12
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.
border-left: 1px solid ${themeCssVariables.border.color.light};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ import { isDefined } from 'twenty-shared/utils';
const StyledColumn = styled.div`
background-color: ${themeCssVariables.background.primary};
display: flex;
flex: 1;
flex-direction: column;
height: 100%;
max-width: 200px;
min-height: 100%;
min-width: 200px;
padding: ${themeCssVariables.spacing[2]};
padding-top: 0px;
Expand Down Expand Up @@ -63,14 +60,17 @@ export const RecordBoardColumn = ({
columnIndex: recordBoardColumnIndex,
}}
>
<Droppable droppableId={recordBoardColumnId}>
<Droppable droppableId={recordBoardColumnId} ignoreContainerClipping>
{(droppableProvided) => (
<StyledColumn>
<StyledColumn
ref={droppableProvided.innerRef}
// oxlint-disable-next-line react/jsx-props-no-spreading
{...droppableProvided.droppableProps}
>
<DragAndDropLibraryLegacyReRenderBreaker
memoizationId={recordBoardColumnId}
>
<RecordBoardColumnCardsContainer
droppableProvided={droppableProvided}
recordBoardColumnId={recordBoardColumnId}
/>
</DragAndDropLibraryLegacyReRenderBreaker>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Draggable, type DroppableProvided } from '@hello-pangea/dnd';
import { Draggable } from '@hello-pangea/dnd';
import { styled } from '@linaria/react';
import { useContext } from 'react';
import { themeCssVariables } from 'twenty-ui/theme-constants';
Expand All @@ -25,12 +25,10 @@ const StyledNewButtonContainer = styled.div`

type RecordBoardColumnCardsContainerProps = {
recordBoardColumnId: string;
droppableProvided: DroppableProvided;
};

export const RecordBoardColumnCardsContainer = ({
recordBoardColumnId,
droppableProvided,
}: RecordBoardColumnCardsContainerProps) => {
const { columnDefinition } = useContext(RecordBoardColumnContext);

Expand All @@ -45,11 +43,7 @@ export const RecordBoardColumnCardsContainer = ({
);

return (
<StyledColumnCardsContainer
ref={droppableProvided?.innerRef}
// oxlint-disable-next-line react/jsx-props-no-spreading
{...droppableProvided?.droppableProps}
>
<StyledColumnCardsContainer>
{recordIndexRecordIdsByGroup.map((recordId, index) => (
<RecordBoardCardDraggableContainer
key={recordId}
Expand Down
Loading