Cleaned FieldDefinition props and removed recoil calls (#14220)

This PR removes some unused props from FieldDefinition type and put some
recoil calls higher up in the hierarchy.

This PR fixes a regression on Chip introduced by
https://github.com/twentyhq/twenty/pull/11498, where we don't want
"Untitled" to be displayed in compact mode.

# FieldDefinition refactor

Removed `isLabelIdentifierCompact` and `labelIdentifierLink` which can
be derived directly in the chip component or computed in the record
table context.

Removed `disableTooltip` and `infoTooltipContent` because they were not
used.

Introduced `fieldMetadataItemId`, as optional for now, to have the
ability to progressively refactor the different things that could be
derived from this and `recordId`.

# Performance improvements

There's not a great deal to be gained for now on those modifications,
which specifically concern the identifier column.
This commit is contained in:
Lucas Bordeau
2025-09-02 10:49:55 +02:00
committed by GitHub
parent 90432f5b13
commit bfad5b0477
18 changed files with 78 additions and 64 deletions
@@ -166,7 +166,7 @@ export const Chip = ({
{leftComponent}
{!isLabelHidden && label && label.trim() ? (
<OverflowingTextWithTooltip size={size} text={label} />
) : !forceEmptyText ? (
) : !forceEmptyText && !isLabelHidden ? (
<StyledDiv>Untitled</StyledDiv>
) : (
''