Design fixes on show page (#11221)
- Fixes record inline cell height - Fixes notes body empty state
This commit is contained in:
@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
`;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user