The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
fix: hover appearing on not shared for junction relations (#18058)
Abdullah.917a36821aab
diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellDisplayMode.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellDisplayMode.tsxindex af331be2b07..9b8833db15a 100644--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellDisplayMode.tsx+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellDisplayMode.tsx@@ -1,5 +1,6 @@import styled from '@emotion/styled';+import { FieldContext } from '@/object-record/record-field/ui/contexts/FieldContext';import { useIsFieldEmpty } from '@/object-record/record-field/ui/hooks/useIsFieldEmpty';import { useIsFieldInputOnly } from '@/object-record/record-field/ui/hooks/useIsFieldInputOnly';import {@@ -9,6 +10,7 @@ import {import { RecordInlineCellButton } from '@/object-record/record-inline-cell/components/RecordInlineCellEditButton';import { css } from '@emotion/react';import { useLingui } from '@lingui/react/macro';+import { useContext } from 'react';const StyledRecordInlineCellNormalModeOuterContainer = styled.div<Pick<@@ -75,6 +77,8 @@ export const RecordInlineCellDisplayMode = ({const { editModeContentOnly, label, buttonIcon, readonly } =useRecordInlineCellContext();+ const { isForbidden } = useContext(FieldContext);+const isFieldEmpty = useIsFieldEmpty();const showEditButton =buttonIcon &&@@ -87,9 +91,9 @@ export const RecordInlineCellDisplayMode = ({const emptyPlaceHolder = label ?? t`Empty`;- const shouldShowValue = !isFieldEmpty || isFieldInputOnly;+ const shouldShowValue = !isFieldEmpty || isFieldInputOnly || isForbidden;- const shouldShowEmptyPlaceholder = isFieldEmpty;+ const shouldShowEmptyPlaceholder = isFieldEmpty && !isForbidden;return (<>diff --git a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsx b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsxindex ba5dfc37a5f..bb84725723a 100644--- a/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsx+++ b/packages/twenty-front/src/modules/object-record/record-inline-cell/components/RecordInlineCellValue.tsx@@ -1,11 +1,8 @@import { css } from '@emotion/react';import styled from '@emotion/styled';-import { useContext } from 'react';import { FieldDisplay } from '@/object-record/record-field/ui/components/FieldDisplay';-import { FieldContext } from '@/object-record/record-field/ui/contexts/FieldContext';import { useFieldFocus } from '@/object-record/record-field/ui/hooks/useFieldFocus';-import { ForbiddenFieldDisplay } from '@/object-record/record-field/ui/meta-types/display/components/ForbiddenFieldDisplay';import { useRecordInlineCellContext } from '@/object-record/record-inline-cell/components/RecordInlineCellContext';import { RecordInlineCellDisplayMode } from '@/object-record/record-inline-cell/components/RecordInlineCellDisplayMode';import { RecordInlineCellSkeletonLoader } from '@/object-record/record-inline-cell/components/RecordInlineCellSkeletonLoader';@@ -36,16 +33,11 @@ export const RecordInlineCellValue = () => {const { readonly, loading, isCentered, onOpenEditMode } =useRecordInlineCellContext();const { isFocused } = useFieldFocus();- const { isForbidden } = useContext(FieldContext);if (loading === true) {return <RecordInlineCellSkeletonLoader />;}- if (isForbidden === true) {- return <ForbiddenFieldDisplay />;- }-return (<StyledClickableContainer readonly={readonly} isCentered={isCentered}><RecordInlineCellDisplayMode