-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade relation picker #8795
Upgrade relation picker #8795
Conversation
d6e13ae
to
29b0fce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR undertakes a significant refactoring effort to standardize terminology and improve state management in the relation picker components, replacing 'relation/entity' with 'record' and moving from scoped states to component-level state management.
- Replaces
RelationPickerScope
withRecordPickerComponentInstanceContext.Provider
for more direct state management - Introduces new component states (
recordPickerSearchFilterComponentState
,recordPickerPreselectedIdComponentState
) to replace scoped states - Renames
SingleEntitySelect
toSingleRecordSelect
and related components for consistent terminology - Inconsistent naming remains in some files where 'relation' or 'entity' terms are still used (e.g.,
selectedEntities
inRecordsForMultipleRecordSelect
) - Potential issue with
instanceId
still using 'relation-picker' value inRecordPickerDecorator
60 file(s) reviewed, 37 comment(s)
Edit PR Review Bot Settings | Greptile
...nty-front/src/modules/activities/inline-cell/components/ActivityTargetInlineCellEditMode.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/object-metadata/components/ObjectMetadataItemsProvider.tsx
Outdated
Show resolved
Hide resolved
...bject-record/record-board/record-board-column/components/RecordBoardColumnNewOpportunity.tsx
Outdated
Show resolved
Hide resolved
...enty-front/src/modules/object-record/record-board/record-board-column/hooks/useAddNewCard.ts
Show resolved
Hide resolved
packages/twenty-front/src/modules/object-record/utils/getRecordChipGenerators.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/search/hooks/__tests__/useFilteredSearchEntityQuery.test.tsx
Show resolved
Hide resolved
packages/twenty-front/src/modules/search/hooks/useFilteredSearchEntityQuery.ts
Show resolved
Hide resolved
// TODO: use this for all search queries, because we need selectedRecords and recordsToSelect each time we want to search | ||
// Filtered entities to select are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: comment still refers to 'entities' but should use 'records' terminology. Also line 10 appears to be an incomplete comment
packages/twenty-front/src/testing/decorators/RecordPickerDecorator.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/object-record/utils/getRecordChipGenerators.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/object-record/utils/getRecordChipGenerators.ts
Outdated
Show resolved
Hide resolved
...wenty-front/src/modules/object-record/relation-picker/hooks/useRecordPickerRecordsOptions.ts
Outdated
Show resolved
Hide resolved
...ages/twenty-front/src/modules/object-record/relation-picker/components/MultiRecordSelect.tsx
Show resolved
Hide resolved
...elation-picker/components/ActivityTargetInlineCellEditModeMultiRecordsSearchFilterEffect.tsx
Show resolved
Hide resolved
...ect-record/relation-picker/components/ActivityTargetInlineCellEditModeMultiRecordsEffect.tsx
Show resolved
Hide resolved
...rd/record-field/meta-types/input/components/RelationFromManyFieldInputMultiRecordsEffect.tsx
Show resolved
Hide resolved
414b586
to
dd73369
Compare
dd73369
to
47002be
Compare
47002be
to
8baf160
Compare
This PR prepares the use of the record picker in workflows