chore: Remove unecessary code from async and sync select components#20690
Conversation
Changed files to reference AsyncSelect if needed
…LDN-1484-Split-Select-Component-into-Async-and-Sync-Components
…LDN-1484-Split-Select-Component-into-Async-and-Sync-Components
…c-and-Sync-Components
…LDN-1484-Split-Select-Component-into-Async-and-Sync-Components
…ponents' and 'master' of github.com:CybercentreCanada/superset into Remove-Unecessary-Code-from-Async-and-Sync-Select-Components
…emove-Unecessary-Code-from-Async-and-Sync-Select-Components
michael-s-molina
left a comment
There was a problem hiding this comment.
Thank you for the PR @cccs-RyanK! I left some first-pass comments about the sync version. I'll review the async version later 😉
|
@cccs-RyanK About your question on Slack... I think it's a good idea to clean the components first and extract shared behaviors in another PR. It will be easier to check what can be extracted after the cleanup and it will be easier to review the changes. |
michael-s-molina
left a comment
There was a problem hiding this comment.
@cccs-RyanK Thank you for the test improvements!
…emove-Unecessary-Code-from-Async-and-Sync-Select-Components
…emove-Unecessary-Code-from-Async-and-Sync-Select-Components
Codecov Report
@@ Coverage Diff @@
## master #20690 +/- ##
==========================================
- Coverage 66.29% 66.26% -0.04%
==========================================
Files 1758 1758
Lines 66801 66930 +129
Branches 7055 7088 +33
==========================================
+ Hits 44288 44349 +61
- Misses 20713 20770 +57
- Partials 1800 1811 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. |
michael-s-molina
left a comment
There was a problem hiding this comment.
Although showSearch is true by default, it can be disabled.
michael-s-molina
left a comment
There was a problem hiding this comment.
LGTM. Thank you for all the hard work @cccs-RyanK!
…pache#20690) * Created AsyncSelect Component Changed files to reference AsyncSelect if needed * modified import of AsyncSelect, removed async tests and prefixes from select tests * fixed various import and lint warnings * fixing lint errors * fixed frontend test errors * fixed alertreportmodel tests * removed accidental import * fixed lint errors * updated async select * removed code from select component * fixed select test * fixed async label value and select initial values * cleaned up async test * fixed lint errors * minor fixes to sync select component * removed unecessary variables and fixed linting * fixed npm test errors * fixed linting issues * fixed showSearch and storybook * fixed linting
SUMMARY
This task was outlined as a part of this PR by @michael-s-molina : #20143
In a previous PR, the code for Select and AsyncSelect was split into two separate components: #20466
The components were left identical, so this PR continues the work and removes the unecessary code that was left in each of the components. Namely, it removes behaviour that had previously been determined by whether the component was in async mode or not.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION