untangled

NEW CHANNEL: #fulcro
fragamus 2017-02-10T02:10:03.003046Z

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.

tony.kay 2017-02-10T02:21:38.003047Z

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

tony.kay 2017-02-10T02:22:58.003048Z

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.

tony.kay 2017-02-10T03:48:22.003050Z

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

tony.kay 2017-02-10T05:29:05.003051Z

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

tony.kay 2017-02-10T05:29:40.003052Z

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

tony.kay 2017-02-10T05:30:04.003053Z

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

tony.kay 2017-02-10T05:45:42.003054Z

ooops. see one thing to change

pithyless 2017-02-10T12:29:29.003055Z

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

pithyless 2017-02-10T12:30:43.003056Z

^ correction, develop branch, not master

pithyless 2017-02-10T12:37:39.003057Z

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

wilkerlucio 2017-02-10T13:50:10.003063Z

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

wilkerlucio 2017-02-10T14:02:32.003066Z

@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

tony.kay 2017-02-10T16:22:03.003072Z

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

tony.kay 2017-02-10T16:23:14.003074Z

forgot to commit/push

tony.kay 2017-02-10T16:23:39.003075Z

snapshot updated

tony.kay 2017-02-10T16:23:43.003076Z

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

tony.kay 2017-02-10T16:24:35.003081Z

is how it should look now

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

any recommandations for using d3 with om ?

tony.kay 2017-02-10T16:24:50.003083Z

exact same for d3 in Om

tony.kay 2017-02-10T16:25:11.003084Z

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 ?

tony.kay 2017-02-10T16:25:44.003087Z

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

tony.kay 2017-02-10T16:25:56.003088Z

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

?

tony.kay 2017-02-10T16:26:56.003091Z

Yep

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

?

tony.kay 2017-02-10T16:28:00.003094Z

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

tony.kay 2017-02-10T16:28:09.003095Z

does the render update before the actual render

tony.kay 2017-02-10T16:28:52.003096Z

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

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

ok

tony.kay 2017-02-10T16:29:36.003098Z

so you can pass data through, without REact rendering

tony.kay 2017-02-10T16:29:57.003099Z

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 ?

tony.kay 2017-02-10T16:30:47.003102Z

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

tony.kay 2017-02-10T16:31:01.003104Z

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 `

tony.kay 2017-02-10T16:31:30.003108Z

exactly

tony.kay 2017-02-10T16:31:34.003109Z

nested

tony.kay 2017-02-10T16:31:48.003110Z

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

tony.kay 2017-02-10T16:32:06.003111Z

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 ^^

tony.kay 2017-02-10T16:32:48.003114Z

sure

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

tony.kay 2017-02-10T16:34:47.003117Z

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>

tony.kay 2017-02-10T16:35:02.003118Z

the list got "misplaced" in his transition

2017-02-10T16:36:03.003119Z

Sorry 😬

tony.kay 2017-02-10T16:36:54.003120Z

oh, no worries

tony.kay 2017-02-10T16:37:10.003121Z

Pretty sure the list has grown anyway

2017-02-10T16:39:42.003122Z

Found the testimonials!

tony.kay 2017-02-10T16:39:52.003123Z

oh, nice

tony.kay 2017-02-10T16:40:21.003124Z

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 🙂

tony.kay 2017-02-10T16:45:01.003125Z

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

tony.kay 2017-02-10T16:46:37.003126Z

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

tony.kay 2017-02-10T16:46:43.003127Z

stupid crap like that.

tony.kay 2017-02-10T16:47:00.003128Z

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

tony.kay 2017-02-10T16:47:28.003129Z

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

tony.kay 2017-02-10T16:47:44.003130Z

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

tony.kay 2017-02-10T17:02:28.003131Z

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

tony.kay 2017-02-10T17:02:45.003132Z

you can PM me if that is more appropriate

tony.kay 2017-02-10T17:06:41.003133Z

@pithyless @baptiste-from-paris untangled-ui should work now

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

ok, thx

tony.kay 2017-02-10T17:19:32.003135Z

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.

tony.kay 2017-02-10T17:20:11.003137Z

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

tony.kay 2017-02-10T17:21:29.003138Z

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

tony.kay 2017-02-10T18:38:31.003141Z

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

tony.kay 2017-02-10T18:39:15.003142Z

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

2017-02-10T20:40:51.003147Z

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

2017-02-10T20:47:33.003148Z

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.

tony.kay 2017-02-10T20:48:45.003149Z

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

tony.kay 2017-02-10T20:48:51.003150Z

doing a bit of refactoring

mahinshaw 2017-02-10T22:46:45.003153Z

@adambros Thank You! That would be freakin sweet!