-
Notifications
You must be signed in to change notification settings - Fork 13.9k
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 resize drag handle to Dataset SQL fields #20670
feat: Add resize drag handle to Dataset SQL fields #20670
Conversation
Codecov Report
@@ Coverage Diff @@
## master #20670 +/- ##
=======================================
Coverage 66.83% 66.83%
=======================================
Files 1750 1750
Lines 65894 65900 +6
Branches 7017 7019 +2
=======================================
+ Hits 44041 44047 +6
Misses 20067 20067
Partials 1786 1786
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -55,6 +65,8 @@ const defaultProps = { | |||
maxLines: 10, | |||
offerEditInModal: true, | |||
readOnly: false, | |||
resize: false, |
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.
resize
is not of type boolean
from the declaration above.
@@ -45,6 +45,16 @@ const propTypes = { | |||
]), | |||
aboveEditorSection: PropTypes.node, | |||
readOnly: PropTypes.bool, | |||
resize: PropTypes.oneOf([ | |||
null, |
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.
Are null
and none
the same?
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.
not necessarily, cause none
will actually set the css, whereas null will do nothing
@@ -335,6 +343,13 @@ export default class CRUDCollection extends React.PureComponent< | |||
); | |||
} | |||
|
|||
getCellProps(record: any, col: any) { | |||
const cellPropsFn = | |||
this.props.itemCellProps && this.props.itemCellProps[col]; |
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.
this.props.itemCellProps?.[col]
vs this.props.itemCellProps && this.props.itemCellProps[col];
?
@diegomedina248 should rebase master to get rid of coverage failure. |
8787a88
to
f22ebf6
Compare
@diegomedina248 the master branch has a failure integration test, I have skipped it on the latest commit, and will fix it in separated pr. please rebase again. sorry for the multiple rebases. |
f22ebf6
to
e252405
Compare
SUMMARY
The SQL Editor in the Dataset modal doesn't have an option to resize.
Specially in the Metrics column, the field is way too small.
This PR enables resize in those fields.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Resize changes:
Screen.Recording.2022-07-11.at.10.40.24.mov
TESTING INSTRUCTIONS
Open the edit modal for a physical dataset and virtual dataset.
Ensure editor fields can be resized.
ADDITIONAL INFORMATION
Closes #20200, #14794