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

23rd
Mar 2018
Roberto Leibman
@rleibman
Mar 23 2018 15:25
I've merged chandu0101 to our new organization's repository. I'd suggest we do all further work there.
I'm going to create a branch for 1.1.0 and put all my new stuff there.
Alberto Paro
@aparo
Mar 23 2018 15:26
@rleibman what about split the repository in many submodules?
Bijan Chokoufe Nejad
@bijancn
Mar 23 2018 15:27
I would strongly disfavor submodules if we can avoid it
Roberto Leibman
@rleibman
Mar 23 2018 15:34
Well, I have thought about it... now that it's an organization, we might want to actually have different repos for the different subprojects, after all, I doubt many people use both Semantic-ui, Material-ui and elemental-ui.
Bijan Chokoufe Nejad
@bijancn
Mar 23 2018 15:36
while one might not use several at the same time, it would be really beneficial if we could add for the common stuff wrappers, so it only takes one line to change from Semantic-ui to Material-ui (as long as one is not using features that are only available in Material-UI e.g.)
Roberto Leibman
@rleibman
Mar 23 2018 15:36
I have, for instance, a wrapper I just started working on of tinymce, I could put it on this project, for sure, but it may just as well be in its own project, and not affect (or be affected by the others)
Bijan Chokoufe Nejad
@bijancn
Mar 23 2018 15:38
yeah wrappers for unrelated things like tinymce might be better in a separate repo. But then there is no need for submodules, right?
Roberto Leibman
@rleibman
Mar 23 2018 15:38
Yeah, I wasn't thinking of submodules, but different git repos under the same organization.
Alberto Paro
@aparo
Mar 23 2018 15:38
Ok, that's right for me
Roberto Leibman
@rleibman
Mar 23 2018 15:39
Having a common interface would be hard to do! Each library has their own names and quicks, and now that a lot of it is generated automatically it would be difficult.
Alberto Paro
@aparo
Mar 23 2018 15:41
With this approach, my last wish is to have a way to declare required npm dependencies in an automatic way collecting dependencies from many scalajs libraries: to simplify the management in scalajs-bundler
Bijan Chokoufe Nejad
@bijancn
Mar 23 2018 15:45
what do you mean declare in an automatic way? I declare currently like this
  lazy val react: NpmDependency = "react" -> Versions.react
Bijan Chokoufe Nejad
@bijancn
Mar 23 2018 15:52
Isn't it the responsibility of the user to select a suitable version?
Roberto Leibman
@rleibman
Mar 23 2018 15:56
For the stuff that the library provides I would assume it is the library's responsibility, since the wrappers get generated from that.
Alberto Paro
@aparo
Mar 23 2018 16:01
Sure, I was thinking of wrapper for many libraries, you need to write in documentation the right version of the js dependencies and you should manually updated it in your build.sbt or similia in your project
If you release an material-ui react wrapper, you manually need to add the npm correct version.
Another solution is to version your wrapper with the version of the library and use an approach similar to yours: both jar/sjsr and npm have the same library version
Bijan Chokoufe Nejad
@bijancn
Mar 23 2018 16:06
that actually sounds pretty straightforward and easy to understand for the users
Roberto Leibman
@rleibman
Mar 23 2018 16:24
Yeah, I could see doing that.
Bijan Chokoufe Nejad
@bijancn
Mar 23 2018 17:13
@rleibman so we were wondering how you generate the components in the new version?
do you parse the javascript sources?
Roberto Leibman
@rleibman
Mar 23 2018 17:16
Yup. MUI used to be generated in the old version as well, but it was done "off line" by @oyvindberg . I integrated his code into the main project and created generators for SUI and EUI as well, that's what the new 'gen' module does.
Bijan Chokoufe Nejad
@bijancn
Mar 23 2018 17:17
I see. Pretty cool :D
Alberto Paro
@aparo
Mar 23 2018 18:06
SUI and EUI are not compatible with reactJS 16.x. Split the components is required.
Roberto Leibman
@rleibman
Mar 23 2018 18:28
Yeah, that's why splitting them make sense, though I've been running SUI without a problem.