Garbee/breakpoints - #1712
Garbee/breakpoints#1712Garbee wants to merge 19 commits into
Conversation
…s display as block. Re-add no breakpoints message.
|
Thanks @Garbee! @clarkbw, @wldcordeiro, @bomsy, John and I discussed using this branch to discuss some research questions:
Lastly, we should rope in the larger team before we pull in JSX |
| disabled={ isWaitingOnBreak } | ||
| onClick={ breakOnNext } | ||
| > | ||
| <Svg name="pause" /> |
| onClick={ breakOnNext } | ||
| > | ||
| <Svg name="pause" /> | ||
| { isWaitingOnBreak ? |
There was a problem hiding this comment.
maybe this is pulled up to a variable... Also we should have L10N strings eventually here
There was a problem hiding this comment.
Yup. L10N needs to get sprinkled around. I just left it out for the initial review to keep what we are looking at more concise.
| <label className="breakpoint" key={ fromMode.mode }> | ||
| <input | ||
| type="radio" | ||
| onChange={ this.pauseExceptionModeToggled } |
There was a problem hiding this comment.
do people use spaces here? ={
There was a problem hiding this comment.
Typically not from what I see around in the docs and other projects. When the event handlers were inlined those had them for ease of reading so I put theme everywhere for consistency. Now that those handlers are seeming like we're going to keep them in variables, the spaces here are useless.
| return ( | ||
| <details> | ||
| <summary className="_header"> | ||
| { `Exceptions - Pausing on: ${currentMode.headerLabel}` } |
There was a problem hiding this comment.
eventually, this would move to L10N
| <summary className="_header"> | ||
| { `Exceptions - Pausing on: ${currentMode.headerLabel}` } | ||
| </summary> | ||
| { this.props.exceptionPauseModes.map(_createToggle) } |
There was a problem hiding this comment.
I think this is nice, but I'm still a little reluctant about curlies :)
There was a problem hiding this comment.
Curlies are a tradeoff for overall clarity in the nesting.
| if (input) { | ||
| input.indeterminate = isIndeterminate; | ||
| } | ||
| }; |
There was a problem hiding this comment.
I like pulling these functions out of the curlies. I could see the markup becoming pretty hard to follow with these.
Personally, I prefer the old JS style for these in line functions, but ... what can you do :)
There was a problem hiding this comment.
I don't think we have a good alternative to add refs/event handlers any other way. :/ So, this is just the way things are with JSX if we go this route.
|
Minor comment: If we start going JSX and this lands let's open a tracking issue for JSX converting the rest of the codebase. |
Associated Issue: #1665
Summary of Changes
Sorry, pretty massive changes in this one. Plenty to discuss.
UX Side
Technical side (JSX)
With this I experimented with using JSX for the components. All that was needed to let us do this is adding the right babel transformer to our list.
Pros
Cons
Test Plan
Fairly standard testing run-through with the exceptions page and toggling a few actions on the todomvc demo. Just to verify the functionality works as it used to. Most changes here as far as the frontend are on the UX side over the technical side.
Screenshots/Videos