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: Adds lazy loading and fetchOnlyOnSearch to the Select component #15799

Conversation

michael-s-molina
Copy link
Member

@michael-s-molina michael-s-molina commented Jul 20, 2021

SUMMARY

  • Adds lazy loading and fetchOnlyOnSearch to the Select component.
  • Changes the dataset select of the native filters to use lazy loading

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

screen-recording-2021-07-22-at-21638-pm_feGcoL1I.mp4
Screen.Recording.2021-07-20.at.9.48.11.AM.mov
Screen.Recording.2021-07-20.at.9.46.08.AM.mov

TESTING INSTRUCTIONS

Native filters test:

  • Open the native filters modal
  • Check that the dataset select is working as intended
  • Check if the other fields that depend on the dataset select are working as intended

Storybook test:

  • Open the Storybook
  • Open the AsyncSelect
  • Check that queries are only triggered after interacting with the select
  • Enable fetchOnlyOnSearch control
  • Check that queries are only triggered after a search input

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

@michael-s-molina michael-s-molina changed the title chore: Adds lazy loading to the Select component chore: Adds lazy loading and fetch on search to the Select component Jul 20, 2021
@michael-s-molina michael-s-molina changed the title chore: Adds lazy loading and fetch on search to the Select component chore: Adds lazy loading and fetchOnlyOnSearch to the Select component Jul 20, 2021
@codecov
Copy link

codecov bot commented Jul 20, 2021

Codecov Report

Merging #15799 (226913e) into master (fdb4035) will decrease coverage by 0.06%.
The diff coverage is 66.66%.

❗ Current head 226913e differs from pull request most recent head 04a6afe. Consider uploading reports for the commit 04a6afe to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15799      +/-   ##
==========================================
- Coverage   77.13%   77.06%   -0.07%     
==========================================
  Files         984      983       -1     
  Lines       51704    51650      -54     
  Branches     6994     6998       +4     
==========================================
- Hits        39881    39804      -77     
- Misses      11599    11620      +21     
- Partials      224      226       +2     
Flag Coverage Δ
javascript 71.67% <66.66%> (-0.14%) ⬇️

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

Impacted Files Coverage Δ
superset-frontend/src/components/Select/Select.tsx 55.85% <66.66%> (-16.83%) ⬇️
superset-frontend/src/components/Select/utils.ts 66.66% <0.00%> (-25.65%) ⬇️
...ters/FiltersConfigModal/FiltersConfigForm/utils.ts 88.88% <0.00%> (-1.59%) ⬇️
...c/filters/components/Select/SelectFilterPlugin.tsx 79.82% <0.00%> (-1.29%) ⬇️
superset/db_engine_specs/presto.py 89.89% <0.00%> (-0.43%) ⬇️
...nd/src/explore/components/DataTablesPane/index.tsx 83.90% <0.00%> (-0.37%) ⬇️
...onfigModal/FiltersConfigForm/FiltersConfigForm.tsx 73.59% <0.00%> (-0.18%) ⬇️
superset/connectors/druid/models.py 82.81% <0.00%> (-0.12%) ⬇️
superset/models/slice.py 86.11% <0.00%> (-0.08%) ⬇️
... and 26 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fdb4035...04a6afe. Read the comment docs.

Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

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

LGMT! Just some minor feedback and a question regarding whether we should keep this option open or just make it the standard.

Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

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

Thanks for answering my questions. LG(reat)TM!

@michael-s-molina michael-s-molina marked this pull request as draft July 20, 2021 16:46
@michael-s-molina michael-s-molina force-pushed the add-lazy-load-option-to-select branch 3 times, most recently from 127d795 to 14246ec Compare July 22, 2021 10:24
@michael-s-molina michael-s-molina marked this pull request as ready for review July 22, 2021 10:25
@michael-s-molina
Copy link
Member Author

/testenv up FEATURE_DASHBOARD_NATIVE_FILTERS=true

@github-actions
Copy link
Contributor

@michael-s-molina Ephemeral environment spinning up at http://18.236.125.116:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@michael-s-molina
Copy link
Member Author

Just waiting for QA approval to merge. @jinghua-qa @junlincc @rosemarie-chiu @adam-stasiak

Copy link
Contributor

@rosemarie-chiu rosemarie-chiu left a comment

Choose a reason for hiding this comment

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

LGTM on UX
CleanShot 2021-07-22 at 11 11 37

@michael-s-molina michael-s-molina merged commit e660de6 into apache:master Jul 22, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.0 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 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants