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: hide empty record group default true #9090

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

magrinj
Copy link
Member

@magrinj magrinj commented Dec 16, 2024

Fix #8969

Previously we were putting hide default record group to false in record group mode.
Also the mode was saved in the current view by changing the visibility boolean of each record group.
As we want to hide by default, this PR instead is using a different logic so it's totally based on the front-end side.

@magrinj magrinj marked this pull request as ready for review December 16, 2024 15:52
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

Changes visibility management for empty record groups by setting default hide state to true and simplifying the logic to use frontend-only toggle state instead of persisting visibility in views.

  • Changed default value to true in recordIndexRecordGroupHideComponentState.ts to hide empty groups by default
  • Added empty group check in visibleRecordGroupIdsComponentSelector.ts using recordIds.length === 0 condition
  • Simplified visibility toggle in useRecordGroupVisibility.ts by removing complex state management and view persistence
  • Removed redundant visibility check in visibleRecordGroupIdsComponentSelector.ts that could cause maintenance issues

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

@charlesBochet
Copy link
Member

@magrinj Code looks great

Testing the functionality:

  • I go to Opportunities > Table View
  • I click on Kanban View

Page is blank:
image

Then I go to Option > Untoggle hide groups ==> works as expected, Toggle hide groups ==> works as expected

So maybe an issue in initial loading

@charlesBochet charlesBochet merged commit 1851bb8 into main Dec 17, 2024
22 checks passed
@charlesBochet charlesBochet deleted the feat/hide-empty-record-group branch December 17, 2024 10:54
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.

Record group set hide empty group option to true as default
2 participants