These are chat archives for chandu0101/scalajs-react-components

31st
Jul 2017
Øyvind Raddum Berg
@oyvindberg
Jul 31 2017 17:56
hey guys
im back from vacation, and finally have some time to look at this again
i just had a look at @fmcgough branch to upgrade everything to scalajs-react 1, and it looks pretty good. im reformatting and bumping some dependencies on it, and will merge pretty much as-is. It's currently tagged as 0.7, and i think we can make a release just to have something stable out
then i'll merge that branch with @rleibman branch
i still have some open questions there with regards to scalajs-bundler
Roberto Leibman
@rleibman
Jul 31 2017 17:59
ok, thanks! I've been super busy with work and haven't gotten around to doing pretty much the same.
Øyvind Raddum Berg
@oyvindberg
Jul 31 2017 18:00
so right now im continuing where i left off a while ago, fixing the last imports so that everything in the demo at least works
we also need a production story, as the bundle im left with is 13 megabytes
havent tried fullOptJS, but i would be surprised if everything worked OOTB, hehe
Øyvind Raddum Berg
@oyvindberg
Jul 31 2017 18:28
meh, and there the macro fell apart
José Luis Colomer Martorell
@beikern
Jul 31 2017 19:11
Nice guys! hope it's released soon :+1:
Øyvind Raddum Berg
@oyvindberg
Jul 31 2017 20:39
So macro fell apart means that it rewrites return types in functions when it's Callback(To), but not VdomElement, for example. This means we should expose raw types (ReactElement, etc) in the wrappers and let users handle it
also i started to fix react-select and react-slick. the wrappers are both outdated, so i'll most likely delete them
Roberto Leibman
@rleibman
Jul 31 2017 20:40
Wow, that bundle shouldn't be that big! Maybe you're counting the npm_modules tree as well?
Øyvind Raddum Berg
@oyvindberg
Jul 31 2017 20:42
that was fastOptJS result, all the files from node_modules, most probably inline source maps
all the *included files
Roberto Leibman
@rleibman
Jul 31 2017 20:43
ah, don't count node_modules! They're not needed in the resulting bundle.
Øyvind Raddum Berg
@oyvindberg
Jul 31 2017 20:44
well it was just what the devServer outputed without me really doing anything
the demo really has a lot of boilerplate for each demo
Øyvind Raddum Berg
@oyvindberg
Jul 31 2017 21:37
@rleibman now i've fixed JSImport for all the javascript components, and moved everything (except the images on the main page) to the bundle created by scalajs-bundler. it all works out smoothly, except we have lost the possibility to split up the javascript files
Roberto Leibman
@rleibman
Jul 31 2017 21:38
I can live with that.
Øyvind Raddum Berg
@oyvindberg
Jul 31 2017 21:39
well me too
im curious how big the bundle will be
i will push my branch so you can have a look at it
ive rebased both yours and the other branch on top of a scalafmt formatted master branch, but not done the merge yet
also squashed both, to make the inevitable merge possible
Roberto Leibman
@rleibman
Jul 31 2017 21:40
Your git foo is strong
Øyvind Raddum Berg
@oyvindberg
Jul 31 2017 21:41
we'll see when we get to the actual merge :P
chandu0101/scalajs-react-components#87
Roberto Leibman
@rleibman
Jul 31 2017 21:46
Awesome work there!
Øyvind Raddum Berg
@oyvindberg
Jul 31 2017 21:47
thanks
btw if you wondered about why injectTapEventPlugin was called twice
the first call was manually added in the index bundle, and we did it once from code
Roberto Leibman
@rleibman
Jul 31 2017 21:48
I'm not sure of that, I was still seeing twice, I moved it to outside of main (i.e. to the "constructor") and it stopped complaining.
Because I had seen that piece of code in the bundle as well.