-
Notifications
You must be signed in to change notification settings - Fork 798
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
Enable ESC and clicking background to close full screen dialog #8697
Conversation
|
||
// capture the ESC key globally | ||
componentDidMount(){ | ||
document.addEventListener('keydown', this.props.dismiss, 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.
I think these new rules should respect this.props.showDismiss
-- there may be instances we don't want to allow dismissal without action.
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.
Good idea - fixed
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.
git push
? While you're in there can you apply code standard spacing?
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.
Fixed
|
@gravityrail can you replace the "cross-circle" Gridicon with either the "cross" or "cross-small" instead? Here's a screenshot of what the "cross-small" could look like there: |
@joanrho - icon updated, and screenshot in description @dereksmart - feedback addressed, going to dismiss your review so you can take another look :) |
Design review approved. Thanks for the edits, Dan! |
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!
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.
Made one small change to remove bind
calls from properties, otherwise LGTM whenever Travis finishes!
* Enable ESC and clicking background to close full screen dialog * Update gridicons and reposition close button on dialog * Better spacing * Only import the one gridicon we need * Revert unnecessary changes to gridicons * Fix JS error due to unbound handler * Fix event binding and restrict to ESC code * Fix eslint error * Removed bind calls from property assignments.
Ported to |
Fixes #7904
Changes proposed in this Pull Request:
Testing instructions:
This also moves the close button into the top-right corner of the dialog, and includes an updated gridicons file which includes the circular close icon. Other uses of gridicons should be re-tested to ensure I didn't break anything.
Proposed changelog entry for your changes:
Better usability for full-screen dialogs.