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: add prop to setDBEngine in DatabaseModal #18653

Merged
merged 8 commits into from
Feb 11, 2022
Merged

Conversation

hughhhh
Copy link
Member

@hughhhh hughhhh commented Feb 10, 2022

SUMMARY

Add prop setDBEngine to programmatically skip the step 1 and push users in to step2 for the DatabaseConnectionForm.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

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 Feb 10, 2022

Codecov Report

Merging #18653 (65a975d) into master (00eb6b1) will decrease coverage by 0.00%.
The diff coverage is 92.85%.

❗ Current head 65a975d differs from pull request most recent head 1cbdb13. Consider uploading reports for the commit 1cbdb13 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18653      +/-   ##
==========================================
- Coverage   66.29%   66.28%   -0.01%     
==========================================
  Files        1603     1603              
  Lines       62744    62745       +1     
  Branches     6320     6323       +3     
==========================================
- Hits        41593    41592       -1     
- Misses      19499    19501       +2     
  Partials     1652     1652              
Flag Coverage Δ
javascript 51.28% <60.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...hart-echarts/src/MixedTimeseries/transformProps.ts 0.00% <0.00%> (ø)
.../src/explore/components/controls/SliderControl.tsx 0.00% <0.00%> (ø)
superset/db_engine_specs/mssql.py 95.83% <ø> (ø)
superset/connectors/sqla/models.py 88.74% <95.83%> (ø)
...lugin-chart-echarts/src/Timeseries/transformers.ts 51.23% <100.00%> (+0.40%) ⬆️
...c/views/CRUD/data/database/DatabaseModal/index.tsx 32.90% <100.00%> (+0.43%) ⬆️
superset/db_engine_specs/base.py 88.43% <100.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 00eb6b1...1cbdb13. Read the comment docs.

Copy link
Contributor

@ad-m ad-m left a comment

Choose a reason for hiding this comment

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

I have small suggestions to consider.

@@ -428,6 +429,7 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
onHide,
show,
databaseId,
setDBEngine,
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this property name is optimal because it sounds a bit like an operation instead of a React-style declarative declaration. Can we delete set part of that name?

Copy link
Member

Choose a reason for hiding this comment

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

agree with this 👍

Copy link
Member

Choose a reason for hiding this comment

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

Good point, this sounds mode like a hook for setting state than a value.

@pull-request-size pull-request-size bot added size/S and removed size/M labels Feb 10, 2022
Copy link
Member

@pkdotson pkdotson left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Member

@eschutho eschutho left a comment

Choose a reason for hiding this comment

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

still a console log

Copy link
Member

@eschutho eschutho left a comment

Choose a reason for hiding this comment

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

Looks good!

@hughhhh hughhhh merged commit 78e20e2 into master Feb 11, 2022
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.0 labels Mar 13, 2024
@mistercrunch mistercrunch deleted the xp/db-modal-anywhere branch March 26, 2024 16:21
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/S 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants