-
Notifications
You must be signed in to change notification settings - Fork 4
Description
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
-
Remove Feature Flags and Conditional Logic
- Remove the following feature flags:
FEATURE_SELECT_FIELD_INFINITE_SCROLLFEATURE_SORTABLE_SELECT_PRESERVE_SEARCH_TEXTFEATURE_SORTABLE_SELECT_HIDE_SELECTEDFEATURE_SORTABLE_SELECT_QUICK_ADD
- Eliminate any conditional logic that was associated with the removed feature flags.
- Remove the following feature flags:
-
Obsolete Code Removal
- Delete the deprecated
AsyncSelectcomponent. - Remove the
Addbutton from theSortableSelectcomponent.
- Delete the deprecated
-
Interface and Hook Updates
- Evaluate and either remove or update the
Additionalinterface as needed. - Revise the
useWebsiteSelectOptionshook to eliminate the need foradditional.callback.
- Evaluate and either remove or update the
-
Test Refactoring
- Refactor tests for
SelectField,SortableSelect, andWebsiteCollectionFieldto align with the changes.
- Refactor tests for
-
isFeatureEnabledFunction Review- If applicable, review and remove the
isFeatureEnabledfunction, considering its relevance in light of potential future changes like a transition to LaunchDarkly.
- If applicable, review and remove the
-
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,Addbutton) are eradicated. - The
Additionalinterface is either removed or updated appropriately. - The
useWebsiteSelectOptionshook no longer relies onadditional.callback. - Test suites for affected components are effectively refactored.
- If applicable, the necessity of the
isFeatureEnabledfunction 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.