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

Cleanup and Refactoring after SelectField and SortableSelect Component Improvements #1919

Open
7 tasks
HussainTaj-arbisoft opened this issue Aug 15, 2023 · 0 comments

Comments

@HussainTaj-arbisoft
Copy link
Contributor

This GitHub issue encompasses the cleanup and refactoring tasks following the recent enhancements made to the SelectField and SortableSelect components, as documented in issue #1863. These improvements, controlled through environment feature flags, involve streamlining the codebase, removing obsolete elements, and updating related code to ensure a more efficient and maintainable codebase.

Description

We have recently introduced improvements to the SelectField and SortableSelect components, detailed in issue #1863. These changes have introduced several environment feature flags to control various aspects of these components. As we progress towards deploying these enhancements to production and validating their effectiveness, it's essential to initiate a cleanup and refactoring phase to ensure a streamlined and optimized codebase.

Tasks

  1. Remove Feature Flags and Conditional Logic

    • Remove the following feature flags:
      • FEATURE_SELECT_FIELD_INFINITE_SCROLL
      • FEATURE_SORTABLE_SELECT_PRESERVE_SEARCH_TEXT
      • FEATURE_SORTABLE_SELECT_HIDE_SELECTED
      • FEATURE_SORTABLE_SELECT_QUICK_ADD
    • Eliminate any conditional logic that was associated with the removed feature flags.
  2. Obsolete Code Removal

    • Delete the deprecated AsyncSelect component.
    • Remove the Add button from the SortableSelect component.
  3. Interface and Hook Updates

    • Evaluate and either remove or update the Additional interface as needed.
    • Revise the useWebsiteSelectOptions hook to eliminate the need for additional.callback.
  4. Test Refactoring

    • Refactor tests for SelectField, SortableSelect, and WebsiteCollectionField to align with the changes.
  5. isFeatureEnabled Function Review

    • If applicable, review and remove the isFeatureEnabled function, considering its relevance in light of potential future changes like a transition to LaunchDarkly.
  6. Code Analysis

    • Conduct a thorough code analysis to identify and address any other instances of code that have become inactive due to the removal of flags and components.

Acceptance Criteria

  • Feature flags and associated conditional logic are successfully removed.
  • Obsolete components (AsyncSelect, Add button) are eradicated.
  • The Additional interface is either removed or updated appropriately.
  • The useWebsiteSelectOptions hook no longer relies on additional.callback.
  • Test suites for affected components are effectively refactored.
  • If applicable, the necessity of the isFeatureEnabled function is re-evaluated.
  • The codebase is analyzed for any additional relevant redundant code or dead paths.

For reference, please consult the associated pull request #1888.

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

No branches or pull requests

1 participant