This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-06-03
Channels
- # announcements (12)
- # beginners (44)
- # boot (27)
- # calva (73)
- # cider (1)
- # clj-kondo (9)
- # cljdoc (9)
- # cljs-dev (15)
- # cljsrn (6)
- # clojure (90)
- # clojure-dev (5)
- # clojure-europe (4)
- # clojure-ireland (3)
- # clojure-italy (22)
- # clojure-mexico (2)
- # clojure-nl (8)
- # clojure-uk (32)
- # clojurescript (12)
- # core-async (2)
- # cursive (16)
- # data-science (10)
- # datascript (3)
- # datomic (44)
- # emacs (17)
- # events (4)
- # graalvm (1)
- # hoplon (5)
- # jackdaw (17)
- # keechma (11)
- # nrepl (7)
- # off-topic (24)
- # re-frame (19)
- # reitit (4)
- # rewrite-clj (2)
- # robots (9)
- # shadow-cljs (20)
- # sql (12)
- # testing (4)
- # tools-deps (23)
- # vim (55)
@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
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.
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