-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat: view groups #7176
feat: view groups #7176
Conversation
TODOs/FIXMEs:
|
I will close this one as it's not ready yet, let's re-open it next week! |
717c834
to
866216d
Compare
866216d
to
b11be8d
Compare
packages/twenty-front/src/modules/object-record/record-board/components/RecordBoard.tsx
Show resolved
Hide resolved
// FixMe: Check if we really need this as it depends on the times it takes to update the view groups | ||
// if (isPersistingViewGroups) { | ||
// // TODO: Add skeleton state | ||
// return null; | ||
// } |
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.
To determine during testing
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 pull request introduces the new 'ViewGroup' entity to enhance Kanban view functionality, allowing users to reorder, hide, and show columns. The changes implement a more flexible and customizable column management system.
- Added
ViewGroup
toCoreObjectNameSingular
enum in metadata types - Implemented
useRecordGroupActions
hook for 'Edit' and 'Hide' actions on columns - Created
useRecordGroupReorder
hook to handle drag-and-drop reordering of columns - Introduced
RecordGroupDefinition
type to replaceRecordBoardColumnDefinition
- Updated
RecordIndexOptionsDropdownContent
with new menu items for view group management - Removed
isFirstColumnFamilyState
andisLastColumnFamilyState
, simplifying column management
30 file(s) reviewed, 28 comment(s)
Edit PR Review Bot Settings | Greptile
packages/twenty-front/src/modules/object-record/record-board/components/RecordBoard.tsx
Show resolved
Hide resolved
// FixMe: Check if we really need this as it depends on the times it takes to update the view groups | ||
// if (isPersistingViewGroups) { | ||
// // TODO: Add skeleton state | ||
// return null; | ||
// } |
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: Remove or implement the commented code for persisting view groups
packages/twenty-front/src/modules/object-record/record-board/components/RecordBoard.tsx
Outdated
Show resolved
Hide resolved
...enty-front/src/modules/object-record/record-board/hooks/internal/useSetRecordBoardColumns.ts
Show resolved
Hide resolved
.../src/modules/object-record/record-board/record-board-column/components/RecordBoardColumn.tsx
Outdated
Show resolved
Hide resolved
...wenty-front/src/modules/object-record/record-index/components/RecordIndexBoardDataLoader.tsx
Show resolved
Hide resolved
...wenty-front/src/modules/object-record/record-index/components/RecordIndexBoardDataLoader.tsx
Show resolved
Hide resolved
...front/src/modules/object-record/record-index/components/RecordIndexBoardDataLoaderEffect.tsx
Show resolved
Hide resolved
// FixMe: Why do we have 2 useEffects for setFieldDefinitions? | ||
useEffect(() => { | ||
setFieldDefinitions(recordIndexFieldDefinitions); | ||
}, [objectMetadataItem, setFieldDefinitions, recordIndexFieldDefinitions]); |
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.
logic: Duplicate useEffect for setFieldDefinitions. Consider consolidating or removing one of these effects.
Fix #4244 and #4356
This pull request introduces the new "view groups" capability, enabling the reordering, hiding, and showing of columns in Kanban mode. The core enhancement includes the addition of a new entity named
ViewGroup
, which manages column behaviors and interactions.Key Changes:
The newly added
ViewGroup
entity is responsible for handling the organization and state of columns.This includes:
Conclusion:
This PR adds a significant new feature that enhances the flexibility of Kanban views through the
ViewGroup
entity.We'll later add the view group logic to table view too.