-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Conversation
2b4cd8b
to
c9ab9a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
Codecov Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
displayLimit, | ||
}: SouthPanePropTypes) { | ||
const innerTabContentHeight = height - TAB_HEIGHT; | ||
const southPaneRef: any = useRef(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more specific type here?
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@hughhhh is going to finish up this review.. just the last three comments and do a visual test.. thank you! |
3db1dde
to
465aced
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
SUMMARY
Converted SouthPane into a functional component using TypeScript.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
ADDITIONAL INFORMATION