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 { isFieldText } from '@/object-record/record-field/types/guards/isFieldText';
|
||||||
import { isFieldTsVector } from '@/object-record/record-field/types/guards/isFieldTsVectorValue';
|
import { isFieldTsVector } from '@/object-record/record-field/types/guards/isFieldTsVectorValue';
|
||||||
import { isFieldUuid } from '@/object-record/record-field/types/guards/isFieldUuid';
|
import { isFieldUuid } from '@/object-record/record-field/types/guards/isFieldUuid';
|
||||||
import { stripSimpleQuotesFromString } from '~/utils/string/stripSimpleQuotesFromString';
|
|
||||||
import { isDefined } from 'twenty-shared/utils';
|
import { isDefined } from 'twenty-shared/utils';
|
||||||
|
import { stripSimpleQuotesFromString } from '~/utils/string/stripSimpleQuotesFromString';
|
||||||
|
|
||||||
const isValueEmpty = (value: unknown) =>
|
const isValueEmpty = (value: unknown) =>
|
||||||
!isDefined(value) ||
|
!isDefined(value) ||
|
||||||
@ -146,9 +146,7 @@ export const isFieldValueEmpty = ({
|
|||||||
|
|
||||||
if (isFieldRichTextV2(fieldDefinition)) {
|
if (isFieldRichTextV2(fieldDefinition)) {
|
||||||
return (
|
return (
|
||||||
!isFieldRichTextV2Value(fieldValue) ||
|
!isFieldRichTextV2Value(fieldValue) || isValueEmpty(fieldValue?.markdown)
|
||||||
(isValueEmpty(fieldValue?.blocknote) &&
|
|
||||||
isValueEmpty(fieldValue?.markdown))
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,6 @@ const StyledLabelAndIconContainer = styled.div`
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: ${({ theme }) => theme.spacing(1)};
|
gap: ${({ theme }) => theme.spacing(1)};
|
||||||
height: 18px;
|
height: 18px;
|
||||||
padding-top: 3px;
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledValueContainer = styled.div`
|
const StyledValueContainer = styled.div`
|
||||||
@ -57,15 +56,16 @@ const StyledLabelContainer = styled.div<{ width?: number }>`
|
|||||||
const StyledInlineCellBaseContainer = styled.div<{
|
const StyledInlineCellBaseContainer = styled.div<{
|
||||||
isDisplayModeFixHeight?: boolean;
|
isDisplayModeFixHeight?: boolean;
|
||||||
}>`
|
}>`
|
||||||
align-items: flex-start;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
height: fit-content;
|
|
||||||
line-height: ${({ isDisplayModeFixHeight }) =>
|
line-height: ${({ isDisplayModeFixHeight }) =>
|
||||||
isDisplayModeFixHeight ? `24px` : `18px`};
|
isDisplayModeFixHeight ? `24px` : `18px`};
|
||||||
|
height: ${({ isDisplayModeFixHeight }) =>
|
||||||
|
isDisplayModeFixHeight ? `24px` : `18px`};
|
||||||
gap: ${({ theme }) => theme.spacing(1)};
|
gap: ${({ theme }) => theme.spacing(1)};
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
@ -43,9 +43,6 @@ const StyledRecordInlineCellNormalModeInnerContainer = styled.div`
|
|||||||
align-content: center;
|
align-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
color: ${({ theme }) => theme.font.color.primary};
|
color: ${({ theme }) => theme.font.color.primary};
|
||||||
padding-top: 3px;
|
|
||||||
padding-bottom: 3px;
|
|
||||||
|
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@ -108,6 +108,7 @@ export const FieldsCard = ({
|
|||||||
}),
|
}),
|
||||||
useUpdateRecord: useUpdateOneObjectRecordMutation,
|
useUpdateRecord: useUpdateOneObjectRecordMutation,
|
||||||
hotkeyScope: InlineCellHotkeyScope.InlineCell,
|
hotkeyScope: InlineCellHotkeyScope.InlineCell,
|
||||||
|
isDisplayModeFixHeight: true,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ActivityTargetsInlineCell
|
<ActivityTargetsInlineCell
|
||||||
@ -144,6 +145,7 @@ export const FieldsCard = ({
|
|||||||
}),
|
}),
|
||||||
useUpdateRecord: useUpdateOneObjectRecordMutation,
|
useUpdateRecord: useUpdateOneObjectRecordMutation,
|
||||||
hotkeyScope: InlineCellHotkeyScope.InlineCell,
|
hotkeyScope: InlineCellHotkeyScope.InlineCell,
|
||||||
|
isDisplayModeFixHeight: true,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<RecordFieldComponentInstanceContext.Provider
|
<RecordFieldComponentInstanceContext.Provider
|
||||||
@ -179,6 +181,7 @@ export const FieldsCard = ({
|
|||||||
}),
|
}),
|
||||||
useUpdateRecord: useUpdateOneObjectRecordMutation,
|
useUpdateRecord: useUpdateOneObjectRecordMutation,
|
||||||
hotkeyScope: InlineCellHotkeyScope.InlineCell,
|
hotkeyScope: InlineCellHotkeyScope.InlineCell,
|
||||||
|
isDisplayModeFixHeight: true,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<RecordDetailRelationSection
|
<RecordDetailRelationSection
|
||||||
|
|||||||
Reference in New Issue
Block a user