Skip to content
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

Merged
merged 37 commits into from
Oct 24, 2024
Merged

feat: view groups #7176

merged 37 commits into from
Oct 24, 2024

Conversation

magrinj
Copy link
Member

@magrinj magrinj commented Sep 20, 2024

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:

  1. ViewGroup Entity:
    The newly added ViewGroup entity is responsible for handling the organization and state of columns.
    This includes:
    • The ability to reorder columns.
    • The option to hide or show specific columns based on user preferences.

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.

Copy link

github-actions bot commented Sep 26, 2024

TODOs/FIXMEs:

  • // TODO: we should make sure there's no way to have a mismatch between columnIds and possibleKanbanSelectFieldValues order: packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexBoardDataLoader.tsx
  • // FixMe: Why do we have 2 useEffects for setFieldDefinitions?: packages/twenty-front/src/modules/object-record/record-index/components/RecordIndexBoardDataLoaderEffect.tsx

Generated by 🚫 dangerJS against 7615d50

@charlesBochet
Copy link
Member

I will close this one as it's not ready yet, let's re-open it next week!

@magrinj magrinj reopened this Oct 14, 2024
Comment on lines +151 to +155
// 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;
// }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To determine during testing

@magrinj magrinj marked this pull request as ready for review October 15, 2024 14:42
Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 to CoreObjectNameSingular 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 replace RecordBoardColumnDefinition
  • Updated RecordIndexOptionsDropdownContent with new menu items for view group management
  • Removed isFirstColumnFamilyState and isLastColumnFamilyState, simplifying column management

30 file(s) reviewed, 28 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +151 to +155
// 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;
// }
Copy link
Contributor

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

Comment on lines 72 to 75
// FixMe: Why do we have 2 useEffects for setFieldDefinitions?
useEffect(() => {
setFieldDefinitions(recordIndexFieldDefinitions);
}, [objectMetadataItem, setFieldDefinitions, recordIndexFieldDefinitions]);
Copy link
Contributor

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.

@magrinj magrinj removed the -PR: wip label Oct 16, 2024
@lucasbordeau lucasbordeau self-requested a review October 23, 2024 09:08
@FelixMalfait FelixMalfait merged commit e8d96cf into main Oct 24, 2024
18 checks passed
@FelixMalfait FelixMalfait deleted the feat/view-groups branch October 24, 2024 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update the Kanban column menu
4 participants