@mihaelkonjevic using defelement for css from toolbox, and looking at your github project devtools, I see that you use some of these elements by passing additional parameters like this : [-event-batch-label "BATCH #" batch-num]
but i don't understand what the defined element is doing with those parameters.
@carkh defelement creates a reagent keyword with assigned classes, and registers the css in the css atom. It’s a bit more involved to get it running, but you can check here:
https://github.com/retro/protok-frontend/blob/master/src/protok/core.cljs#L30 https://github.com/retro/protok-frontend/blob/master/src/protok/styles.cljs .
So you can use defelement var as you would use any other reagent tag - it will look something like this: :div.added-classes.var_namespace--var-name
oh silly me, that's the content of the tag
thanks ! also i went ahead and started the real thing, which is a chrome extension. in an extension the pages communicate with a background page via a special websocket like api... i have the thing working outside of keechma, but i need to integrate this with dataloader. So the design would be to create a controller to maintain the communication channel and the datasources loader functions would access the controller's channel... Sounds about right ?
yes, but it will require some trickery. So in your loader fn, you have access to the app-db. Running controller instances are stored in the app db [:internal :running-controllers :controller-key]
so you get the controller from there and then send the messages to it.
ok exactly what i expected
thanks
also, you’ll probably need to do some orchestration between channels and promises, but that shouldn’t be to hard
no problem with that.... i like the css stuff you have goign on there, no magic at all and good for instant feeback
yeah, it’s pretty simple, but it works. You can also use https://github.com/retro/garden-basscss for some good base classes
i do, due to copy pasting your projects =)