The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
increase recordCard field hovering zone width + click (recordCard and summaryCard) (#11983)
Etienne679530020c13
diff --git a/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/StopPropagationContainer.tsx b/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/StopPropagationContainer.tsxindex 417c522e66d..f5769d27e92 100644--- a/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/StopPropagationContainer.tsx+++ b/packages/twenty-front/src/modules/object-record/record-board/record-board-card/components/StopPropagationContainer.tsx@@ -1,11 +1,10 @@-import { ReactNode } from 'react';import styled from '@emotion/styled';+import { ReactNode } from 'react';const StyledFieldContainer = styled.div`display: flex;flex-direction: row;- width: fit-content;- max-width: 100%;+ width: 100%;`;export const StopPropagationContainer = ({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 adac60d499f..0ca05809891 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@@ -9,6 +9,7 @@ import { getRecordFieldInputId } from '@/object-record/utils/getRecordFieldInputimport { assertFieldMetadata } from '@/object-record/record-field/types/guards/assertFieldMetadata';import { isFieldText } from '@/object-record/record-field/types/guards/isFieldText';+import { useInlineCell } from '@/object-record/record-inline-cell/hooks/useInlineCell';import {AppTooltip,OverflowingTextWithTooltip,@@ -86,8 +87,14 @@ export const StyledSkeletonDiv = styled.div``;export const RecordInlineCellContainer = () => {- const { readonly, IconLabel, label, labelWidth, showLabel } =- useRecordInlineCellContext();+ const {+ readonly,+ IconLabel,+ label,+ labelWidth,+ showLabel,+ editModeContentOnly,+ } = useRecordInlineCellContext();const { recordId, fieldDefinition } = useContext(FieldContext);@@ -97,6 +104,14 @@ export const RecordInlineCellContainer = () => {const { setIsFocused } = useFieldFocus();+ const { openInlineCell } = useInlineCell();++ const handleDisplayModeClick = () => {+ if (!readonly && !editModeContentOnly) {+ openInlineCell();+ }+ };+const handleContainerMouseEnter = () => {if (!readonly) {setIsFocused(true);@@ -119,6 +134,7 @@ export const RecordInlineCellContainer = () => {<StyledInlineCellBaseContaineronMouseEnter={handleContainerMouseEnter}onMouseLeave={handleContainerMouseLeave}+ onClick={handleDisplayModeClick}>{(IconLabel || label) && (<StyledLabelAndIconContainer id={labelId}>diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsxindex b88fc44a829..e9ff2c3d3f5 100644--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsx+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsx@@ -39,13 +39,7 @@ export const RecordInlineCellValue = () => {isCentered,} = useRecordInlineCellContext();- const { isInlineCellInEditMode, openInlineCell } = useInlineCell();-- const handleDisplayModeClick = () => {- if (!readonly && !editModeContentOnly) {- openInlineCell();- }- };+ const { isInlineCellInEditMode } = useInlineCell();if (loading === true) {return <RecordInlineCellSkeletonLoader />;@@ -63,11 +57,7 @@ export const RecordInlineCellValue = () => {</RecordInlineCellDisplayMode></StyledClickableContainer>) : (- <StyledClickableContainer- readonly={readonly}- onClick={handleDisplayModeClick}- isCentered={isCentered}- >+ <StyledClickableContainer readonly={readonly} isCentered={isCentered}><RecordInlineCellDisplayMode>{displayModeContent}</RecordInlineCellDisplayMode>