Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 14 07:18
    scala-steward opened #169
  • Jun 08 20:24

    cquiroz on master

    Update scalajs-compiler to 1.6.0 Merge pull request #168 from sc… (compare)

  • Jun 08 20:24
    cquiroz closed #168
  • Jun 08 19:20
    scala-steward opened #168
  • Jun 08 17:31
    scala-steward opened #167
  • Jun 01 11:23

    dependabot[bot] on github_actions

    (compare)

  • Jun 01 11:22

    cquiroz on master

    Bump actions/cache from 2.1.5 t… Merge pull request #164 from su… (compare)

  • Jun 01 11:22

    dependabot[bot] on github_actions

    (compare)

  • Jun 01 11:22

    cquiroz on master

    Bump olafurpg/setup-scala from … Merge pull request #165 from su… (compare)

  • Jun 01 11:22

    cquiroz on master

    Update sbt to 1.5.3 Merge pull request #166 from sc… (compare)

  • Jun 01 07:31
    scala-steward opened #166
  • Jun 01 05:25
    dependabot[bot] labeled #165
  • Jun 01 05:25
    dependabot[bot] opened #165
  • Jun 01 05:25

    dependabot[bot] on github_actions

    Bump olafurpg/setup-scala from … (compare)

  • Jun 01 05:25
    dependabot[bot] labeled #164
  • Jun 01 05:25
    dependabot[bot] opened #164
  • Jun 01 05:25

    dependabot[bot] on github_actions

    Bump actions/cache from 2.1.5 t… (compare)

  • May 28 13:36

    cquiroz on master

    Update scala-collection-compat … Merge branch 'master' into upda… Update scala-collection-compat … and 1 more (compare)

  • May 28 13:36
    cquiroz closed #160
  • May 28 13:35

    cquiroz on master

    Update scala-library, scala-ref… Merge pull request #163 from sc… (compare)

Carlos Quiroz
@cquiroz
I’ll try another release
Carlos Quiroz
@cquiroz
diode-react is not being published yet, the build needs an update
Otto Chrons
@ochrons
I can also release the react version manually
Carlos Quiroz
@cquiroz
It seems the problem is with the custom version number for diodeReact
in that case local publication works but it doesn’t try to upload to sonatype
Carlos Quiroz
@cquiroz
The idea for the version number was to decouple diode from the scalajs-react release cycle
but since it is much easier to release it maybe ok to use the same version everywhere
Otto Chrons
@ochrons
yea, sounds good that way... Diode itself is probably not getting lots of changes, but keeping up with scalajs-react might need more frequent updates
Carlos Quiroz
@cquiroz
Ok, sent a PR removing the version
Carlos Quiroz
@cquiroz
@ochrons could you check my PR to get another release out?
Carlos Quiroz
@cquiroz
@ochrons would it be ok to make a new release including my Last PR?
Otto Chrons
@ochrons
sure, go ahead
I've been offline from Gitter for a couple of weeks :)
Carlos Quiroz
@cquiroz
Ok thanks
Carlos Quiroz
@cquiroz
There is a PR updating scalajs-react. I’ll be making new releases every time this happens, unless there is any objection
Armin Keyvanloo
@arminio
Hi @ochrons, how is things?
Any tips on how to go about unit testing with Diode and sjs-react in the mix? We have followed the design pattern that you provided in the SPA tutorial for the react component to:
  • emit a RefreshData from server action
  • the handler makes an ajax call on case RefreshData => and when results are returned by the server, it dispatches another action (a case class) with the list of data (just like your Todo component in the SPA tutorial)
  • the same handler class handles this event also (the data from server) and the component is now successfully initialised
    The issue that we are facing now is that in the unit tests, we don't know how to wait for these steps to be completed by Diode before we do our assertions.
    Any help would be much appreciated!
