-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Clean up object record filter #9550
Conversation
885ffd7
to
f0074a2
Compare
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 refactors the object filter dropdown state management across the application, moving from a scope-based context approach to direct Recoil component state management.
- Removed
ObjectFilterDropdownScope
component and associated hooks (useFilterDropdown
,useFilterDropdownStates
,useSetFilterDefinitionUsedInDropdownInScope
) in favor of directObjectFilterDropdownComponentInstanceContext.Provider
- Replaced
useRecoilValue
withuseRecoilComponentValueV2
for more granular state management across filter components - Migrated filter state management from centralized hooks to individual component-level Recoil states
- Standardized state access patterns by using component-specific state atoms instead of shared hooks
- Simplified component hierarchy by removing redundant context providers while maintaining functionality
35 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile
<AdvancedFilterViewFilterFieldSelect viewFilterId={filter.id} /> | ||
<AdvancedFilterViewFilterOperandSelect viewFilterId={filter.id} /> |
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 filter.id here but viewFilterId was passed as prop - ensure these IDs are always equivalent
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: Deleting core state management code. Make sure there are replacement mechanisms in place for all these filter states to maintain functionality.
newFilter.id, | ||
filterDefinition, | ||
); | ||
selectFilterDefinitionUsedInDropdown({ filterDefinition }); |
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: selectFilterDefinitionUsedInDropdown is called before checking if it succeeded
Last clean up of object dropdown filter states v1.
Removed old state scope context component.