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

fix: view group followup #9162

Merged
merged 28 commits into from
Jan 2, 2025
Merged

fix: view group followup #9162

merged 28 commits into from
Jan 2, 2025

Conversation

magrinj
Copy link
Member

@magrinj magrinj commented Dec 20, 2024

This PR fixes all followup that @Bonapara add on Discord.

  • When no group by is set, clicking on group by should open the "field selection" menu
  • When closed, chevron should be "chevron-right" instead of "chevron-up"
  • Sort : Add ability to switch from alphabetical to manual when moving a option in sort alphabetical
  • Add subtext for group by and sort
  • Group by menu display bug
  • Changing the sort should not close the menu
  • Group by Activation -> shows empty state + is slow
  • Switching from Kanban view Settings to Table Options menu displays an empty menu
  • Unnecessary spacing under groups
  • When no "select" are set on an object, redirect the user directly to the new Select field page
  • Sort : Default should be manual
  • Hidding "no value" displays all options and remove the "hide empty group" toggle
  • Hide Empty group option disappeared
  • Group by should not be persisted on "Locked/Main view" (For now we just disable the group by on main view)
  • Hide Empty group should not be activated by default on Opportunities Kanban view
  • Animate the group opening/closing (We'll be done later)

Performance improvement:
https://github.com/user-attachments/assets/fd2acf66-0e56-45d0-8b2f-99c62e57d6f7
https://github.com/user-attachments/assets/80f1a2e1-9f77-4923-b85d-acb9cad96886

Also fix #9036

@magrinj magrinj marked this pull request as ready for review December 20, 2024 09:58
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 PR implements significant improvements to the group by and sort functionalities in Twenty's record management system. The changes focus on fixing UI/UX issues and enhancing performance.

  • Switched from component selectors to family selectors for record groups with explicit view type parameters, improving state management granularity and performance
  • Added confirmation modal for switching from alphabetical to manual sorting when reordering groups, with proper state handling via recordGroupPendingDragEndReorderState
  • Implemented view-specific behavior for hiding empty groups using recordIndexRecordGroupHideComponentFamilyState, with different defaults for Table (hidden) and Kanban (visible) views
  • Improved dropdown menu interactions by keeping menus open during sort changes and adding contextual text for group by and sort options
  • Optimized view group persistence by replacing individual Apollo mutations with batch operations for better performance

32 file(s) reviewed, 13 comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Collaborator

@ijreilly ijreilly left a comment

Choose a reason for hiding this comment

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

Some remarks :)

1 - I observed a weird behaviour when creating a view group from an empty records page:
https://github.com/user-attachments/assets/26d4aa3f-6556-4bf4-8cd8-3638f1aaf719

2 - nit but in the dropdown on Sort, when opening the Ascending / Descending dropdown, the submenu is "merged" with the bigger dropdown, maybe not intended?
https://github.com/user-attachments/assets/56dacc61-a0df-498f-98a0-222e51b0841f

/>
)}
{(viewType === ViewType.Kanban || isViewGroupEnabled) &&
currentView?.key !== 'INDEX' && (
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we have this change ? I can't see the group by option from the table view, had to remove it to be able to create a view group

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh I see, it is to disable the option from the main view right ?
I feel this may prevent users from discovering the feature. Instead I would create a new view when selecting group by. wdyt @Bonapara ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Bonapara not sure you have seen this comment, would just like to double check that it is the intended behaviour

Copy link
Member Author

Choose a reason for hiding this comment

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

@ijreilly It was actually decided on Discord with @charlesBochet to go that way for now

@magrinj magrinj force-pushed the fix/view-group-followup branch from 5598091 to c74f477 Compare December 30, 2024 13:24
Copy link
Collaborator

@ijreilly ijreilly left a comment

Choose a reason for hiding this comment

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

Some issues

  1. Change in ScrollWrapper breaks needed scroll in some pages (see comments)

  2. Issue with the visible groups (see comments)

  3. Dropdown UI feels a bit weird: ultimate dropdown content is smaller than previously while it does not allow to see the options well (in the recording, "employees"), + there is a big white space under "Create select field"
    https://github.com/user-attachments/assets/437313c3-d388-4d2d-8b3c-aa63c661b6ad

  4. maybe not very important but:
    I think the behaviour for empty record pages is still weird. I disabled "hide empty groups' but they only show when clicking '+'.
    I understand though that we usually have our empty record pages that we want to show. Not sure what is the right behaviour then, but it does will a bit weird design-wise:
    https://github.com/user-attachments/assets/93f0a2bf-87f5-4643-95cf-2802a91b7126

@magrinj magrinj force-pushed the fix/view-group-followup branch from b0723bb to 7cb6073 Compare December 31, 2024 14:10
@lucasbordeau lucasbordeau self-assigned this Jan 2, 2025
@magrinj magrinj merged commit 0f1458c into main Jan 2, 2025
23 checks passed
@magrinj magrinj deleted the fix/view-group-followup branch January 2, 2025 15:40
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.

[Timebox] Record group create new record issue
5 participants