Skip to content

Commit f145862

Browse files
authored
Design fixes on show page (#11221)
- Fixes record inline cell height - Fixes notes body empty state
1 parent 439ccb0 commit f145862

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

Diff for: packages/twenty-front/src/modules/object-record/record-field/utils/isFieldValueEmpty.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ import { isFieldSelectValue } from '@/object-record/record-field/types/guards/is
3636
import { isFieldText } from '@/object-record/record-field/types/guards/isFieldText';
3737
import { isFieldTsVector } from '@/object-record/record-field/types/guards/isFieldTsVectorValue';
3838
import { isFieldUuid } from '@/object-record/record-field/types/guards/isFieldUuid';
39-
import { stripSimpleQuotesFromString } from '~/utils/string/stripSimpleQuotesFromString';
4039
import { isDefined } from 'twenty-shared/utils';
40+
import { stripSimpleQuotesFromString } from '~/utils/string/stripSimpleQuotesFromString';
4141

4242
const isValueEmpty = (value: unknown) =>
4343
!isDefined(value) ||
@@ -146,9 +146,7 @@ export const isFieldValueEmpty = ({
146146

147147
if (isFieldRichTextV2(fieldDefinition)) {
148148
return (
149-
!isFieldRichTextV2Value(fieldValue) ||
150-
(isValueEmpty(fieldValue?.blocknote) &&
151-
isValueEmpty(fieldValue?.markdown))
149+
!isFieldRichTextV2Value(fieldValue) || isValueEmpty(fieldValue?.markdown)
152150
);
153151
}
154152

Diff for: packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellContainer.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ const StyledLabelAndIconContainer = styled.div`
3838
display: flex;
3939
gap: ${({ theme }) => theme.spacing(1)};
4040
height: 18px;
41-
padding-top: 3px;
4241
`;
4342

4443
const StyledValueContainer = styled.div`
@@ -57,15 +56,16 @@ const StyledLabelContainer = styled.div<{ width?: number }>`
5756
const StyledInlineCellBaseContainer = styled.div<{
5857
isDisplayModeFixHeight?: boolean;
5958
}>`
60-
align-items: flex-start;
6159
box-sizing: border-box;
6260
width: 100%;
6361
display: flex;
64-
height: fit-content;
6562
line-height: ${({ isDisplayModeFixHeight }) =>
6663
isDisplayModeFixHeight ? `24px` : `18px`};
64+
height: ${({ isDisplayModeFixHeight }) =>
65+
isDisplayModeFixHeight ? `24px` : `18px`};
6766
gap: ${({ theme }) => theme.spacing(1)};
6867
user-select: none;
68+
align-items: center;
6969
justify-content: center;
7070
`;
7171

Diff for: packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellDisplayMode.tsx

-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ const StyledRecordInlineCellNormalModeInnerContainer = styled.div`
4343
align-content: center;
4444
align-items: center;
4545
color: ${({ theme }) => theme.font.color.primary};
46-
padding-top: 3px;
47-
padding-bottom: 3px;
48-
4946
height: fit-content;
5047
5148
overflow: hidden;

Diff for: packages/twenty-front/src/modules/object-record/record-show/components/FieldsCard.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export const FieldsCard = ({
108108
}),
109109
useUpdateRecord: useUpdateOneObjectRecordMutation,
110110
hotkeyScope: InlineCellHotkeyScope.InlineCell,
111+
isDisplayModeFixHeight: true,
111112
}}
112113
>
113114
<ActivityTargetsInlineCell
@@ -144,6 +145,7 @@ export const FieldsCard = ({
144145
}),
145146
useUpdateRecord: useUpdateOneObjectRecordMutation,
146147
hotkeyScope: InlineCellHotkeyScope.InlineCell,
148+
isDisplayModeFixHeight: true,
147149
}}
148150
>
149151
<RecordFieldComponentInstanceContext.Provider
@@ -179,6 +181,7 @@ export const FieldsCard = ({
179181
}),
180182
useUpdateRecord: useUpdateOneObjectRecordMutation,
181183
hotkeyScope: InlineCellHotkeyScope.InlineCell,
184+
isDisplayModeFixHeight: true,
182185
}}
183186
>
184187
<RecordDetailRelationSection

0 commit comments

Comments
 (0)