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: improve modal error handling #13342

Merged
merged 2 commits into from Mar 16, 2021

Conversation

lilykuang
Copy link
Member

@lilykuang lilykuang commented Feb 25, 2021

SUMMARY

  • improve error handle on database and dataset modal

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

After:
Add Dataset Modal
https://www.loom.com/share/917e800b537045c6a06be429cfe8835e
Database Modal
https://www.loom.com/share/cfe90327bde649d186b66260bf0814c7

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@lilykuang lilykuang marked this pull request as ready for review February 25, 2021 21:37
@willbarrett willbarrett requested review from nytai and riahk March 3, 2021 21:47
Copy link
Member

@nytai nytai left a comment

Choose a reason for hiding this comment

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

lgtm, just one nit

Comment on lines +621 to +622
body: JSON.stringify(connection),
headers: { 'Content-Type': 'application/json' },
Copy link
Member

Choose a reason for hiding this comment

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

nit: you can use 'postPayload with a js object, instead of body + json header

@codecov
Copy link

codecov bot commented Mar 16, 2021

Codecov Report

Merging #13342 (551df54) into master (df5fb5a) will decrease coverage by 4.32%.
The diff coverage is 39.39%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13342      +/-   ##
==========================================
- Coverage   77.35%   73.03%   -4.33%     
==========================================
  Files         918      608     -310     
  Lines       46652    21644   -25008     
  Branches     5723     5640      -83     
==========================================
- Hits        36087    15807   -20280     
+ Misses      10429     5701    -4728     
  Partials      136      136              
Flag Coverage Δ
cypress 56.59% <41.17%> (+0.02%) ⬆️
hive ?
javascript 63.04% <27.27%> (-0.01%) ⬇️
mysql ?
postgres ?
presto ?
python ?
sqlite ?

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

Impacted Files Coverage Δ
superset-frontend/src/views/CRUD/types.ts 100.00% <ø> (ø)
...nd/src/views/CRUD/data/dataset/AddDatasetModal.tsx 57.14% <25.00%> (-0.44%) ⬇️
superset-frontend/src/views/CRUD/hooks.ts 58.93% <43.75%> (-1.69%) ⬇️
superset-frontend/src/views/CRUD/utils.tsx 61.79% <50.00%> (-0.71%) ⬇️
...end/src/views/CRUD/data/database/DatabaseModal.tsx 76.97% <66.66%> (+4.58%) ⬆️
superset/utils/data.py
superset/reports/commands/delete.py
superset/utils/cache.py
superset/dashboards/dao.py
superset/tasks/schedules.py
... and 306 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 df5fb5a...551df54. Read the comment docs.

@lilykuang lilykuang merged commit 21cc495 into apache:master Mar 16, 2021
@lilykuang lilykuang deleted the lily/improve-error-handling branch March 16, 2021 16:33
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
* improve modal error handling

* update hook to handle string error message
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.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 preset-io size/L 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants