-
Notifications
You must be signed in to change notification settings - Fork 69
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
Feature/react managed undo #1135
Feature/react managed undo #1135
Conversation
This will allow future features like automatic bracket closing
@tomrule007 is attempting to deploy a commit to a Personal Account owned by @garageScript on Vercel. @garageScript first needs to authorize it. |
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/c0d3/c0d3-app/7gyjj3Z3MoDYPEwcuUpDstbmA83K |
Codecov Report
@@ Coverage Diff @@
## master #1135 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 139 141 +2
Lines 2223 2263 +40
Branches 551 559 +8
=========================================
+ Hits 2223 2263 +40
|
Updates #1125
what
Manage undo/redo state for
<MdInput/>
component (the comment input box) inside of react and bind hotkeys.why
Using a controlled react input component only preserves native undo/redo functionality when the component is updated with the
onChange
event handler from the controlled component itself.Adding more advanced features like
requires manualing updating the state which in turn wipes out the native undo/redo functionality.
how
hotkeyListener
utility to bind new undo/redo functionality over the native key bindings and prevent defaultsChecklist:
(PS: i took this simple PR template from testing-library/react-testing-library)