JunoLab / atom-ink

IDE toolkit for Atom
MIT License
228 stars 40 forks source link

ES6 / Etch #92

Closed MikeInnes closed 7 years ago

MikeInnes commented 7 years ago

I’m using this PR to experiment with etch, which potentially solves some of our issues creating ad-hoc views everywhere.

The workspace seems like a good fit for this since it’ll be nice not to reset the view on every update.

Anyone have any opinions on ES6 vs CoffeeScript? I somewhat dislike ES6’s verbosity but could get used to it.

MikeInnes commented 7 years ago

Now that the workspace is ported, some more thoughts:

So overall I'm pretty sold on this, but would like to hear others' thoughts as well.

pfitzseb commented 7 years ago

This looks pretty nice, I like it!

I mean, I like coffeescript a lot, but ES6 doesn't seem to be as ugly as ES5 in many regards. We should be able to set CI up for linting, Atom core has that as well (though linting locally might be sufficient for now).

etch seems great, we should defintely use it. Not quite sure why this works as is though, does Atom do the babel transpiling and stuff whenever it encounters the 'use babel' pragma and that's it?

Anyways, I'd be in favour of writing new code is ES6 and rewriting the old modules whenever we have the time (similar to Atom core).

MikeInnes commented 7 years ago

Yup, just auto detects it and compiles exactly as with coffeescript.

I had a go at moving progress bars to etch (not complete yet) and you can see how much dramatically simpler it is with etch vs our old event handler approach. I think this'll help a lot with more complex views.

I agree that the transition should be fairly organic. I've been using this which makes the first pass just a small cleanup. Converting anything that doesn't have a view, when we want to, should be pretty trivial.

pfitzseb commented 7 years ago

Yeah, it's crazy how much simpler the view stuff is with etch. Love it.

MikeInnes commented 7 years ago

Closing this PR as it's gotten way out of hand – will pull commits off of my dev branch for review.