The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Align field values with fixed width for field key. (#5821)
marteenaf6d7782eb5a7d
diff --git a/packages/twenty-front/src/modules/activities/inline-cell/components/ActivityTargetsInlineCell.tsx b/packages/twenty-front/src/modules/activities/inline-cell/components/ActivityTargetsInlineCell.tsxindex 7971a5a8f8a..2755acefd1c 100644--- a/packages/twenty-front/src/modules/activities/inline-cell/components/ActivityTargetsInlineCell.tsx+++ b/packages/twenty-front/src/modules/activities/inline-cell/components/ActivityTargetsInlineCell.tsx@@ -1,3 +1,4 @@+import { useContext } from 'react';import { Key } from 'ts-key-enum';import { IconArrowUpRight, IconPencil } from 'twenty-ui';@@ -6,6 +7,7 @@ import { useActivityTargetObjectRecords } from '@/activities/hooks/useActivityTaimport { ActivityTargetInlineCellEditMode } from '@/activities/inline-cell/components/ActivityTargetInlineCellEditMode';import { Activity } from '@/activities/types/Activity';import { ActivityEditorHotkeyScope } from '@/activities/types/ActivityEditorHotkeyScope';+import { FieldContext } from '@/object-record/record-field/contexts/FieldContext';import { FieldFocusContextProvider } from '@/object-record/record-field/contexts/FieldFocusContextProvider';import { RecordFieldInputScope } from '@/object-record/record-field/scopes/RecordFieldInputScope';import { RecordInlineCellContainer } from '@/object-record/record-inline-cell/components/RecordInlineCellContainer';@@ -29,6 +31,8 @@ export const ActivityTargetsInlineCell = ({useActivityTargetObjectRecords(activity);const { closeInlineCell } = useInlineCell();+ const { fieldDefinition } = useContext(FieldContext);+useScopedHotkeys(Key.Escape,() => {@@ -48,6 +52,7 @@ export const ActivityTargetsInlineCell = ({IconLabel={showLabel ? IconArrowUpRight : undefined}showLabel={showLabel}readonly={readonly}+ labelWidth={fieldDefinition?.labelWidth}editModeContent={<ActivityTargetInlineCellEditModeactivity={activity}diff --git a/packages/twenty-front/src/modules/object-record/hooks/useFieldContext.tsx b/packages/twenty-front/src/modules/object-record/hooks/useFieldContext.tsxindex 84095a34174..cbd002af74a 100644--- a/packages/twenty-front/src/modules/object-record/hooks/useFieldContext.tsx+++ b/packages/twenty-front/src/modules/object-record/hooks/useFieldContext.tsx@@ -72,6 +72,7 @@ export const useFieldContext = ({showLabel: true,position: fieldPosition,objectMetadataItem,+ labelWidth: 90,}),useUpdateRecord:customUseUpdateOneObjectHook ?? useUpdateOneObjectMutation,