keechma

Keechma stack. Mention @U050986L9 or @U2J1PHYNM if you have any questions
carkh 2019-06-03T14:19:36.084700Z

@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.

mihaelkonjevic 2019-06-03T14:23:02.087Z

@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

carkh 2019-06-03T14:23:32.087600Z

oh silly me, that's the content of the tag

carkh 2019-06-03T14:28:53.091Z

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 ?

mihaelkonjevic 2019-06-03T14:35:53.093100Z

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.

carkh 2019-06-03T14:36:11.093600Z

ok exactly what i expected

carkh 2019-06-03T14:36:16.093900Z

thanks

mihaelkonjevic 2019-06-03T14:36:22.094100Z

also, you’ll probably need to do some orchestration between channels and promises, but that shouldn’t be to hard

carkh 2019-06-03T14:37:06.094800Z

no problem with that.... i like the css stuff you have goign on there, no magic at all and good for instant feeback

mihaelkonjevic 2019-06-03T14:38:27.095800Z

yeah, it’s pretty simple, but it works. You can also use https://github.com/retro/garden-basscss for some good base classes

carkh 2019-06-03T14:39:13.096600Z

i do, due to copy pasting your projects =)