Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 19:45

    fdietze on master

    Update sbt-sonatype to 3.8.1 (compare)

  • 19:45
    fdietze closed #370
  • 18:30
    scala-steward opened #371
  • 07:01
    scala-steward opened #370
  • Nov 19 01:20
    fdietze synchronize #279
  • Nov 19 01:20

    fdietze on domtovnode

    Fix typo preserve styles when removing a… (compare)

  • Nov 19 00:46
    fdietze synchronize #279
  • Nov 19 00:46

    fdietze on domtovnode

    RepairDom: preserve style attri… (compare)

  • Nov 08 11:29
    scala-steward opened #369
  • Oct 30 13:59
    cornerman synchronize #355
  • Oct 24 21:58

    cornerman on master

    Fix scalac opts for 2.13 Copie… (compare)

  • Oct 24 21:58
    cornerman closed #17
  • Oct 24 21:58
    cornerman closed #16
  • Oct 24 21:57
    cornerman commented #17
  • Oct 24 21:43
    cornerman commented #355
  • Oct 24 14:04
    busti commented #355
  • Oct 24 01:52
    dropofwill opened #17
  • Oct 23 21:00
    busti commented #355
  • Oct 17 10:22
    cornerman commented #355
  • Oct 17 09:12
    cornerman commented #355
johannes karoff
@cornerman
Yeah, most of the time it is an easier choice in a business to decide for popular tooling. And maybe some people will realize problems later down the road and can switch in a more reasonable way - incrementally. Also, it allows to sometimes just use an existing component from another framework if you just need the functionality -- then you either do not care or will clean up later.
It just a lot of pain to translate components between frameworks, especially if some constructions are difficult to express in the other.
With outwatch, we could provide a nice wrapper around these dirty components and control them from outside in a safe way.
Markus Appel
@MarkusA380
Guys I am a little confused, I used the latest version on jitpack, now you stopped using Monix alltogether?
Does that mean I loose all of the cats-effect compatibility as well? :(
Furthermore, VNodes aren't IO's?
elyphas
@elyphas
@MarkusA380 ; monix is still there
@MarkusA380 ; OutWatch/outwatch#355
Markus Appel
@MarkusA380
Ah. Still, JitPack seems to be out of date.
0.9.1?
elyphas
@elyphas
I just use this way:
resolvers += "jitpack" at "https://jitpack.io",
elyphas
@elyphas

@MarkusA380 :

Does that mean I loose all of the cats-effect compatibility as well? :(

outwatch use cats-effect

johannes karoff
@cornerman
@MarkusA380 you can get the latest version via jitpack through the commit hash, for example for the lastest right now:
libraryDependencies += "com.github.outwatch" % "outwatch" % "f7c3081"
We will drop monix as a core dependency in the coming version - but it will be available as another dependency that just works as before.
support for cats and cats-effect is still there.
VNode and VDomModifier are not type aliases for IO[...] anymore, but you should be able to work with them as before. You can still render effects like div(IO { something }).
Markus Appel
@MarkusA380
@elyphas @cornerman Thanks for the information. I wrongly pulled a very old version of OutWatch I think. Any reason why VNodes aren't IOs anymore? Didn't that make it easier to reason about the DOM tree? I'm not critizising, I am curious how that change affects the library and the usage.
Markus Appel
@MarkusA380
I ran into another issue with Jitpack, I can only find the artifact with a single-% dependency qualifier, not with the normal scalajs %%%-qualifier. This causes issues down the line with transitive deps.
moritz bust
@busti
@MarkusA380 That is a common problem with jitpack. It somehow messes up the group id's with multi artifact builds sometimes.
Try using the following:
libraryDependencies += "com.github.outwatch.outwatch" %%% "outwatch" % "f7c3081"
Or maybe try using master-SNAPSHOT instead of using the commit directly and then switch back to the commit hash of master once it has worked.
Markus Appel
@MarkusA380
Oh thats some hacky stuff right there :) I will try it out.
Markus Appel
@MarkusA380
It seems to work. The outwatch.outwatch trick did it.
Thanks @Busti
moritz bust
@busti
Yeah, it is ugly but it works. Just remember that id does not translate well to the maven-central group id's in case you switch back.
But it is better than trying to make sbt work with git-submodules.
Markus Appel
@MarkusA380
I had trouble with npm trying to access a the snabdom - git - repo. I had to reconfigure git to use https:// instead of git:// because I am behind a corporate proxy. Might be interesting to note.
elyphas
@elyphas
@MarkusA380 ; I am using it this way: npmDependencies in Compile += "snabbdom" -> "0.7.3",
I had have not troubles.
moritz bust
@busti
I have added snabbdom via a custom webpack config file. It gets a bit crazy as the projects get larger.
Markus Appel
@MarkusA380
I tried to add a onClick handler to a svg <circle>, but it doesn't appear in the DOM. What could be the issue?
Markus Appel
@MarkusA380
Same for <tr> as well. Is click.map(...) => handler incorrect as VDomModifier?
Sorry I mean --> of course
the identity: .map( t => t ) it not necessary
Markus Appel
@MarkusA380
No I am mapping to a custom value for the handler. An ID (Int) in my case.
What's up with that .target.value - chain? Whats the reason for it?
Markus Appel
@MarkusA380
Allthough it still doesn't seem to be working...
Should I expect an onClick handler in the HTML tree or does this work somehow differently?
Markus Appel
@MarkusA380
Oh my mistake, it does work. But its not visible in the HTML...
Markus Appel
@MarkusA380
Thanks for the help. I figured it out!
moritz bust
@busti
@MarkusA380 Also if you quickly want to test some event thingie, you can simply do
div(click.foreach(println))
Markus Appel
@MarkusA380
@Busti True, that's what I ended up doing. Can you explain to me the difference between click and onClick?
moritz bust
@busti
Afaik, click is going to be deprecated. But one is just an alias for the other. There is no real difference aside from the name.
Markus Appel
@MarkusA380
Okay thanks!
elyphas
@elyphas

Hi, I am trying to do a test in the client side of my app, but I get an error:

[info] CQuotationSpec:
[info] comparativo
[info] - should ser creado *** FAILED ***
[info]   scala.scalajs.js.JavaScriptException: TypeError: Cannot read property 'document' of undefined
[info]   at org.scalajs.dom.package$.document$lzycompute(/home/elyphas/Prjs/tsoolik/client/target/scala-2.12/scalajs-bundler/test/client-test-fastopt.js:3507:65)

with this code:

class CQuotationSpec extends FlatSpec with Matchers with ScalaFutures {
  "comparativo" should "ser creado" in {
    println("Changos no hace nada ##############################################################")
    val txtFolio = org.scalajs.dom.document.getElementById("txtFolio")  //.innerHTML shouldBe ""
    txtFolio.textContent shouldBe "1448"
  }
}

Any idea?

moritz bust
@busti
you need to setup scala-js for browserless testing. It requires to install an environment via npm, but you better ask in the scala-js channel for that.
elyphas
@elyphas
@busti; ah ok, thank you
sorry for the off-topic
moritz bust
@busti
@elyphas No worries. I'd love to help you more, but I am at my phone because my PC is defective, so I cannot really write a lot.
elyphas
@elyphas
@busti ; Ah ok, :)