Remove cell hotkey scope (#11435)

Remove FieldContext hotkey scope as:
- each Field should set its own hotkey scope (ex:
emails-field-input-{recordId} or emails-field-input for now)
- while opening a fieldInput, we should synchronously set the
corresponding hotkey scope

To cut this refactoring in half, I'm allowing all input to use
TableHotkeyScope.CellEditMode
This commit is contained in:
Charles Bochet
2025-04-08 11:18:23 +02:00
committed by GitHub
parent 3d90eb4eb9
commit 17474a0e1e
98 changed files with 316 additions and 416 deletions

View File

@ -11,10 +11,10 @@ import { RecordFieldComponentInstanceContext } from '@/object-record/record-fiel
import { RecordInlineCell } from '@/object-record/record-inline-cell/components/RecordInlineCell';
import { PropertyBox } from '@/object-record/record-inline-cell/property-box/components/PropertyBox';
import { getRecordFieldInputId } from '@/object-record/utils/getRecordFieldInputId';
import { mapArrayToObject } from '~/utils/array/mapArrayToObject';
import { beautifyPastDateRelativeToNow } from '~/utils/date-utils';
import { Chip, ChipAccent, ChipSize, ChipVariant } from 'twenty-ui/components';
import { IconCalendarEvent } from 'twenty-ui/display';
import { mapArrayToObject } from '~/utils/array/mapArrayToObject';
import { beautifyPastDateRelativeToNow } from '~/utils/date-utils';
type CalendarEventDetailsProps = {
calendarEvent: CalendarEvent;
@ -97,7 +97,6 @@ export const CalendarEventDetails = ({
<FieldContext.Provider
value={{
recordId: calendarEvent.id,
hotkeyScope: 'calendar-event-details',
isLabelIdentifier: false,
fieldDefinition: formatFieldMetadataItemAsFieldDefinition({
field: fieldsByName[fieldName],