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
Allow resizing of CSF contained levels #13543
Conversation
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.
LGTM, modulo a couple questions
paddingTop: CONTAINED_LEVEL_PADDING, | ||
paddingLeft: CONTAINED_LEVEL_PADDING, | ||
paddingRight: CONTAINED_LEVEL_PADDING, | ||
}, |
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.
nit: might be more extensible to put these into a containedLevelStyles
object, a la the craftStyles
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.
Done.
@@ -1791,6 +1791,10 @@ a.download-video { | |||
box-sizing: border-box; | |||
} | |||
|
|||
.contained-level .free-response .response { | |||
resize: vertical; | |||
} |
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.
why is this here and not in an apps stylesheet?
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.
Mainly because this is where the rest of the free response level styling is.
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.
Man, our CSS needs some normalization. This is a fine place, in that case.
</div> | ||
{!this.props.collapsed && !this.props.isEmbedView && | ||
<HeightResizer | ||
position={this.props.height} | ||
onResize={this.handleHeightResize} | ||
style={styles.heightResizer} |
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.
HeightResizer doesn't have a style
property; what is this intended to do?
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 added support for it in this PR. Is it bad practice to add a style property to react components?
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.
Oh! Wow, I totally missed that. Nope, what you did is perfect.
The HeightResizer actually works now (it used to be fixed in place, since both the minHeight and maxHeight were set to the height of the contained level), with scrolling when you make it smaller.