-
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
7665 handle the select all case inside the action menu #7742
7665 handle the select all case inside the action menu #7742
Conversation
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 implements the 'select all' functionality in the action menu and modifies the context store structure to accommodate this change. Key updates include:
- Introduced new
contextStoreTargetedRecordsState
withselectedRecords
andexcludedRecords
properties - Added
useContextStoreSelectedRecords
hook to handle the new state structure - Updated
RecordActionMenuEntriesSetter
to use the new hook for record selection - Modified
DeleteRecordsActionEffect
,ExportRecordsActionEffect
, andManageFavoritesActionEffect
to work with the new state - Renamed
turnObjectDropdownFilterIntoQueryFilter
toturnFiltersIntoQueryFilter
and updated its implementation - Refactored
useRecordData
(formerlyuseTableData
) to handle the new context store structure - Updated
RecordIndexContainer
and related components to use the newActionMenu
component
30 file(s) reviewed, 29 comment(s)
Edit PR Review Bot Settings | Greptile
...nt/src/modules/action-menu/actions/record-actions/components/ManageFavoritesActionEffect.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/action-menu/components/ActionMenu.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/action-menu/components/ActionMenuBar.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/context-store/hooks/useContextStoreSelectedRecords.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/context-store/hooks/useContextStoreSelectedRecords.ts
Outdated
Show resolved
Hide resolved
...-front/src/modules/object-record/record-index/components/RecordIndexTableContainerEffect.tsx
Outdated
Show resolved
Hide resolved
...s/twenty-front/src/modules/object-record/record-index/hooks/useLoadRecordIndexBoardColumn.ts
Show resolved
Hide resolved
...s/twenty-front/src/modules/object-record/record-index/hooks/useLoadRecordIndexBoardColumn.ts
Show resolved
Hide resolved
packages/twenty-front/src/modules/object-record/record-index/hooks/useLoadRecordIndexTable.ts
Show resolved
Hide resolved
packages/twenty-front/src/modules/object-record/record-index/options/hooks/useRecordData.ts
Outdated
Show resolved
Hide resolved
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.
@bosiraphael tried locally with more records and delete does not work as expected (only findMany on the first page and does not trigger a delete), I'll let you check!
packages/twenty-front/src/modules/context-store/hooks/useContextStoreSelectedRecords.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/context-store/hooks/useContextStoreSelectedRecords.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/context-store/hooks/useContextStoreSelectedRecords.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/object-record/record-index/options/hooks/useRecordData.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/context-store/states/contextStoreTargetedRecordsState.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/context-store/hooks/useContextStoreSelectedRecords.ts
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/context-store/hooks/useContextStoreSelectedRecords.ts
Outdated
Show resolved
Hide resolved
.../object-record/record-filter/utils/__tests__/turnObjectDropdownFilterIntoQueryFilter.test.ts
Show resolved
Hide resolved
...wenty-front/src/modules/object-record/record-index/components/RecordIndexContainerEffect.tsx
Outdated
Show resolved
Hide resolved
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.
LGTM!
Closes #7665