-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Added shortcut for edit mode #2845
Added shortcut for edit mode #2845
Conversation
We can merge this into 1.4.3 if that happens, but it'd be easier if you want to update the PR to merge to |
@Akarshit What would you think about changing the key command for this to be Option/Alt-E? |
4c5c15d
to
a720785
Compare
0507738
to
f911123
Compare
@zenweasel Updated the PR for |
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.
A couple of little code changes here
// hideActionView during isPreview === true | ||
Reaction.hideActionView(); | ||
} else { | ||
// // Reload previous actionView, if saved. Otherwise, don't show. |
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.
If we aren't using this code any more let's just remove it? Sorry I didn't catch that earlier.
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.
Cool, removing the else portion. Didn't remove it before because I thought it might be something we have disabled temporarily.
const userIs = userWas === "customer" ? "administrator" : "customer"; | ||
handleViewContextChange(event, userIs); | ||
} | ||
} |
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.
ESLint says missing semi-colon here
6b608de
to
55c17d9
Compare
55c17d9
to
02a713f
Compare
@jshimko This seems fine but I would like someone else to look at it and test. |
@@ -34,6 +34,28 @@ const styles = { | |||
} | |||
}; | |||
|
|||
|
|||
const handleViewContextChange = (event, value) => { |
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.
These arrow functions should be moved inside the App
component. This will ensure that if someone ever wanted to extend the App
class, they get these as well.
ex: class MyClass extends App {}
if (Reaction.isPreview() === true) { | ||
// Save last action view state | ||
const saveActionViewState = Reaction.getActionView(); | ||
Reaction.setUserPreferences("reaction-dashboard", "savedActionViewState", saveActionViewState); |
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.
Need to import Reaction
.
import { Reaction } from "/client/api";
c22b50d
to
cc7e293
Compare
@mikemurray I have updated the PR. Thanks :) |
This PR adds a shortcut("e" key pressed) for switching in and out of
Edit Mode
. Fix for #2776To test this PR ->
reaction
e
key to switch in and out ofEdit Mode
.Maybe we can discuss a better shortcut.