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

feat: spinner for imports #15055

Merged
merged 5 commits into from Jun 9, 2021
Merged

Conversation

betodealmeida
Copy link
Member

@betodealmeida betodealmeida commented Jun 9, 2021

SUMMARY

Show a spinner during the import process.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

spinner_import.mov

TESTING INSTRUCTIONS

I modified the import API endpoint to sleep for 5 seconds, and imported a databaset.

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

@codecov
Copy link

codecov bot commented Jun 9, 2021

Codecov Report

Merging #15055 (79f9d4c) into master (3f527c7) will decrease coverage by 0.00%.
The diff coverage is 61.53%.

❗ Current head 79f9d4c differs from pull request most recent head 7a1ce97. Consider uploading reports for the commit 7a1ce97 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #15055      +/-   ##
==========================================
- Coverage   77.76%   77.75%   -0.01%     
==========================================
  Files         966      966              
  Lines       49628    49640      +12     
  Branches     6314     6320       +6     
==========================================
+ Hits        38591    38598       +7     
- Misses      10836    10840       +4     
- Partials      201      202       +1     
Flag Coverage Δ
javascript 72.78% <61.53%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...rset-frontend/src/components/ImportModal/index.tsx 69.79% <61.53%> (-1.64%) ⬇️
...c/components/ErrorMessage/DatabaseErrorMessage.tsx 94.73% <0.00%> (ø)
.../components/ErrorMessage/ParameterErrorMessage.tsx 96.87% <0.00%> (ø)
...onents/ErrorMessage/ErrorMessageWithStackTrace.tsx 77.77% <0.00%> (ø)

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 3f527c7...7a1ce97. Read the comment docs.

@mistercrunch
Copy link
Member

Wondering why we're hiding the context while the spinner is active context? We have a fair amount of "modal resizing" in the product currently (as dynamic content changes the height of the context) and it generally looks jittery. Keeping the context would prevent that.

Side note: can we re-style the button too? I know these file buttons are funky to style sometimes, but if we take over with an antd component maybe we can just disable the button while the spinner is active?

@betodealmeida
Copy link
Member Author

Wondering why we're hiding the context while the spinner is active context? We have a fair amount of "modal resizing" in the product currently (as dynamic content changes the height of the context) and it generally looks jittery. Keeping the context would prevent that.

@mistercrunch I opted to hide the content because if we don't resize the modal the spinner was showing up on top of the filename, which was ugly.

Side note: can we re-style the button too? I know these file buttons are funky to style sometimes, but if we take over with an antd component maybe we can just disable the button while the spinner is active?

I wrote this last night: #15057

@betodealmeida betodealmeida merged commit 1db92cc into apache:master Jun 9, 2021
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
* Update tests

* feat: spinner for imports

* Use loading button instead

* Small fixes

* Small fix
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
* Update tests

* feat: spinner for imports

* Use loading button instead

* Small fixes

* Small fix
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
* Update tests

* feat: spinner for imports

* Use loading button instead

* Small fixes

* Small fix
@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 12, 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 need:merge The PR is ready to be merged size/S 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants