-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display issue with long record names #6102
Comments
To fix the display issue with long record names, update the CSS in
<PageHeader
title={pageName ?? ''}
hasBackButton
Icon={headerIcon}
loading={loading}
className="page-header"
>
.page-header {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
<ShowPageSummaryCard
id={objectRecordId}
logoOrAvatar={recordIdentifier?.avatarUrl ?? ''}
avatarPlaceholder={recordIdentifier?.name ?? ''}
date={recordFromStore.createdAt ?? ''}
loading={isPrefetchLoading || loading || recordLoading}
title={
<FieldContext.Provider
value={{
entityId: objectRecordId,
recoilScopeId: objectRecordId + labelIdentifierFieldMetadataItem?.id,
isLabelIdentifier: false,
fieldDefinition: {
type: labelIdentifierFieldMetadataItem?.type || FieldMetadataType.Text,
iconName: '',
fieldMetadataId: labelIdentifierFieldMetadataItem?.id ?? '',
label: labelIdentifierFieldMetadataItem?.label || '',
metadata: {
fieldName: labelIdentifierFieldMetadataItem?.name || '',
objectMetadataNameSingular: objectNameSingular,
},
defaultValue: labelIdentifierFieldMetadataItem?.defaultValue,
},
useUpdateRecord: useUpdateOneObjectRecordMutation,
hotkeyScope: InlineCellHotkeyScope.InlineCell,
isCentered: true,
}}
>
<RecordInlineCell readonly={isReadOnly} className="record-inline-cell" />
</FieldContext.Provider>
}
avatarType={recordIdentifier?.avatarType ?? 'rounded'}
onUploadPicture={
objectNameSingular === 'person' ? onUploadPicture : undefined
}
/>
.record-inline-cell {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} These changes will ensure that long record names are properly truncated with ellipsis. References/packages/twenty-front/src/pages/object-record/RecordShowPage.tsx
|
what should be done? I would like to fix the issue |
Is this issue open ? Can i take it? |
@RobertoSimonini1 do you want it? Otherwise I'll assign you @gowreesh369, but in the meantime you can look our other |
@Bonapara yes, I would like to solve it :) |
Thanks @RobertoSimonini1 ! |
hi guys, I'm working on the issue now since I was a bit busy last days, btw, I think we should set some variables setting the max lenght of the string and use those instead of writing numbers in the code, what do you think? |
Answered in the PR. I think you should use CSS ellipsis and base it on the parent container's size, not hardcode values. Thanks! |
We don't display longer names properly.
This is especially bad on the opportunity object where names tend to be long:
cc @Bonapara
The text was updated successfully, but these errors were encountered: