The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Rename InlineCell to RecordInlineCell (#2377)
bosiraphael88ca846f83f6
diff --git a/front/src/modules/activities/editable-fields/components/ActivityAssigneeEditableField.tsx b/front/src/modules/activities/editable-fields/components/ActivityAssigneeEditableField.tsxindex bf2d4d75619..f97b93eb954 100644--- a/front/src/modules/activities/editable-fields/components/ActivityAssigneeEditableField.tsx+++ b/front/src/modules/activities/editable-fields/components/ActivityAssigneeEditableField.tsx@@ -5,7 +5,7 @@ import { Entity } from '@/ui/input/relation-picker/types/EntityTypeForSelect';import { FieldContext } from '@/ui/object/field/contexts/FieldContext';import { FieldDefinition } from '@/ui/object/field/types/FieldDefinition';import { FieldRelationMetadata } from '@/ui/object/field/types/FieldMetadata';-import { InlineCell } from '@/ui/object/record-inline-cell/components/InlineCell';+import { RecordInlineCell } from '@/ui/object/record-inline-cell/components/RecordInlineCell';import { InlineCellHotkeyScope } from '@/ui/object/record-inline-cell/types/InlineCellHotkeyScope';import { Company, User, useUpdateActivityMutation } from '~/generated/graphql';@@ -47,7 +47,7 @@ export const ActivityAssigneeEditableField = ({return (<FieldContext.Provider value={value}>- <InlineCell />+ <RecordInlineCell /></FieldContext.Provider>);};diff --git a/front/src/modules/activities/editable-fields/components/ActivityEditorDateField.tsx b/front/src/modules/activities/editable-fields/components/ActivityEditorDateField.tsxindex 21a59757c27..d7e4680f307 100644--- a/front/src/modules/activities/editable-fields/components/ActivityEditorDateField.tsx+++ b/front/src/modules/activities/editable-fields/components/ActivityEditorDateField.tsx@@ -2,7 +2,7 @@ import { IconCalendar } from '@/ui/display/icon/index';import { FieldContext } from '@/ui/object/field/contexts/FieldContext';import { FieldDefinition } from '@/ui/object/field/types/FieldDefinition';import { FieldDateMetadata } from '@/ui/object/field/types/FieldMetadata';-import { InlineCell } from '@/ui/object/record-inline-cell/components/InlineCell';+import { RecordInlineCell } from '@/ui/object/record-inline-cell/components/RecordInlineCell';import { InlineCellHotkeyScope } from '@/ui/object/record-inline-cell/types/InlineCellHotkeyScope';import { RecoilScope } from '@/ui/utilities/recoil-scope/components/RecoilScope';import { useUpdateActivityMutation } from '~/generated/graphql';@@ -33,7 +33,7 @@ export const ActivityEditorDateField = ({hotkeyScope: InlineCellHotkeyScope.InlineCell,}}>- <InlineCell />+ <RecordInlineCell /></FieldContext.Provider></RecoilScope>);diff --git a/front/src/modules/activities/editable-fields/components/ActivityRelationEditableField.tsx b/front/src/modules/activities/editable-fields/components/ActivityRelationEditableField.tsxindex be62687132e..5c9de633584 100644--- a/front/src/modules/activities/editable-fields/components/ActivityRelationEditableField.tsx+++ b/front/src/modules/activities/editable-fields/components/ActivityRelationEditableField.tsx@@ -1,7 +1,7 @@import { ActivityTargetChips } from '@/activities/components/ActivityTargetChips';import { IconArrowUpRight, IconPencil } from '@/ui/display/icon';import { RelationPickerHotkeyScope } from '@/ui/input/relation-picker/types/RelationPickerHotkeyScope';-import { InlineCellContainer } from '@/ui/object/record-inline-cell/components/InlineCellContainer';+import { RecordInlineCellContainer } from '@/ui/object/record-inline-cell/components/RecordInlineCellContainer';import { FieldRecoilScopeContext } from '@/ui/object/record-inline-cell/states/recoil-scope-contexts/FieldRecoilScopeContext';import { RecoilScope } from '@/ui/utilities/recoil-scope/components/RecoilScope';import { Activity, ActivityTarget, Company, Person } from '~/generated/graphql';@@ -25,7 +25,7 @@ export const ActivityRelationEditableField = ({return (<RecoilScope CustomRecoilScopeContext={FieldRecoilScopeContext}><RecoilScope>- <InlineCellContainer+ <RecordInlineCellContainerbuttonIcon={IconPencil}customEditHotkeyScope={{scope: RelationPickerHotkeyScope.RelationPicker,diff --git a/front/src/modules/companies/components/CompanyBoardCard.tsx b/front/src/modules/companies/components/CompanyBoardCard.tsxindex e8e924612ea..85652feb29d 100644--- a/front/src/modules/companies/components/CompanyBoardCard.tsx+++ b/front/src/modules/companies/components/CompanyBoardCard.tsx@@ -12,7 +12,7 @@ import { isCardInCompactViewState } from '@/ui/layout/board/states/isCardInCompaimport { isCompactViewEnabledState } from '@/ui/layout/board/states/isCompactViewEnabledState';import { visibleBoardCardFieldsScopedSelector } from '@/ui/layout/board/states/selectors/visibleBoardCardFieldsScopedSelector';import { FieldContext } from '@/ui/object/field/contexts/FieldContext';-import { InlineCell } from '@/ui/object/record-inline-cell/components/InlineCell';+import { RecordInlineCell } from '@/ui/object/record-inline-cell/components/RecordInlineCell';import { InlineCellHotkeyScope } from '@/ui/object/record-inline-cell/types/InlineCellHotkeyScope';import { AnimatedEaseInOut } from '@/ui/utilities/animation/components/AnimatedEaseInOut';import { useRecoilScopedValue } from '@/ui/utilities/recoil-scope/hooks/useRecoilScopedValue';@@ -241,7 +241,7 @@ export const CompanyBoardCard = () => {hotkeyScope: InlineCellHotkeyScope.InlineCell,}}>- <InlineCell />+ <RecordInlineCell /></FieldContext.Provider></PreventSelectOnClickContainer>))}diff --git a/front/src/modules/metadata/components/RecordShowPage.tsx b/front/src/modules/metadata/components/RecordShowPage.tsxindex aba96ca5944..4c73d38812c 100644--- a/front/src/modules/metadata/components/RecordShowPage.tsx+++ b/front/src/modules/metadata/components/RecordShowPage.tsx@@ -17,7 +17,7 @@ import { ShowPageSummaryCard } from '@/ui/layout/show-page/components/ShowPageSuimport { ShowPageRecoilScopeContext } from '@/ui/layout/states/ShowPageRecoilScopeContext';import { FieldContext } from '@/ui/object/field/contexts/FieldContext';import { entityFieldsFamilyState } from '@/ui/object/field/states/entityFieldsFamilyState';-import { InlineCell } from '@/ui/object/record-inline-cell/components/InlineCell';+import { RecordInlineCell } from '@/ui/object/record-inline-cell/components/RecordInlineCell';import { PropertyBox } from '@/ui/object/record-inline-cell/property-box/components/PropertyBox';import { InlineCellHotkeyScope } from '@/ui/object/record-inline-cell/types/InlineCellHotkeyScope';import { PageTitle } from '@/ui/utilities/page-title/PageTitle';@@ -140,7 +140,7 @@ export const RecordShowPage = () => {hotkeyScope: InlineCellHotkeyScope.InlineCell,}}>- <InlineCell />+ <RecordInlineCell /></FieldContext.Provider>);})}diff --git a/front/src/modules/ui/object/record-inline-cell/components/InlineCell.tsx b/front/src/modules/ui/object/record-inline-cell/components/RecordInlineCell.tsxsimilarity index 94%rename from front/src/modules/ui/object/record-inline-cell/components/InlineCell.tsxrename to front/src/modules/ui/object/record-inline-cell/components/RecordInlineCell.tsxindex 54dff8f8519..0a3c667f930 100644--- a/front/src/modules/ui/object/record-inline-cell/components/InlineCell.tsx+++ b/front/src/modules/ui/object/record-inline-cell/components/RecordInlineCell.tsx@@ -12,9 +12,9 @@ import { FieldInputEvent } from '../../field/types/FieldInputEvent';import { isFieldRelation } from '../../field/types/guards/isFieldRelation';import { useInlineCell } from '../hooks/useInlineCell';-import { InlineCellContainer } from './InlineCellContainer';+import { RecordInlineCellContainer } from './RecordInlineCellContainer';-export const InlineCell = () => {+export const RecordInlineCell = () => {const { fieldDefinition } = useContext(FieldContext);const buttonIcon = useGetButtonIcon();@@ -59,7 +59,7 @@ export const InlineCell = () => {};return (- <InlineCellContainer+ <RecordInlineCellContainerbuttonIcon={buttonIcon}customEditHotkeyScope={isFieldRelation(fieldDefinition)diff --git a/front/src/modules/ui/object/record-inline-cell/components/InlineCellContainer.tsx b/front/src/modules/ui/object/record-inline-cell/components/RecordInlineCellContainer.tsxsimilarity index 86%rename from front/src/modules/ui/object/record-inline-cell/components/InlineCellContainer.tsxrename to front/src/modules/ui/object/record-inline-cell/components/RecordInlineCellContainer.tsxindex bec3102b6fe..c9dc9d16d16 100644--- a/front/src/modules/ui/object/record-inline-cell/components/InlineCellContainer.tsx+++ b/front/src/modules/ui/object/record-inline-cell/components/RecordInlineCellContainer.tsx@@ -8,9 +8,9 @@ import { HotkeyScope } from '@/ui/utilities/hotkey/types/HotkeyScope';import { useInlineCell } from '../hooks/useInlineCell';-import { InlineCellDisplayMode } from './InlineCellDisplayMode';-import { InlineCellButton } from './InlineCellEditButton';-import { InlineCellEditMode } from './InlineCellEditMode';+import { RecordInlineCellDisplayMode } from './RecordInlineCellDisplayMode';+import { RecordInlineCellButton } from './RecordInlineCellEditButton';+import { RecordInlineCellEditMode } from './RecordInlineCellEditMode';const StyledIconContainer = styled.div`align-items: center;@@ -40,7 +40,7 @@ const StyledValueContainer = styled.div``;const StyledLabel = styled.div<- Pick<InlineCellContainerProps, 'labelFixedWidth'>+ Pick<RecordInlineCellContainerProps, 'labelFixedWidth'>>`align-items: center;@@ -74,7 +74,7 @@ const StyledInlineCellBaseContainer = styled.div`width: 100%;`;-type InlineCellContainerProps = {+type RecordInlineCellContainerProps = {IconLabel?: IconComponent;label?: string;labelFixedWidth?: number;@@ -88,7 +88,7 @@ type InlineCellContainerProps = {disableHoverEffect?: boolean;};-export const InlineCellContainer = ({+export const RecordInlineCellContainer = ({IconLabel,label,labelFixedWidth,@@ -100,7 +100,7 @@ export const InlineCellContainer = ({editModeContentOnly,isDisplayModeFixHeight,disableHoverEffect,-}: InlineCellContainerProps) => {+}: RecordInlineCellContainerProps) => {const [isHovered, setIsHovered] = useState(false);const handleContainerMouseEnter = () => {@@ -141,28 +141,28 @@ export const InlineCellContainer = ({</StyledLabelAndIconContainer><StyledValueContainer>{isInlineCellInEditMode ? (- <InlineCellEditMode>{editModeContent}</InlineCellEditMode>+ <RecordInlineCellEditMode>{editModeContent}</RecordInlineCellEditMode>) : editModeContentOnly ? (<StyledClickableContainer>- <InlineCellDisplayMode+ <RecordInlineCellDisplayModedisableHoverEffect={disableHoverEffect}isDisplayModeContentEmpty={isDisplayModeContentEmpty}isDisplayModeFixHeight={isDisplayModeFixHeight}isHovered={isHovered}>{editModeContent}- </InlineCellDisplayMode>+ </RecordInlineCellDisplayMode></StyledClickableContainer>) : (<StyledClickableContainer onClick={handleDisplayModeClick}>- <InlineCellDisplayMode+ <RecordInlineCellDisplayModedisableHoverEffect={disableHoverEffect}isDisplayModeContentEmpty={isDisplayModeContentEmpty}isDisplayModeFixHeight={isDisplayModeFixHeight}isHovered={isHovered}>{displayModeContent}- </InlineCellDisplayMode>+ </RecordInlineCellDisplayMode>{showEditButton && (<StyledEditButtonContainerinitial={{ opacity: 0 }}@@ -170,7 +170,7 @@ export const InlineCellContainer = ({transition={{ duration: 0.1 }}whileHover={{ scale: 1.04 }}>- <InlineCellButton Icon={buttonIcon} />+ <RecordInlineCellButton Icon={buttonIcon} /></StyledEditButtonContainer>)}</StyledClickableContainer>diff --git a/front/src/modules/ui/object/record-inline-cell/components/InlineCellDisplayMode.tsx b/front/src/modules/ui/object/record-inline-cell/components/RecordInlineCellDisplayMode.tsxsimilarity index 75%rename from front/src/modules/ui/object/record-inline-cell/components/InlineCellDisplayMode.tsxrename to front/src/modules/ui/object/record-inline-cell/components/RecordInlineCellDisplayMode.tsxindex 941b2654da8..3233981f8d4 100644--- a/front/src/modules/ui/object/record-inline-cell/components/InlineCellDisplayMode.tsx+++ b/front/src/modules/ui/object/record-inline-cell/components/RecordInlineCellDisplayMode.tsx@@ -1,9 +1,9 @@import { css } from '@emotion/react';import styled from '@emotion/styled';-const StyledInlineCellNormalModeOuterContainer = styled.div<+const StyledRecordInlineCellNormalModeOuterContainer = styled.div<Pick<- InlineCellDisplayModeProps,+ RecordInlineCellDisplayModeProps,| 'isDisplayModeContentEmpty'| 'disableHoverEffect'| 'isDisplayModeFixHeight'@@ -32,7 +32,7 @@ const StyledInlineCellNormalModeOuterContainer = styled.div<}}`;-const StyledInlineCellNormalModeInnerContainer = styled.div`+const StyledRecordInlineCellNormalModeInnerContainer = styled.div`align-items: center;color: ${({ theme }) => theme.font.color.primary};font-size: 'inherit';@@ -50,32 +50,32 @@ const StyledEmptyField = styled.div`color: ${({ theme }) => theme.font.color.light};`;-type InlineCellDisplayModeProps = {+type RecordInlineCellDisplayModeProps = {isDisplayModeContentEmpty?: boolean;disableHoverEffect?: boolean;isDisplayModeFixHeight?: boolean;isHovered?: boolean;};-export const InlineCellDisplayMode = ({+export const RecordInlineCellDisplayMode = ({children,isDisplayModeContentEmpty,disableHoverEffect,isDisplayModeFixHeight,isHovered,-}: React.PropsWithChildren<InlineCellDisplayModeProps>) => (- <StyledInlineCellNormalModeOuterContainer+}: React.PropsWithChildren<RecordInlineCellDisplayModeProps>) => (+ <StyledRecordInlineCellNormalModeOuterContainerisDisplayModeContentEmpty={isDisplayModeContentEmpty}disableHoverEffect={disableHoverEffect}isDisplayModeFixHeight={isDisplayModeFixHeight}isHovered={isHovered}>- <StyledInlineCellNormalModeInnerContainer>+ <StyledRecordInlineCellNormalModeInnerContainer>{isDisplayModeContentEmpty || !children ? (<StyledEmptyField>{'Empty'}</StyledEmptyField>) : (children)}- </StyledInlineCellNormalModeInnerContainer>- </StyledInlineCellNormalModeOuterContainer>+ </StyledRecordInlineCellNormalModeInnerContainer>+ </StyledRecordInlineCellNormalModeOuterContainer>);diff --git a/front/src/modules/ui/object/record-inline-cell/components/InlineCellEditButton.tsx b/front/src/modules/ui/object/record-inline-cell/components/RecordInlineCellEditButton.tsxsimilarity index 86%rename from front/src/modules/ui/object/record-inline-cell/components/InlineCellEditButton.tsxrename to front/src/modules/ui/object/record-inline-cell/components/RecordInlineCellEditButton.tsxindex 63d7eb4708c..33a6c504e65 100644--- a/front/src/modules/ui/object/record-inline-cell/components/InlineCellEditButton.tsx+++ b/front/src/modules/ui/object/record-inline-cell/components/RecordInlineCellEditButton.tsx@@ -3,7 +3,7 @@ import { FloatingIconButton } from '@/ui/input/button/components/FloatingIconButimport { useInlineCell } from '../hooks/useInlineCell';-export const InlineCellButton = ({ Icon }: { Icon: IconComponent }) => {+export const RecordInlineCellButton = ({ Icon }: { Icon: IconComponent }) => {const { openInlineCell } = useInlineCell();const handleClick = () => {diff --git a/front/src/modules/ui/object/record-inline-cell/components/InlineCellEditMode.tsx b/front/src/modules/ui/object/record-inline-cell/components/RecordInlineCellEditMode.tsxsimilarity index 72%rename from front/src/modules/ui/object/record-inline-cell/components/InlineCellEditMode.tsxrename to front/src/modules/ui/object/record-inline-cell/components/RecordInlineCellEditMode.tsxindex 11a5da30dfa..6cd57f12361 100644--- a/front/src/modules/ui/object/record-inline-cell/components/InlineCellEditMode.tsx+++ b/front/src/modules/ui/object/record-inline-cell/components/RecordInlineCellEditMode.tsx@@ -1,6 +1,6 @@import styled from '@emotion/styled';-const StyledInlineCellEditModeContainer = styled.div<InlineCellEditModeProps>`+const StyledInlineCellEditModeContainer = styled.div<RecordInlineCellEditModeProps>`align-items: center;display: flex;@@ -22,11 +22,13 @@ const StyledInlineCellInput = styled.div`z-index: 10;`;-type InlineCellEditModeProps = {+type RecordInlineCellEditModeProps = {children: React.ReactNode;};-export const InlineCellEditMode = ({ children }: InlineCellEditModeProps) => (+export const RecordInlineCellEditMode = ({+ children,+}: RecordInlineCellEditModeProps) => (<StyledInlineCellEditModeContainer data-testid="inline-cell-edit-mode-container"><StyledInlineCellInput>{children}</StyledInlineCellInput></StyledInlineCellEditModeContainer>diff --git a/front/src/pages/companies/CompanyShow.tsx b/front/src/pages/companies/CompanyShow.tsxindex 5f1d12b92fc..ec02de3e91e 100644--- a/front/src/pages/companies/CompanyShow.tsx+++ b/front/src/pages/companies/CompanyShow.tsx@@ -17,7 +17,7 @@ import { ShowPageRightContainer } from '@/ui/layout/show-page/components/ShowPagimport { ShowPageSummaryCard } from '@/ui/layout/show-page/components/ShowPageSummaryCard';import { ShowPageRecoilScopeContext } from '@/ui/layout/states/ShowPageRecoilScopeContext';import { FieldContext } from '@/ui/object/field/contexts/FieldContext';-import { InlineCell } from '@/ui/object/record-inline-cell/components/InlineCell';+import { RecordInlineCell } from '@/ui/object/record-inline-cell/components/RecordInlineCell';import { PropertyBox } from '@/ui/object/record-inline-cell/property-box/components/PropertyBox';import { InlineCellHotkeyScope } from '@/ui/object/record-inline-cell/types/InlineCellHotkeyScope';import { PageTitle } from '@/ui/utilities/page-title/PageTitle';@@ -102,7 +102,7 @@ export const CompanyShow = () => {hotkeyScope: InlineCellHotkeyScope.InlineCell,}}>- <InlineCell />+ <RecordInlineCell /></FieldContext.Provider>);})}diff --git a/front/src/pages/people/PersonShow.tsx b/front/src/pages/people/PersonShow.tsxindex 140c9806c4b..16c1bbce982 100644--- a/front/src/pages/people/PersonShow.tsx+++ b/front/src/pages/people/PersonShow.tsx@@ -18,7 +18,7 @@ import { ShowPageRightContainer } from '@/ui/layout/show-page/components/ShowPagimport { ShowPageSummaryCard } from '@/ui/layout/show-page/components/ShowPageSummaryCard';import { ShowPageRecoilScopeContext } from '@/ui/layout/states/ShowPageRecoilScopeContext';import { FieldContext } from '@/ui/object/field/contexts/FieldContext';-import { InlineCell } from '@/ui/object/record-inline-cell/components/InlineCell';+import { RecordInlineCell } from '@/ui/object/record-inline-cell/components/RecordInlineCell';import { PropertyBox } from '@/ui/object/record-inline-cell/property-box/components/PropertyBox';import { InlineCellHotkeyScope } from '@/ui/object/record-inline-cell/types/InlineCellHotkeyScope';import { PageTitle } from '@/ui/utilities/page-title/PageTitle';@@ -128,7 +128,7 @@ export const PersonShow = () => {}}key={person.id + fieldDefinition.label}>- <InlineCell />+ <RecordInlineCell /></FieldContext.Provider>);})}