Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 12 17:18

    mergify[bot] on master

    Update scalafmt-core to 3.5.9 (… (compare)

  • Aug 12 17:18
    mergify[bot] closed #638
  • Aug 12 17:12
    mergify[bot] labeled #638
  • Aug 12 17:12
    scala-steward opened #638
  • Aug 08 15:42
    mergify[bot] labeled #637
  • Aug 08 15:42
    scala-steward opened #637
  • Jul 31 16:43

    github-actions[bot] on gh-pages

    Deploying to gh-pages from @ ou… (compare)

  • Jul 31 16:43
    mergify[bot] closed #636
  • Jul 31 16:43

    mergify[bot] on master

    Update scalatest to 3.2.13 (#63… (compare)

  • Jul 31 16:40
    mergify[bot] closed #64
  • Jul 31 16:40

    mergify[bot] on master

    Update scalatest to 3.2.13 (#64) (compare)

  • Jul 31 16:37
    mergify[bot] labeled #64
  • Jul 31 16:37
    scala-steward opened #64
  • Jul 31 16:37
    mergify[bot] labeled #636
  • Jul 31 16:36
    scala-steward opened #636
  • Jul 27 16:34

    mergify[bot] on master

    Update sbt-mdoc to 2.3.3 (#635) (compare)

  • Jul 27 16:34
    mergify[bot] closed #635
  • Jul 27 16:28
    mergify[bot] labeled #635
  • Jul 27 16:27
    scala-steward opened #635
  • Jul 24 15:20

    github-actions[bot] on gh-pages

    Deploying to gh-pages from @ ou… (compare)

elyphas
@elyphas
if I search for the location I found it on this path:
import outwatch.reactive.handler.Handler
instead of this:
import outwatch.reactive.handlers.monix._
is it right to make the change ?
elyphas
@elyphas
or Handler is deprecated ?
johannes karoff
@cornerman
Hi @elyphas! Yes, we have actually deprecated Handler. To me, this concept feels too complex, that you indirectly create new instances of your stream-types (just with the help of a magic import). It just seems more straightforward to directly create your subjects with the library of your choice. The intent is much more clear.
You are still able to render any kind of Observable in your dom nodes.
Both are still available (monix and colibri handlers). Just deprecated.
elyphas
@elyphas
@cornerman ; ah thank you
elyphas
@elyphas

any idea why this code works perfectly, but if I put the class FrmClass on another file it doesn't?

class TestingOnClassSpec extends JSDomAsyncSpec {
  class FrmClass {
    val testClick = new Observer[String] {
        def onNext(elem: String): Future[Ack] = {
            Future {
                println(elem)
                Continue
            }
        }
        def onError(ex: Throwable): Unit = { println(ex.printStackTrace.toString) }
        def onComplete(): Unit = println("O completed Handler")
    }
    val but = button( idAttr := "cmdTestOnClass", "Save", cls := "myButton",
        onClick.use("on the observer a class ----------") --> testClick
    )
  }
  it should "be test the save button" taggedAs(ButtonTestingTest) in {
    val frm = new FrmClass
    for {
        _ <- OutWatch.renderInto[IO]("#app", frm.but)
    } yield {
        val element = document.getElementById("cmdTestOnClass")
        sendEvent(element, "click")
        succeed
    }
  }
}

something lacking me ?

elyphas
@elyphas
none errors in fact is succeed but the println doesn't shows the message
elyphas
@elyphas
this happens when I tried to testing
elyphas
@elyphas
I want to catch the event keyDown from a component and send it to another component and there manage it.
How can do it in a reactive way?
Or only this way I can do it?
new Event ("keyDown", new EventInit{
         bubles = true
         cancelable
    }
)
johannes karoff
@cornerman
Hi @elyphas , How about having a subject to move the event between two components? Like this:
val subject = Subject.replay[dom.Event]
div(
  input(onKeyDown --> subject),
  div(subject.map(_.toString))
)
elyphas
@elyphas
@cornerman , cool, I will try
thank you
johannes karoff
@cornerman
I have just released version 1.0.0-RC7. We are now on cats-effect 3. And we switched to asynchronous patching. We can expect less patching and no frp glitches - in general that means less dom manipulation and better performance.
johannes karoff
@cornerman
There are now more deprecated methods in outwatch and colibri. Everything should still compile, but there might be warnings.
elyphas
@elyphas
@cornerman ; hi, thank you very much !!
@cornerman ; now there is full support to zio and monix is out ?
johannes karoff
@cornerman
@elyphas We had to drop monix support in colibri, because it does not yet support cats effect 3.
But you can now use zio and zstreams.
elyphas
@elyphas
@cornerman , ok, thank you, :-)
Tanvi Ranade
@tanviranade12
Hi everyone,
I am new to scala and outwatch both and have been trying to plot basic line plots in the same.
I am using https://github.com/pityka/nspl for reference which returns .dom.html.Canvas.
I was unable to follow solutions shown in previous posts. Could anyone please share a way to render this. Thanks
moritz bust
@busti
@tanviranade12 have a look this section in the readme. https://outwatch.github.io/docs/readme.html#accessing-the-dom-element
This allows you to access the dom element of an outwatch VNode. The element is what you can append the canvas to which is rendered by nspl.
Felix Dietze
@fdietze
@/all Hey Everyone! We're moving this channel over to Discord (https://discord.com/channels/632277896739946517/979515891400187935) on the Typelevel server (https://discord.gg/AQCXy5tv). See you there!