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

fix: fetch datasets list after dataset created successfully #10290

Merged
merged 2 commits into from
Jul 12, 2020

Conversation

lilykuang
Copy link
Member

SUMMARY

  • update subMenu to use hooks
  • fetch dataset list data after dataset created successfully

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

After:
https://www.loom.com/share/22f99d27dcc5493a921496a8b3302048

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

@codecov-commenter
Copy link

codecov-commenter commented Jul 10, 2020

Codecov Report

Merging #10290 into master will decrease coverage by 4.99%.
The diff coverage is 72.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10290      +/-   ##
==========================================
- Coverage   70.54%   65.54%   -5.00%     
==========================================
  Files         599      599              
  Lines       32075    32075              
  Branches     3244     3243       -1     
==========================================
- Hits        22628    21025    -1603     
- Misses       9343    10869    +1526     
- Partials      104      181      +77     
Flag Coverage Δ
#cypress ?
#javascript 59.57% <72.00%> (-0.02%) ⬇️
#python 69.72% <ø> (+0.03%) ⬆️
Impacted Files Coverage Δ
...set-frontend/src/views/datasetList/DatasetList.tsx 68.49% <0.00%> (-0.48%) ⬇️
...et-frontend/src/views/datasetList/DatasetModal.tsx 58.82% <66.66%> (-1.79%) ⬇️
superset-frontend/src/components/Menu/SubMenu.tsx 87.50% <77.77%> (-0.38%) ⬇️
superset-frontend/src/SqlLab/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/explore/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/SqlLab/index.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/dashboard/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/explore/index.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/dashboard/index.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/setup/setupColors.js 0.00% <0.00%> (-100.00%) ⬇️
... and 150 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 3b4df51...3227932. Read the comment docs.

@lilykuang lilykuang marked this pull request as ready for review July 10, 2020 23:13
Copy link
Member

@etr2460 etr2460 left a comment

Choose a reason for hiding this comment

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

love the hooks! one comment, otherwise lgtm

}: SubMenuProps) => {
const [isModalOpen, setIsModalOpen] = useState(false);
const [selectedMenu, setSelectedMenu] = useState(
(childs && childs[0] && childs[0].label) || '',
Copy link
Member

Choose a reason for hiding this comment

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

is there a need to default to empty string here? if so, you can do childs?.[0]?.label || '' and if not, simply do childs?.[0]?.label and make this a useState<string | undefined> call

Copy link
Member Author

Choose a reason for hiding this comment

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

good suggestion! it doesn't need to default to empty string

@nytai nytai merged commit 9d75740 into apache:master Jul 12, 2020
@nytai nytai deleted the lily/dataset-list-refresh branch July 12, 2020 03:57
auxten pushed a commit to auxten/incubator-superset that referenced this pull request Nov 20, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.38.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 size/L 🚢 0.38.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants