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

refactor: SouthPane into functional component #13676

Merged
merged 6 commits into from
Mar 25, 2021

Conversation

AAfghahi
Copy link
Member

SUMMARY

Converted SouthPane into a functional component using TypeScript.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen Shot 2021-03-17 at 4 41 09 PM

TEST PLAN

ADDITIONAL INFORMATION

@AAfghahi AAfghahi force-pushed the SouthPane branch 3 times, most recently from 2b4cd8b to c9ab9a1 Compare March 18, 2021 15:58
Copy link
Member

@betodealmeida betodealmeida left a comment

Choose a reason for hiding this comment

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

Awesome!

@codecov
Copy link

codecov bot commented Mar 18, 2021

Codecov Report

Merging #13676 (485c1da) into master (9773aba) will increase coverage by 1.48%.
The diff coverage is 81.35%.

❗ Current head 485c1da differs from pull request most recent head 6e3b779. Consider uploading reports for the commit 6e3b779 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13676      +/-   ##
==========================================
+ Coverage   75.91%   77.40%   +1.48%     
==========================================
  Files         933      934       +1     
  Lines       47185    47202      +17     
  Branches     5872     5876       +4     
==========================================
+ Hits        35821    36535     +714     
+ Misses      11191    10525     -666     
+ Partials      173      142      -31     
Flag Coverage Δ
cypress 56.22% <60.97%> (+10.21%) ⬆️
javascript 63.55% <80.70%> (+0.01%) ⬆️
presto ?

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

Impacted Files Coverage Δ
...erset-frontend/src/SqlLab/components/ResultSet.tsx 68.64% <ø> (ø)
...erset-frontend/src/SqlLab/components/SqlEditor.jsx 56.01% <ø> (ø)
...et-frontend/src/components/TableView/TableView.tsx 96.42% <ø> (ø)
superset/databases/api.py 92.03% <0.00%> (ø)
superset/datasets/api.py 91.44% <0.00%> (ø)
...tend/src/SqlLab/components/SouthPane/SouthPane.tsx 79.54% <79.54%> (ø)
...-frontend/src/SqlLab/components/SouthPane/state.ts 100.00% <100.00%> (ø)
...frontend/src/explore/components/DataTablesPane.tsx 62.96% <100.00%> (+0.93%) ⬆️
superset/db_engine_specs/presto.py 82.84% <0.00%> (-5.86%) ⬇️
superset/connectors/sqla/models.py 89.87% <0.00%> (-0.61%) ⬇️
... and 103 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 9773aba...6e3b779. Read the comment docs.

displayLimit,
}: SouthPanePropTypes) {
const innerTabContentHeight = height - TAB_HEIGHT;
const southPaneRef: any = useRef();
Copy link
Member

Choose a reason for hiding this comment

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

more specific type here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I forget, is there a preference between createRef and useRef?

latestQuery = props.editorQueries.find(
q => q.id === this.props.latestQueryId,
);
latestQuery = editorQueries.find(q => q.id === latestQueryId);
Copy link
Member

Choose a reason for hiding this comment

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

you can destructure the id for a little shorter syntax

return {
actions: bindActionCreators(Actions, dispatch),
actions: bindActionCreators<any, any>(Actions, dispatch),
Copy link
Member

Choose a reason for hiding this comment

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

do you want to move the map state and dispatch to a new hooks file like the one that you created superset-frontend/src/views/CRUD/data/database/state.ts?

Copy link
Member

Choose a reason for hiding this comment

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

+1

@eschutho
Copy link
Member

@hughhhh is going to finish up this review.. just the last three comments and do a visual test.. thank you!

@AAfghahi AAfghahi force-pushed the SouthPane branch 2 times, most recently from 3db1dde to 465aced Compare March 24, 2021 17:17
@hughhhh hughhhh self-requested a review March 24, 2021 17:22
Copy link
Member

@hughhhh hughhhh left a comment

Choose a reason for hiding this comment

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

🚢

@hughhhh hughhhh merged commit 1d5c58d into apache:master Mar 25, 2021
@hughhhh hughhhh deleted the SouthPane branch March 25, 2021 03:00
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
@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/XL 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants