Skip to content

The open alternative to Salesforce, designed for AI.

Design fixes on show page (#11221)

Raphaël Bosif145862cf145
diff --git a/packages/twenty-front/src/modules/object-record/record-field/utils/isFieldValueEmpty.ts b/packages/twenty-front/src/modules/object-record/record-field/utils/isFieldValueEmpty.ts
index 8492625c9d6..ea24841d0d4 100644
--- a/packages/twenty-front/src/modules/object-record/record-field/utils/isFieldValueEmpty.ts
+++ b/packages/twenty-front/src/modules/object-record/record-field/utils/isFieldValueEmpty.ts
@@ -36,8 +36,8 @@ import { isFieldSelectValue } from '@/object-record/record-field/types/guards/is
import { isFieldText } from '@/object-record/record-field/types/guards/isFieldText';
import { isFieldTsVector } from '@/object-record/record-field/types/guards/isFieldTsVectorValue';
import { isFieldUuid } from '@/object-record/record-field/types/guards/isFieldUuid';
-import { stripSimpleQuotesFromString } from '~/utils/string/stripSimpleQuotesFromString';
import { isDefined } from 'twenty-shared/utils';
+import { stripSimpleQuotesFromString } from '~/utils/string/stripSimpleQuotesFromString';
const isValueEmpty = (value: unknown) =>
!isDefined(value) ||
@@ -146,9 +146,7 @@ export const isFieldValueEmpty = ({
if (isFieldRichTextV2(fieldDefinition)) {
return (
- !isFieldRichTextV2Value(fieldValue) ||
- (isValueEmpty(fieldValue?.blocknote) &&
- isValueEmpty(fieldValue?.markdown))
+ !isFieldRichTextV2Value(fieldValue) || isValueEmpty(fieldValue?.markdown)
);
}
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.tsx
index bc0897065db..db37f958e2b 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
@@ -38,7 +38,6 @@ const StyledLabelAndIconContainer = styled.div`
display: flex;
gap: ${({ theme }) => theme.spacing(1)};
height: 18px;
- padding-top: 3px;
`;
const StyledValueContainer = styled.div`
@@ -57,15 +56,16 @@ const StyledLabelContainer = styled.div<{ width?: number }>`
const StyledInlineCellBaseContainer = styled.div<{
isDisplayModeFixHeight?: boolean;
}>`
- align-items: flex-start;
box-sizing: border-box;
width: 100%;
display: flex;
- height: fit-content;
line-height: ${({ isDisplayModeFixHeight }) =>
isDisplayModeFixHeight ? `24px` : `18px`};
+ height: ${({ isDisplayModeFixHeight }) =>
+ isDisplayModeFixHeight ? `24px` : `18px`};
gap: ${({ theme }) => theme.spacing(1)};
user-select: none;
+ align-items: center;
justify-content: center;
`;
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.tsx
index 41c0be8e13a..9de0f467195 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
@@ -43,9 +43,6 @@ const StyledRecordInlineCellNormalModeInnerContainer = styled.div`
align-content: center;
align-items: center;
color: ${({ theme }) => theme.font.color.primary};
- padding-top: 3px;
- padding-bottom: 3px;
-
height: fit-content;
overflow: hidden;
diff --git a/packages/twenty-front/src/modules/object-record/record-show/components/FieldsCard.tsx b/packages/twenty-front/src/modules/object-record/record-show/components/FieldsCard.tsx
index af500aab3e2..d75cc5b589a 100644
--- a/packages/twenty-front/src/modules/object-record/record-show/components/FieldsCard.tsx
+++ b/packages/twenty-front/src/modules/object-record/record-show/components/FieldsCard.tsx
@@ -108,6 +108,7 @@ export const FieldsCard = ({
}),
useUpdateRecord: useUpdateOneObjectRecordMutation,
hotkeyScope: InlineCellHotkeyScope.InlineCell,
+ isDisplayModeFixHeight: true,
}}
>
<ActivityTargetsInlineCell
@@ -144,6 +145,7 @@ export const FieldsCard = ({
}),
useUpdateRecord: useUpdateOneObjectRecordMutation,
hotkeyScope: InlineCellHotkeyScope.InlineCell,
+ isDisplayModeFixHeight: true,
}}
>
<RecordFieldComponentInstanceContext.Provider
@@ -179,6 +181,7 @@ export const FieldsCard = ({
}),
useUpdateRecord: useUpdateOneObjectRecordMutation,
hotkeyScope: InlineCellHotkeyScope.InlineCell,
+ isDisplayModeFixHeight: true,
}}
>
<RecordDetailRelationSection