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

Refactored object filter dropdown states #9507

Merged
merged 3 commits into from
Jan 9, 2025

Conversation

lucasbordeau
Copy link
Contributor

Refactored object filter dropdown states while keeping the existing structure to avoid creating a big PR.

The goal is to extract each sub hook returned by the useFilterDropdown hook and create a PR for each function and the associated refactor for the dependent zones in the code, so that we proceed by small increments.

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 refactors the object filter dropdown state management by modernizing component state handling and improving naming conventions across multiple files.

  • Replaced createComponentState with createComponentStateV2 across all state files, adding explicit ObjectFilterDropdownComponentInstanceContext
  • Removed ObjectFilterDropdownScopeInternalContext in favor of simplified context management
  • Renamed scopeId to componentInstanceId throughout for better clarity
  • Replaced extractComponentState utility with direct atomFamily calls in useFilterDropdownStates
  • Streamlined state management by removing redundant context layers while maintaining functionality

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

@charlesBochet charlesBochet merged commit f44d99d into main Jan 9, 2025
21 of 23 checks passed
@charlesBochet charlesBochet deleted the refactor/record-filter-states branch January 9, 2025 17:18
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