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
[POC] Shortcut editor (for command mode) #1265
Conversation
Wow, awesome. I look forward to checking this out.
Now you know Facebook's secret to success and adoption of a library. |
@@ -0,0 +1 @@ | |||
{ "presets": ["es2015"] } |
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.
You'll probably want react
in your presets here, especially if you use JSX. I'm fine either way and won't bikeshed on the myriad alternatives.
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 don't use JSX for now. I sticked to doing things manually.
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.
Ok, cool!
Dude awesome! |
this.props.shortcut? | ||
React.createElement('i', {className: "pull-right fa fa-times", alt: 'remove title'+this.props.shortcut}): | ||
React.createElement('i', {className: "pull-right fa fa-plus", alt: 'add-keyboard-shortcut', onClick:()=>{ | ||
that.props.onAddBindings(that.state.shrt, that.props.ckey); |
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.
sweet arrow func
I'm very happy to see with the webpack stuff the transition to es6 is straight forward 👍 👍 👍 |
The |
av?that.props.onAddBindings(that.state.shrt, that.props.ckey):undefined; | ||
} | ||
}), | ||
this.props.shortcut? undefined : |
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.
When you don't want an element to show, return null
.
Closing in favor of #1347 that does not have one of the main concern that goes with the PR. |
The main concern coming from the dark thread about use of React in Jupyter? |
Yep. |
Proof of concept.
Todo:
PIng @rgbkrk and @jdfreder because I have no clue what I am doing.
Personal note, es6 is much less WTF than es5 , but still WTF.
JSX: replace
<
by?>
and/>
by<?
and you get PHP.