Fix/object detail recordcell tooltip (#6908)

Fixes for https://github.com/twentyhq/twenty/issues/6596

![image](https://github.com/user-attachments/assets/69014a93-a61c-4b6a-bffa-33fdb31a8511)

---------

Co-authored-by: martmull <martmull@hotmail.fr>
This commit is contained in:
Sandheep-OSC 2024-09-10 12:36:21 +05:30 committed by GitHub
parent ace0f7b515
commit 93991680a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,13 +1,17 @@
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { ReactElement, useContext } from 'react';
import { AppTooltip, IconComponent, TooltipDelay } from 'twenty-ui';
import {
AppTooltip,
IconComponent,
TooltipDelay,
OverflowingTextWithTooltip,
} from 'twenty-ui';
import { FieldContext } from '@/object-record/record-field/contexts/FieldContext';
import { useFieldFocus } from '@/object-record/record-field/hooks/useFieldFocus';
import { RecordInlineCellValue } from '@/object-record/record-inline-cell/components/RecordInlineCellValue';
import { getRecordFieldInputId } from '@/object-record/utils/getRecordFieldInputId';
import { EllipsisDisplay } from '@/ui/field/display/components/EllipsisDisplay';
import { HotkeyScope } from '@/ui/utilities/hotkey/types/HotkeyScope';
import { useRecordInlineCellContext } from './RecordInlineCellContext';
@ -120,7 +124,7 @@ export const RecordInlineCellContainer = () => {
)}
{showLabel && label && (
<StyledLabelContainer width={labelWidth}>
<EllipsisDisplay maxWidth={labelWidth}>{label}</EllipsisDisplay>
<OverflowingTextWithTooltip text={label} />
</StyledLabelContainer>
)}
{/* TODO: Displaying Tooltips on the board is causing performance issues https://react-tooltip.com/docs/examples/render */}