-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 re render view groups #9098
Conversation
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 PR optimizes record group visibility handling and reduces unnecessary re-renders in the view groups functionality.
- Changed default value in
recordIndexRecordGroupHideComponentState.ts
to hide empty record groups by default - Simplified visibility state management in
useRecordGroupVisibility.ts
by removing complex state handling - Replaced dynamic UUID with static ID
20202020-c05f-46c9-ae1e-2b3c5c702049
for 'No Value' column inmapViewGroupsToRecordGroupDefinitions.ts
- Switched from
viewSorts
to directrecordIndexSortsState
usage in drag-and-drop context - Fixed redundant visibility checks in
visibleRecordGroupIdsComponentSelector.ts
6 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
@@ -65,7 +64,7 @@ export const mapViewGroupsToRecordGroupDefinitions = ({ | |||
); | |||
|
|||
const noValueColumn = { | |||
id: viewGroup?.id ?? v4(), | |||
id: viewGroup?.id ?? '20202020-c05f-46c9-ae1e-2b3c5c702049', |
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: Using a hardcoded UUID could cause collisions if multiple instances of this component exist simultaneously. Consider using a more unique identifier pattern or documenting this limitation.
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.
stunning...
@@ -65,7 +64,7 @@ export const mapViewGroupsToRecordGroupDefinitions = ({ | |||
); | |||
|
|||
const noValueColumn = { | |||
id: viewGroup?.id ?? v4(), | |||
id: viewGroup?.id ?? '20202020-c05f-46c9-ae1e-2b3c5c702049', |
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.
This is going to cause conflict issues on the backend side if a view group with this id already exist
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.
Good point, as we introduce /backfill noValue groups in backend this will only be use for smooth migrations during 0.40 release. I think it's fine :)
No description provided.