Open SimonDanisch opened 1 year ago
Thank you very much for this! I greatly appreciate it as I was looking for a way to not make the users set the session themselves.
I will get to this as soon as possible, fix it, and release it in the next version of the library along with some other new stuff!
Awesome package :) Looking forward to see it being used & registered. One thing that should be changed though is this:
This is pretty hacky, since Session isn't something that's easily globally shared. Also, it's somewhat unnecessary for any user to set it, if you properly overload
JSServe.jsrender(s::Session, my_object)
. I haven't looked into this in detail, but I'd propose something like this: All the functions likezstack
should define a small custom struct, like this:Anything else will be pretty hacky, but this should pretty nicely integrate with JSServe, so one can return any CssMakieLayout struct in an
App
. Also, I'd putformatstyle
into a css file and insert it in alljsrender
calls as an asset:DOM.div(Asset("path/to/formatstyle.css"))
. JSServe will make sure, that it will get included only one time, so don't worry about putting it in everyjsrender
.