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

Removed useFilterDropdown hook #9537

Conversation

lucasbordeau
Copy link
Contributor

Removed useFilterDropdown hook and its many calls which were only exporting states.

The test has been removed because it was used to do the equivalent of testing Recoil states, so it wasn't useful anymore.

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 significantly refactors the filter dropdown state management across multiple components by removing the useFilterDropdown hook in favor of direct Recoil state management.

  • Replaces useFilterDropdown hook with direct Recoil V2 component state hooks (useRecoilComponentValueV2, useSetRecoilComponentStateV2) across 20+ components
  • Introduces new useEmptyRecordFilter hook to handle filter state reset functionality
  • Removes useFilterDropdown.test.tsx as it was primarily testing Recoil state management
  • Replaces emptyFilterButKeepDefinition with emptyRecordFilter in components like ObjectFilterDropdownRecordRemoveFilterMenuItem
  • Potential concern with type safety in ObjectFilterDropdownDateInput where filter definition type casting was removed

26 file(s) reviewed, 6 comment(s)
Edit PR Review Bot Settings | Greptile

@charlesBochet charlesBochet merged commit e58edc3 into main Jan 10, 2025
21 of 23 checks passed
@charlesBochet charlesBochet deleted the refactor/removed-use-filter-dropdown-hook-and-V1-state-management branch January 10, 2025 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants