Fork me on GitHub
#untangled
<
2017-02-10
>
fragamus02:02:03

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.kay02:02:38

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

tony.kay02:02:58

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.kay03:02:22

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

tony.kay05:02:05

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

tony.kay05:02:40

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

tony.kay05:02:04

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

tony.kay05:02:42

ooops. see one thing to change

pithyless12:02:29

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

pithyless12:02:43

^ correction, develop branch, not master

pithyless12:02:39

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

baptiste-from-paris13:02:59

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-paris13:02:30

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

baptiste-from-paris13:02:36

can someone explain it to me ?

baptiste-from-paris13:02:17

@pithyless same problem here for untangled-ui

wilkerlucio13:02:10

@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-paris13:02:14

and what about the ui prefix tag ?

wilkerlucio14:02:32

@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

tony.kay16:02:03

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

baptiste-from-paris16:02:32

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

tony.kay16:02:14

forgot to commit/push

tony.kay16:02:39

snapshot updated

tony.kay16:02:43

sorry bout that 😊

baptiste-from-paris16:02:16

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

tony.kay16:02:35

is how it should look now

baptiste-from-paris16:02:37

any recommandations for using d3 with om ?

tony.kay16:02:50

exact same for d3 in Om

tony.kay16:02:11

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

baptiste-from-paris16:02:14

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

baptiste-from-paris16:02:43

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

tony.kay16:02:44

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

tony.kay16:02:56

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

baptiste-from-paris16:02:51

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

baptiste-from-paris16:02:43

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

tony.kay16:02:00

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

tony.kay16:02:09

does the render update before the actual render

tony.kay16:02:52

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

tony.kay16:02:36

so you can pass data through, without REact rendering

tony.kay16:02:57

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

baptiste-from-paris16:02:24

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

tony.kay16:02:47

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

tony.kay16:02:01

is that a js/Object or a cljs map?

baptiste-from-paris16:02:24

which I have to #js `

tony.kay16:02:48

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

tony.kay16:02:06

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

baptiste-from-paris16:02:24

right but my customer heavily use data viz...

baptiste-from-paris16:02:25

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

tony.kay16:02:47

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:[email protected]|[email protected]>

tony.kay16:02:02

the list got "misplaced" in his transition

tony.kay16:02:54

oh, no worries

tony.kay16:02:10

Pretty sure the list has grown anyway

ethangracer16:02:42

Found the testimonials!

tony.kay16:02:21

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.kay16:02:01

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

tony.kay16:02:37

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

tony.kay16:02:43

stupid crap like that.

tony.kay16:02:00

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

tony.kay16:02:28

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

tony.kay16:02:44

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

tony.kay17:02:28

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

tony.kay17:02:45

you can PM me if that is more appropriate

tony.kay17:02:32

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.kay17:02:11

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

tony.kay17:02:29

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

tony.kay18:02:31

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.kay18:02:15

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

baris20:02:51

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

therabidbanana20:02:33

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.kay20:02:45

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

tony.kay20:02:51

doing a bit of refactoring

mahinshaw22:02:45

@adambros Thank You! That would be freakin sweet!