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

chore: Remove unecessary code from async and sync select components #20690

Conversation

cccs-RyanK
Copy link
Contributor

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

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

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
…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
@cccs-RyanK cccs-RyanK changed the title Remove unecessary code from async and sync select components chore: Remove unecessary code from async and sync select components Jul 12, 2022
@cccs-RyanK cccs-RyanK marked this pull request as ready for review July 13, 2022 12:20
Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR @cccs-RyanK! I left some first-pass comments about the sync version. I'll review the async version later 😉

superset-frontend/src/components/Select/Select.tsx Outdated Show resolved Hide resolved
superset-frontend/src/components/Select/Select.tsx Outdated Show resolved Hide resolved
superset-frontend/src/components/Select/Select.tsx Outdated Show resolved Hide resolved
@michael-s-molina
Copy link
Member

@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.

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cccs-RyanK Thank you for the test improvements!

superset-frontend/src/components/Select/AsyncSelect.tsx Outdated Show resolved Hide resolved
superset-frontend/src/components/Select/AsyncSelect.tsx Outdated Show resolved Hide resolved
superset-frontend/src/components/Select/AsyncSelect.tsx Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 21, 2022

Codecov Report

Merging #20690 (eb04cbb) into master (922b4b8) will decrease coverage by 0.03%.
The diff coverage is 77.77%.

@@            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     
Flag Coverage Δ
javascript 51.94% <77.77%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...frontend/src/components/DatabaseSelector/index.tsx 88.88% <ø> (ø)
...et-frontend/src/components/TableSelector/index.tsx 76.08% <ø> (ø)
...t-frontend/src/filters/components/GroupBy/types.ts 100.00% <ø> (ø)
...rontend/src/filters/components/TimeColumn/types.ts 100.00% <ø> (ø)
...frontend/src/filters/components/TimeGrain/types.ts 100.00% <ø> (ø)
...rontend/src/components/ListView/Filters/Select.tsx 52.38% <33.33%> (-2.62%) ⬇️
...set-frontend/src/components/Select/AsyncSelect.tsx 83.18% <80.00%> (+0.34%) ⬆️
superset-frontend/src/components/Select/Select.tsx 87.07% <100.00%> (+19.29%) ⬆️
...components/DashboardBuilder/DashboardContainer.tsx 40.00% <0.00%> (-32.23%) ⬇️
...nd/src/dashboard/util/activeAllDashboardFilters.ts 60.00% <0.00%> (-26.96%) ⬇️
... and 52 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although showSearch is true by default, it can be disabled.

superset-frontend/src/components/Select/AsyncSelect.tsx Outdated Show resolved Hide resolved
Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for all the hard work @cccs-RyanK!

@michael-s-molina michael-s-molina merged commit fe91974 into apache:master Jul 28, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/XL 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants