untangled 2017-02-10

I want to ask your advice on the best way to monitor for changes introduced to the datomic DB that did not originate locally. presumably there would be a periodic polling of the DB but should the polling loop reside in the UI or what? Perhaps I can monitor the Datomic log and look for newness and if I find it, then perform some kind of refresh of the UI.

@fragamus Websockets + track what the UI is interested in on server + Datomic tx log + server websocket push of novelty

I'm pushing constant updates to the https://github.com/untangled-web/untangled-ui project. I'm trying to flesh out some examples for contributors. I'll try to keep the README up to date and informative about how to contribute. I'm making some devcards to demonstrate some possible plans of attack.

@therabidbanana I wrote the new defmutation, FYI...will release soon

defmutation with remote and action support is on clojars in 0.7.1-SNAPSHOT. See mutations-spec.

love to hear feedback and verification that it is right. Should make Cursive mutation navigation and docstrings work

as in the untangled-in-the-large video about components. Refactoring that source at some point too

ooops. see one thing to change

@tony.kay Checking out untangled-ui master, but getting this: Invalid :refer, var untangled.client.mutations/defmutation does not exist

^ correction, develop branch, not master

Is the released clojar up-to-date? I’m fetching untangled-client-0.7.1-20170210.055224-4.pom

baptiste-from-paris 2017-02-10T13:28:28.003058Z

hello guys

baptiste-from-paris 2017-02-10T13:28:59.003059Z

I’ve found in the untangled doc this sentence =>

Using InitialAppState
This is probably the easiest method to code, and the easiest to keep straight during development because the data is co-located with the queries and UI bits. The only disadvantage is that you cannot easily initialize parts of the graph that do not have a UI representation (which is probably rare).

baptiste-from-paris 2017-02-10T13:29:30.003060Z

I can’t understand why you can’t initialize parts of the graph that do not have UI

baptiste-from-paris 2017-02-10T13:29:36.003061Z

can someone explain it to me ?

baptiste-from-paris 2017-02-10T13:32:17.003062Z

@pithyless same problem here for untangled-ui

@baptiste-from-paris you can't initialize other parts because once you use InitialAppState it's going to take over the control of the initial app state, that will be built in a similar way that you root query is built, so, if there isn't a component telling to put some data there, you won't have other place to do it. makes sense?

baptiste-from-paris 2017-02-10T13:51:03.003064Z

oh ok

baptiste-from-paris 2017-02-10T13:51:14.003065Z

and what about the ui prefix tag ?

@baptiste-from-paris in InitialAppState it makes no difference, if you want to start some ui prefix there it's just going to work, the only place where ui prefix matters in when calling a remote, in those cases it will be elided, otherwise it works as any other keywords

baptiste-from-paris 2017-02-10T14:02:53.003067Z

ok ok thx

@pithyless @baptiste-from-paris looking at it...was working late, may have messed up 🙂

baptiste-from-paris 2017-02-10T16:22:32.003073Z

yes I figured this out when I checked your local time ^^

forgot to commit/push

snapshot updated

sorry bout that 😊

baptiste-from-paris 2017-02-10T16:23:55.003077Z

no problem

baptiste-from-paris 2017-02-10T16:24:16.003078Z

by the way, in your tuto you are giving an example with d3.js

is how it should look now

baptiste-from-paris 2017-02-10T16:24:37.003082Z

any recommandations for using d3 with om ?

exact same for d3 in Om

Untangled is using stock Om for everything UI...state management decisions are all we're making

baptiste-from-paris 2017-02-10T16:25:14.003085Z

ahah, was not using clojure at that time, but I’ll check

baptiste-from-paris 2017-02-10T16:25:43.003086Z

yes but d3 has it’s own diff algo right ?

the devguide for Untangled shows d3, and I think that will work with stock Om next

yes, you have to give d3 control of that part of the DOM

baptiste-from-paris 2017-02-10T16:26:51.003089Z

ok, that’s why you have to turn shouldComponentUpdate to false

baptiste-from-paris 2017-02-10T16:26:53.003090Z

?

baptiste-from-paris 2017-02-10T16:27:43.003092Z

ok ok, but IQuery u/InitialAppState should be the same

baptiste-from-paris 2017-02-10T16:27:44.003093Z

?

(componentWillReceiveProps [this props] (render-squares this props))

does the render update before the actual render

and then S.C.U. short-circuits the React render

baptiste-from-paris 2017-02-10T16:29:04.003097Z

ok

so you can pass data through, without REact rendering

the other Untangled/Om state management stuff can be leveraged to do the data from above, sure

baptiste-from-paris 2017-02-10T16:30:24.003101Z

right that’s great, other than that, have you find other special cases with d3 ?

Other than it is a pain to use js libraries of that complexity from cljs 😉

baptiste-from-paris 2017-02-10T16:30:54.003103Z

lol

is that a js/Object or a cljs map?

baptiste-from-paris 2017-02-10T16:31:10.003105Z

cljs map

baptiste-from-paris 2017-02-10T16:31:24.003106Z

which I have to #js `

so, wrapper functions are nice. There are wrapper libs too

but other than that, have not noticed any difficulties. Don't use it heavily

baptiste-from-paris 2017-02-10T16:32:24.003112Z

right but my customer heavily use data viz...

baptiste-from-paris 2017-02-10T16:32:35.003113Z

*want to use ^^

baptiste-from-paris 2017-02-10T16:33:25.003115Z

and I don’t have to have js and cljs for the same project

baptiste-from-paris 2017-02-10T16:33:58.003116Z

*don’t want

Hey all. Some time ago @ethangracer moved on to a new job, and he had gathered up "Companies using Untangled" along with some quotes we could use on the website. If any of you are willing to let us add you and your comments to our website please email me at <mailto:twkay@thenavisway.com|twkay@thenavisway.com>

the list got "misplaced" in his transition

oh, no worries

Pretty sure the list has grown anyway

Found the testimonials!

so, if you'd already given Ethan one, let me know if you want to update it. Otherwise if you're newer, go ahead and email me 🙂

argh...can anyone tell me a set of rules for defining macros in cljc files that actually work right with :require 😞

I seem to get all sorts of erratic behavior...like I can reset autobuild and they suddenly start working

stupid crap like that.

guessing it is still buggy, but don't discount my own possible ignorance

seems like if I go back to the :require-macros bit it works

but I thought the new support was supposed to allow :refer for both now

@jasonjckn @mitchelkuijpers Did either of you have permission for us to use your company name/plug on a website?

you can PM me if that is more appropriate

baptiste-from-paris 2017-02-10T17:12:19.003134Z

ok, thx

I'm thinking it might be nice to allow/encourage people to add components that render with other CSS toolkits into the namespaces of untangled-ui. E.g. in the buttons namespace, perhaps have the default ui-button be the one that uses the framework, then allow bootstrap-button, etc. Another approach would be to make rendering into an internal multimethod where one could set some global like *ui-framework* to :bootstrap and, if available, the component would just naturally use the alternate rendering.

this is kind of a "ground floor" decision. Love to hear comments/ideas

I'll add a devcard that demonstrates what I'm thinking at least

Basically, I'm strongly leaning towards allowing people to add support for their fav CSS framework, but either in a namespace or with function name prefixing. My conclusion is that trying to make a unified API will lead to more complexity and headaches than it is worth. I'm guessing people will rather just make their own library in general, but I'm open to having the components here. There is probably quite a bit of code re-use that can happen for more complex components (e.g. like image library).

but for simple things like button, it just doesn't make a lot of sense. There's nothing really to re-use since the attribute maps and possible DOM wrapping vary so much

I would prefer to stick to one “css” framework before starting to support a bunch of them. It’d make more sense to get a rich set of components out of the door

Yeah. I think with any of the frameworks the goal is that you can customize to suit your needs anyway, so as long as it's obvious how to do that I don't see a reason to make the framework choice itself customizable.

agreed. ok. I'll finish touching up a few examples

doing a bit of refactoring

@adambros Thank You! That would be freakin sweet!