Otto Chrons
@ochrons
hey Armin, noticed your ping on Twitter, but I'm not really active working on Diode myself at the moment (too busy CEOing at an e-bike startup :) )
Armin Keyvanloo
@arminio
Ok, no worries @ochrons.
Given that I have had no responses here, what do you suggest I should do if I have questions about Diode?
Otto Chrons
@ochrons
at least @cquiroz is actively working with Diode :)
Armin Keyvanloo
@arminio
Cheers @ochrons
Good luck with your startup venture
Carlos Quiroz
@cquiroz
@arminio I only test individual handlers/messages, basically testing the return value. I’m not sure how could you test several messages in succession
Andreas Gabor
@an-tex
Hi. When I Circuit.connect a react component, the component is always rendered twice. To me the issue seems to lie in ReactConnector.didMount which calls .setState(modelReader()) ( https://github.com/suzaku-io/diode/blob/master/diode-react/src/main/scala/diode/react/ReactConnector.scala#L107 ) unnecessarily as it's already set in .initialState(modelReader()) ( https://github.com/suzaku-io/diode/blob/master/diode-react/src/main/scala/diode/react/ReactConnector.scala#L129 ). Is there another reason to re-set the state?
Jeaye Wilkerson
@jeaye
Seems like some examples use ScalaTags for views and other examples use React. Does Diode perform efficiently with the former, or is React necessary?
Carlos Quiroz
@cquiroz
Diode is independent of react, it only cares about handling state, not what you use as view
andres.r.com
@andresrcom_twitter
is there an option to unsubscribe from the subscribe function of the circuit?
val unsubscribe: () => Unit = AppCircuit.subscribe(AppCircuit.zoom(_.appConfig))(config => {
      // do your stuff
      unsubscribe()
    })
Dave Smith
@davesmith00000
Hello - I don't know if I have the time (because I'm mostly building https://github.com/PurpleKingdomGames/indigo - which has a very similar lifecycle to Diode) but I'm tempted to help out for various reasons. If I wanted to have a go, what's the best way to discuss work? Raise an issue and talk about it there? E.g. I can see kind of what might have to happen to make it work with Scala 3, but I have questions, possibly ignorant questions like: Why do you have JVM support? Could you ditch 2.12 support? Are you precious about those lens macros? 🙂
Carlos Quiroz
@cquiroz
Scala 3 support is blocked by the macros
They’d need to be ported
Dave Smith
@davesmith00000
Could they be factored out? So you bring-your-own lens implementation? Or would that be too detrimental to the experience?
Dave Smith
@davesmith00000
Circe does a similar trick I think. You need to provide something to meets the interface/typeclass but you can optionally use libraries that give you generically derived implementations, rather than having to hand roll them.
That would unblock your macro dependency (if it works). They could be ported for convenience at some later date.
Or you could use a different lens implementation entirely, monocle say, or just write them by hand. Again, if it works. 🙂
Carlos Quiroz
@cquiroz
Right I guess all those options are on the table if somebody wants to experiment
Dave Smith
@davesmith00000
I didn't mean to sound presumptuous there. 🙂
Carlos Quiroz
@cquiroz
Those bits on diode are a bit old, there maybe newer and simpler ways to do them, eg as you said with Monocle
Russ White
@russwyte
I am actually using a fork of diode right now that uses monocle for the lens impl. Right now I am only bulding it for scala 3. If I can get it cross building sufficiently I will PR it.
Dave Smith
@davesmith00000
Is scalatags available for Scala 3?
Or are you just using Scala.js elements maybe?
Dave Smith
@davesmith00000
Also, if you are looking at cross building ...does anyone care about 2.12 for Scala.js?
Russ White
@russwyte
I am using my own library for which I have building locally for scala 3
https://github.com/early-effect/Anode
It has a subrproject for diode support
That's my ineterest here :)
Dave Smith
@davesmith00000
Cool :)
Carlos Quiroz
@cquiroz
We can probably drop 2.12 if it makes your life easier
Dave Smith
@davesmith00000
Is diode using a virtual dom or is it just replacing the whole tree on update?
Russ White
@russwyte
Diode itself is completely orthogonal to DOM or front end at all. :)
Dave Smith
@davesmith00000
Yes, ok I see. Thanks.
Dave Smith
@davesmith00000
I was getting that impression actually, just wanted to check I hadn't missed something. It comes across as a Scala.js UI framework - and we badly need a good one - but as you say, Diode does quite do that.
Pity, an Elm-like framework in Scala.js would be awesome. There's Laminar but that's FRP, and sure React bindings exist, but I'm not massively keen on either pattern. Ah well.
domschoen
@domschoen
To start a project using Diode and Play, which example app could I use if I want the latest possible version of Scala, Scala.js, Scala-React and Diode. I like the SPA Tutorial but it using very old versions. May be I can just change the versions in SPA Tutorial but which versions should I use ?