-
Notifications
You must be signed in to change notification settings - Fork 594
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
Incorporate vertical scroll shadows to modals #1128
Incorporate vertical scroll shadows to modals #1128
Conversation
sg00dwin
commented
Jan 23, 2019
- shared css for react-modal and patternfly-react modal
- modal-content class is now a child of modal-dialog
- pf overrides for catalog height and positioning to support scroll shadows
- button, input, tag elements have colors switched to rgba so don't overlay shadow
399bdd5
to
a65c6bb
Compare
/retest |
/refresh |
/assign @rhamilto |
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.
Nice job moving us toward consolidated modals and improving their funcitonality!
|
||
// Modal modifications to enable vertical scrolling with shadow overlays | ||
|
||
.modal-dialog { |
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: alpha
|
||
.modal-dialog { | ||
@media(max-width: $screen-xs-max) { | ||
height: calc(100% - 20px); |
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.
Maybe add a comment explaining why 20px?
} | ||
|
||
} | ||
.btn-default { |
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 gives me pause since it's redefining the buttons style from PatternFly. If/when those change, we will now have to update this rule as well.
|
||
|
||
.modal.right-side-modal-pf { | ||
top: 76px; // since PatternFly 4's masthead is taller than PatternFly 3's |
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: indentation.
top: 54px; | ||
width: auto; | ||
&.modal-body--centered { | ||
@media(min-width: $screen-sm-min) { |
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.
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.
@@ -43,7 +43,7 @@ class DeleteModal extends PromiseComponent { | |||
|
|||
render() { | |||
const {kind, resource} = this.props; | |||
return <form onSubmit={this._submit} name="form"> | |||
return <form onSubmit={this._submit} name="form" className="modal-content"> | |||
<ModalTitle>Delete {kind.label}</ModalTitle> | |||
<ModalBody className="modal-body co-delete-modal"> |
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.
Note the passing of className
here overrides the default classNames in modal.tsx. As a result, this modal doesn't get the height adjustments. Is that intentional?
@@ -28,7 +28,7 @@ class DeleteNamespaceModal extends PromiseComponent { | |||
} | |||
|
|||
render() { | |||
return <form onSubmit={this._submit} name="form"> | |||
return <form onSubmit={this._submit} name="form" className="modal-content"> | |||
<ModalTitle>Delete {this.props.kind.label}</ModalTitle> | |||
<ModalBody className="modal-body co-delete-modal"> |
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.
Note the passing of className
here overrides the default classNames in modal.tsx. As a result, this modal doesn't get the height adjustments. Is that intentional?
6398423
to
4190d6a
Compare
@rhamilto changes push. please take a look. |
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
@@ -26,42 +26,76 @@ | |||
} | |||
} | |||
|
|||
|
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: extra blank line
- modal-content class is now a child of modal-dialog - shared css for react-modal and patternfly-react modal - add modal optional height classes - pf overrides for catalog height and positioning to support scroll shadows
4190d6a
to
415a38c
Compare
/lgtm |