The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Fixed hovering of kanban cards (#15808)
Lucas Bordeau9d43058e50a6
diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellContainer.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellContainer.tsxindex ec54a18717f..d9704585b35 100644--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellContainer.tsx@@ -115,7 +115,7 @@ export const RecordInlineCellContainer = () => {<IconLabel stroke={theme.icon.stroke.sm} /></StyledIconContainer>)}- {label && (+ {showLabel && (<StyledLabelContainer width={labelWidth}><OverflowingTextWithTooltip text={label} displayedMaxRows={1} /></StyledLabelContainer>@@ -134,7 +134,6 @@ export const RecordInlineCellContainer = () => {)}</StyledLabelAndIconContainer>)}-<StyledValueContainer readonly={readonly ?? false} id={anchorId}><RecordInlineCellValue /></StyledValueContainer>diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellDisplayMode.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellDisplayMode.tsxindex 54ea90a1043..af331be2b07 100644--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellDisplayMode.tsx+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellDisplayMode.tsx@@ -60,8 +60,6 @@ const StyledEmptyField = styled.div`color: ${({ theme }) => theme.font.color.light};display: flex;height: 20px;-- background-color: ${({ theme }) => theme.background.secondary};`;export const RecordInlineCellDisplayMode = ({@@ -74,25 +72,24 @@ export const RecordInlineCellDisplayMode = ({}>) => {const { t } = useLingui();- const { editModeContentOnly, showLabel, label, buttonIcon, readonly } =+ const { editModeContentOnly, label, buttonIcon, readonly } =useRecordInlineCellContext();- const isDisplayModeContentEmpty = useIsFieldEmpty();+ const isFieldEmpty = useIsFieldEmpty();const showEditButton =buttonIcon &&isHovered &&!readonly &&- !isDisplayModeContentEmpty &&+ !isFieldEmpty &&!editModeContentOnly;const isFieldInputOnly = useIsFieldInputOnly();- const shouldDisplayEditModeOnFocus = isHovered && isFieldInputOnly;+ const emptyPlaceHolder = label ?? t`Empty`;- const emptyPlaceHolder = showLabel ? t`Empty` : label;+ const shouldShowValue = !isFieldEmpty || isFieldInputOnly;- const shouldShowEmptyPlaceholder =- (isDisplayModeContentEmpty && !shouldDisplayEditModeOnFocus) || !children;+ const shouldShowEmptyPlaceholder = isFieldEmpty;return (<>@@ -102,11 +99,11 @@ export const RecordInlineCellDisplayMode = ({onClick={onClick}><StyledRecordInlineCellNormalModeInnerContainer>- {shouldShowEmptyPlaceholder ? (- <StyledEmptyField>{emptyPlaceHolder}</StyledEmptyField>- ) : (+ {shouldShowValue ? (children- )}+ ) : shouldShowEmptyPlaceholder ? (+ <StyledEmptyField>{emptyPlaceHolder}</StyledEmptyField>+ ) : null}</StyledRecordInlineCellNormalModeInnerContainer></StyledRecordInlineCellNormalModeOuterContainer>{showEditButton && (