Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 23 19:07
    Zhen-hao closed #428
  • Apr 22 10:43
    fomkin closed #419
  • Apr 22 10:34
    fomkin commented #428
  • Apr 20 20:33
    Zhen-hao opened #428
  • Apr 17 10:15

    fomkin on master

    Make .toKorolev work for a ZStr… (compare)

  • Apr 17 10:15
    fomkin closed #426
  • Apr 15 09:31
    fomkin closed #427
  • Apr 15 09:15
    Marc-Ducret commented #427
  • Apr 15 08:53
    fomkin commented #427
  • Apr 14 08:47
    fomkin commented #427
  • Apr 14 08:39
    Marc-Ducret commented #427
  • Apr 13 16:51
    fomkin commented #427
  • Apr 13 16:13
    Marc-Ducret opened #427
  • Apr 12 11:03
    Esardes synchronize #422
  • Apr 12 06:33
    olivierdeckers opened #426
  • Apr 12 06:33
    olivierdeckers commented #420
  • Apr 11 13:22
    Esardes synchronize #422
  • Apr 11 09:57
    Esardes edited #422
  • Apr 11 09:51
    Esardes synchronize #422
  • Apr 11 08:45
    Esardes edited #422
Zhenhao Li
@Zhen-hao
for example: def create(p: Parameter): Component[...
Henrik Härkönen
@heharkon
Wow, very interesting improvements in 0.17! Especially I was thinking a similar issue than the #333 was, cool!
Henrik Härkönen
@heharkon
btw, now as the Scala 3 is just around the corner, would it be a simple trick to jump to that wagon with Korolev?
I see there's some sort of compatibility / cross-compiling possibility
Zhenhao Li
@Zhen-hao
hi, is it possible to transition to a URL instead of a state? namely redirect
Zhenhao Li
@Zhen-hao
hi all, I've built https://pairtime.com/ with Korolev and Akka. I hope it is a useful product to this community as well.
Aleksey Fomkin
@fomkin
@heharkon I ported Levhsa to Scala 3 https://github.com/fomkin/levsha/releases/tag/v1.0.0 Next step is Koroloev.
Zhenhao Li
@Zhen-hao
this is awesome!
@fomkin once Scala 3 is supported in Korolev, I can help with marketing. it's a shame that a lot of people in the Scala community are not aware of it
Zhenhao Li
@Zhen-hao
does Levhsa 1.0 work well with the current Korolev version?
Aleksey Fomkin
@fomkin
I did not try but it should be compatible.
Henrik Härkönen
@heharkon
@fomkin Nice! :thumbsup: :smiley:
Aleksey Fomkin
@fomkin
@/all Korolev 1.0.0-RC1 with Scala 3 support is out. https://github.com/fomkin/korolev/releases/tag/v1.0.0-RC1
Zhenhao Li
@Zhen-hao
that's fast! thank you for all the work!
Binh Nguyen
@ngbinh
great, thanks
Zhenhao Li
@Zhen-hao
@fomkin is there a document about how Korolev handles cookies?
Aleksey Fomkin
@fomkin
No :(
Zhenhao Li
@Zhen-hao
ok. I will check the source code as I'm writing my user agreement and cookie policy. I might create a PR later
Zhenhao Li
@Zhen-hao
@fomkin do you have a Twitter account for the project? I'm going to announce PairTime later today and I want to tag Korolev and Akka. it may helps with marketing this project
steffenlaursen
@steffenlaursen
Very, very interesting. How would it work with having an infinite scrolling html-table? Every time the end of the page (for instance, every 100 rows) is reached, the server should fetch the next bunch of rows and update the client UI.
10 replies
Zhenhao Li
@Zhen-hao

hi, I see val defer: AttrDef = AttrDef(ns, "defer") is defined in levsha
but when I try to use in

script(
            defer,
            AttrDef(levsha.XmlNs.html, "data-domain") := "pairtime.com",
            src := "https://plausible.io/js/plausible.js")

I got

[error] /workspace/pairtime/nt-ui/src/main/scala/com/nt/front/UiWebService.scala:136:13: type mismatch;
[error]  found   : levsha.dsl.AttrDef
[error]  required: levsha.Document[korolev.Context.Binding[scala.concurrent.Future,com.nt.front.UiState,com.nt.front.UiEvent]]
[error] Error occurred in an application involving default arguments.
[error]             defer,
[error]             ^
Zhenhao Li
@Zhen-hao
defer := "", did the trick
steffenlaursen
@steffenlaursen
image.png
Trying to run the example from the user guide. Got this upon opening the browser on localhost:8080
Zhenhao Li
@Zhen-hao
@steffenlaursen it is not clear what you are trying to do. if you create a post on https://pairtime.com, I can help you for free on Friday or Saturday. You can psot the link here after creating the post.
steffenlaursen
@steffenlaursen
image.png
@Zhen-hao Trying to run https://fomkin.org/korolev/user-guide.html : sbt new fomkin/korolev.g8 -- I'll see if I can get to pairtime
steffenlaursen
@steffenlaursen
@Zhen-hao Hi again. I did get it working now. I think the solution was to update to the latest JDK version... Before, I think I ran 1.8.
2 replies
morozov11
@morozov11
korolev 1.0.0 has been released!
Zhenhao Li
@Zhen-hao
hi, is there an example of using radiogroup?
Zhenhao Li
@Zhen-hao
Zhenhao Li
@Zhen-hao
I think I need to use downloadFormData to work with radio input
slapedra
@slapedra

Hi

The version 1.0.0, compared to RC2 and older versions, show an error "Promise already completed" on routing or refresh in the akka server example.

Do you have similar error?

1 reply
heharkon
@heharkon:matrix.org
[m]
@slapedra: plot twist! it happens only with scala 2.13, but not with scala 3.0.2
Aleksey Fomkin
@fomkin
It's a bug and we working on this. Do not use previous versions, because they have "infinite reconnects" bug. Also 1.0.0 includes significant performance improvements in DOM diff algorithm.
Aleksey Fomkin
@fomkin
heharkon
@heharkon:matrix.org
[m]
Great to hear! Awesome to see Korolev achieve 1.0.0 👍️
Aleksey Fomkin
@fomkin
https://github.com/fomkin/korolev/releases/tag/v1.0.1
  • Fix: Error when close page #401
  • Fix: WebSocket via Akka-http not work on iOS 15 via LTE #403
Aleksey Fomkin
@fomkin
@Zhen-hao FYI #403 is important for production use. Latest iOS uses rare WebSocket feature that had not supported before v1.0.1.
3 replies
http4s and zio-http interop stil contain this bug
Aleksey Fomkin
@fomkin
Thanks to @greenhost87 for contribution!
Zhenhao Li
@Zhen-hao
hi, is there a tool to convert html code/file to korolov scala code? for easily working with UI designers
Aleksey Fomkin
@fomkin
2 replies
Zhenhao Li
@Zhen-hao
hi, does korolev have drag and drop file upload out of the box?
2 replies
Zhenhao Li
@Zhen-hao
Gabor Dorcsinecz
@gabor-dorcsinecz
Hi, is there a way to send/push out-of-band messages from the server side to the browser? I'm looking at the code examples, but I can only find the akka-streams example, however the trick is that the Source.tick code is inside the Extension, and therefore can access the Context.BaseAccess object and therefore can call access.publish().
I don't see any way of accessing that outside of the extension. Is there any way to do it?
My problem is, that in other parts of the code I receive some messages from outside api's and need to inform the browsers about it...
Thanks
2 replies
Zhenhao Li
@Zhen-hao
to anyone who is interested, I'm preparing my company to hire people outside of the EU and hopefully will be able to do so soon. If you want to relocate to The Netherlands, send me an email (zli@natural-transformation.com) or contact me on LinkedIn. I can also use my network to help people find jobs that are not publically listed.
I'm against the war but support the Korolev community.
Olivier Deckers
@olivierdeckers

Hi, I am trying to stream a ZStream of bytes to the frontend to implement a file download. My ZStream is wrapped in a ZManaged toclose the inputstream after the file was downloaded. I am running

zManagedByteStream.use({ stream =>
                    for {
                      stream <- stream.buffer(1024).toKorolev
                      (consumed, stream2) = stream.handleConsumed
                      _ <- access.uploadFile("test.pdf", stream2.map(bs => Bytes.wrap(bs.toArray)), None, MimeTypes.`application/pdf`)
                      _ <- consumed
                    } yield ()
                  })

I added the _<-consumed to make sure the ZManaged finalizer doesn't run before the full stream is consumed. When running this, the system fails with an InterruptedException, while consuming the stream fully within ZIO and afterwards uploading the bytes works fine. Am I doing something wrong?

Olivier Deckers
@olivierdeckers
I found the issue, it was caused by a useNow in the zio-streams interop code. I opened a PR with a fix
Zhenhao Li
@Zhen-hao
hi, is it possible to get the sessionId from a korolev.server.HttpRequest?