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: Enable new dataset creation flow #22610

Merged
merged 21 commits into from
Jan 18, 2023

Conversation

lyndsiWilliams
Copy link
Member

@lyndsiWilliams lyndsiWilliams commented Jan 5, 2023

SUMMARY

This PR enables the new create dataset flow in dataset view, the + -> Data menu in the app header, chart creation, and database creation. On the create dataset page (/dataset/add/), user is brought to their previous page when the cancel button is clicked and the create chart view when the create dataset button is clicked.

TESTING INSTRUCTIONS

  • Check all areas in Superset where user can create a dataset, it should bring you to the new create dataset page: /dataset/add
    • All creation spots: + Dataset button in dataset view, the + -> Data menu in the app header, chart creation, and database creation.
    • There should no longer be an Add Dataset modal in any area of the app
  • On the new create dataset page, ensure that:
    • Cancel button brings you to the previous page you were on
    • Create Dataset button brings you to the create chart view with the newly created dataset selected

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

@codecov
Copy link

codecov bot commented Jan 5, 2023

Codecov Report

Merging #22610 (52e22dc) into master (2de19f1) will increase coverage by 0.25%.
The diff coverage is 43.87%.

❗ Current head 52e22dc differs from pull request most recent head 91c6bb2. Consider uploading reports for the commit 91c6bb2 to get more accurate results

@@            Coverage Diff             @@
##           master   #22610      +/-   ##
==========================================
+ Coverage   67.09%   67.34%   +0.25%     
==========================================
  Files        1869     1875       +6     
  Lines       71605    72086     +481     
  Branches     7821     7854      +33     
==========================================
+ Hits        48043    48547     +504     
+ Misses      21534    21514      -20     
+ Partials     2028     2025       -3     
Flag Coverage Δ
javascript 53.73% <26.06%> (-0.18%) ⬇️

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

Impacted Files Coverage Δ
...gin-chart-echarts/src/Sunburst/EchartsSunburst.tsx 0.00% <0.00%> (ø)
...ns/plugin-chart-echarts/src/Sunburst/buildQuery.ts 0.00% <0.00%> (ø)
...plugins/plugin-chart-echarts/src/Sunburst/index.ts 0.00% <0.00%> (ø)
...lugin-chart-echarts/src/Sunburst/transformProps.ts 0.00% <0.00%> (ø)
...gins/plugin-chart-echarts/src/Treemap/constants.ts 54.54% <ø> (ø)
.../plugins/plugin-chart-echarts/src/Treemap/types.ts 100.00% <ø> (ø)
superset-frontend/src/GlobalStyles.tsx 0.00% <ø> (ø)
superset-frontend/src/SqlLab/actions/sqlLab.js 63.56% <ø> (ø)
...ols/DndColumnSelectControl/ColumnSelectPopover.tsx 3.33% <0.00%> (-0.04%) ⬇️
superset-frontend/src/middleware/asyncEvent.ts 78.18% <0.00%> (ø)
... and 51 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@codyml codyml left a comment

Choose a reason for hiding this comment

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

Thanks, left some comments!

@codyml codyml mentioned this pull request Jan 9, 2023
9 tasks
@codyml
Copy link
Member

codyml commented Jan 9, 2023

One more comment from @yousoph: errors in the new dataset flow should show up as toasts for now; will circle back if that should change for new dataset flow.

Copy link
Member

@codyml codyml left a comment

Choose a reason for hiding this comment

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

Thanks! Left a few more comments. Redirect to Add Charts and error toasts look great.

Copy link
Member

@codyml codyml left a comment

Choose a reason for hiding this comment

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

One (last, I swear) thing I just noticed is that in the previous modal, saving a dataset would redirect you to /chart/add with a ?dataset=table_name query string, which would autoselect the just-created dataset and also show a toast on the Add Chart page. If this behavior is easy to reproduce it should probably be maintained, but feel free to do it in a separate PR. Database autoselect now works great and everything else LGTM!

@lyndsiWilliams
Copy link
Member Author

One (last, I swear) thing I just noticed is that in the previous modal, saving a dataset would redirect you to /chart/add with a ?dataset=table_name query string, which would autoselect the just-created dataset and also show a toast on the Add Chart page. If this behavior is easy to reproduce it should probably be maintained, but feel free to do it in a separate PR. Database autoselect now works great and everything else LGTM!

Easy fix, thanks for that catch! Fixed in this commit.

@lyndsiWilliams
Copy link
Member Author

/testenv up

@github-actions
Copy link
Contributor

@lyndsiWilliams Ephemeral environment spinning up at http://18.237.97.3:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@lyndsiWilliams
Copy link
Member Author

/testenv up

@github-actions
Copy link
Contributor

@lyndsiWilliams Ephemeral environment spinning up at http://35.89.232.0:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@andrey-zayats
Copy link

Hi, found an issues, an error occurs when you go to the "create dataset" page after you have deleted the newly connected database, also, the deleted database is displayed in the dropdown list

error.message.mp4

@andrey-zayats
Copy link

andrey-zayats commented Jan 17, 2023

SQL lab page takes forever to load when navigating to it via the top nav bar

SQL.lab.mp4

the same issues when clicking "Create dataset from SQL query" link
image

@andrey-zayats
Copy link

Top nav bar disappears in SQL lab (the same in latest master)
image

@andrey-zayats
Copy link

after we have created the dataset, it should be marked as "already exists" and the button should be disabled on "create dataset" page, but this does not happen

Repro steps:

  1. Go to "Datasets" -> "+Dataset"
  2. Select examples db, select main schema
  3. Select a database table and click on "create dataset and create chart" button
  4. Select the same database, schema and table
  5. Ensure that dataset is marked as "already exists" and the button is disabled
already.exists.mp4

@lyndsiWilliams
Copy link
Member Author

Hi, found an issues, an error occurs when you go to the "create dataset" page after you have deleted the newly connected database, also, the deleted database is displayed in the dropdown list

error.message.mp4

Hey @andrey-zayats , thanks for the review! I've just pushed up fixes for this issue and the "already existing" issue (here). The other issues (slow-loading SQL Lab and disappearing top nav in SQL Lab) are unrelated to my changes.

@lyndsiWilliams lyndsiWilliams merged commit c87f654 into master Jan 18, 2023
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@lyndsiWilliams lyndsiWilliams deleted the lyndsi/enable-dataset-creation branch January 18, 2023 02:06
@EugeneTorap
Copy link
Contributor

Hi @lyndsiWilliams! Can you move DatasetCreation and DatabaseList to src/pages folder?
#22330 - src/pages structure proposal

@lyndsiWilliams
Copy link
Member Author

Hi @lyndsiWilliams! Can you move DatasetCreation and DatabaseList to src/pages folder? #22330 - src/pages structure proposal

Can do! I'll be moving all dataset files to the new structure within the next couple of weeks.

villebro added a commit to villebro/superset that referenced this pull request Jan 19, 2023
@lyndsiWilliams lyndsiWilliams restored the lyndsi/enable-dataset-creation branch January 19, 2023 16:26
AnushaErrabelli added a commit to preset-io/superset that referenced this pull request Jan 30, 2023
@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.

6 participants