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

Treat no value view group as normal & enable hide/dnd for no value #8613

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

khuddite
Copy link
Contributor

@khuddite khuddite commented Nov 20, 2024

Fixes #8591

  1. Summary
    We disabled hide/dnd(drag-and-drop) options for No value view group intentionally in the first implementation. We want to change it to behave like normal view groups, so enable hide/dnd for No value view group as well.

  2. Solution
    I have removed the code that filters the No value group out of view groups, so No value is stored in the same array as other view groups. I have removed the No value flag check for Hide button on the hamburger menu of the Kanban header. I had to update the code in packages/twenty-front/src/modules/views/utils/mapViewGroupsToRecordGroupDefinitions.ts because it was ignoring the visibility flag of the No value view group and set it always to true. Also, it was always putting the No value group last ignoring the previous position.

I am not 100% confident in the changes I made in packages/twenty-front/src/modules/views/utils/mapViewGroupsToRecordGroupDefinitions.ts. I'd like to have a review from someone more familiar with that part.

  1. Recording
    https://github.com/user-attachments/assets/e135e22e-6e3a-4f94-a898-aafc03bba060

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 modifies the handling of 'No Value' groups in the Kanban view to treat them as regular view groups, enabling hide and drag-and-drop functionality that was previously disabled.

  • Modified mapViewGroupsToRecordGroupDefinitions.ts to respect visibility and position settings for 'No Value' groups
  • Removed special filtering of 'No Value' groups in ViewGroupsVisibilityDropdownSection.tsx for consistent group handling
  • Removed conditional check in useRecordGroupActions.ts that prevented hiding 'No Value' groups
  • Updated group sorting to use position values for all groups including 'No Value'

3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Copy link
Contributor

@bosiraphael bosiraphael left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for your contribution @khuddite

@bosiraphael bosiraphael merged commit dfb966d into twentyhq:main Nov 26, 2024
17 checks passed
Copy link

Thanks @khuddite for your contribution!
This marks your 10th PR on the repo. You're top 4% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

charlesBochet pushed a commit that referenced this pull request Nov 28, 2024
Fix #8758 

This PR is migrating the recoil component state from v1 to v2 for board.
It also now share some states and logics between board and table,
further can be done later.
Lastly this PR fix an issue since the PR #8613 that was treating
no-value as a normal record-group.
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.

cannot hide or move No Value for custom stage field on kanban view
2 participants