-
Notifications
You must be signed in to change notification settings - Fork 581
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
fix: Forms - Add 'escape' button / key handler in forms #240
Conversation
Codecov Report
@@ Coverage Diff @@
## main #240 +/- ##
==========================================
+ Coverage 68.06% 68.20% +0.14%
==========================================
Files 130 132 +2
Lines 7079 7099 +20
Branches 69 70 +1
==========================================
+ Hits 4818 4842 +24
+ Misses 1774 1770 -4
Partials 487 487
Continue to review full report at Codecov.
|
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.
Seems reasonable to me.
esc
makes it seem like a modal would close, but this really goes back
. It's a minor UX nit we can work through later on.
Thanks for reviewing @kylecarbs !
Good point - we can def iterate on it |
In v1, we had a quick and easy way to leave creation forms - an escape button (and key handler) in the top right corner.
This was especially helpful in cases where the form was long enough that the 'Cancel' button was off-screen.
This ports over that component into v2 and hooks up into our two existing forms:
In addition, this adds test cases + a storybook story for it.