untangled

NEW CHANNEL: #fulcro
cjmurphy 2017-06-30T09:13:46.666148Z

In IntelliJ I can Cntl+B 'into' a function to see its code from where it is called. IIRC in one of Tony's video's he shows how 'going into' can be setup to work for mutations as well. Does anyone know how, or what video?? Thanks

currentoor 2017-06-30T13:53:36.537811Z

@tony.kay I think you might have shared a good video property based testing a while back? If by chance you recall, can you please share again?

tony.kay 2017-06-30T14:14:39.999622Z

@currentoor the only testing video that comes to mind was the talk I gave at clj west.

tony.kay 2017-06-30T14:15:04.008590Z

I reference two other talks in it as well

currentoor 2017-06-30T14:16:43.045687Z

well I just found this lol

currentoor 2017-06-30T14:16:43.045915Z

https://www.youtube.com/watch?v=Odp0M39g-LM

currentoor 2017-06-30T14:16:59.051684Z

thanks

tony.kay 2017-06-30T14:17:52.071190Z

@cjmurphy it is one of the Untangled in the Large, but here’s the trick: Use defmutation to make your mutation. This macro sorta looks like a defn. Then, in IntelliJ, click on the defmutation itself and wait for the light bulb to appear (must not be in low power mode). Click on it. Choose “Resolve defmutation as…” and pick defn. Cursive will now recognize the symbols it “defines” as something that can be jumped to, and you can use syntax quoting to get the right namespace.

tony.kay 2017-06-30T14:19:33.108279Z

(ns some-long-ns)

(defmutation boo [params] ...)
(ns y (:require [some-long-ns :as s]))
(transact! this `[(s/boo)])

tony.kay 2017-06-30T14:21:16.147094Z

I’ve recently (in the new combo lib) added a server-side parser and more macros for making server-side reads and mutations (see the new GettingStarted.adoc, look for untangled-parser). The latter looks just like the client defmutation, and therefore supports the same trick for the server.

cjmurphy 2017-06-30T14:22:16.169223Z

Yeah great, cntl+B and Alt+F7 now work with all my defmutations.

tony.kay 2017-06-30T14:23:23.194181Z

surprising where the best gains are, eh? So far two of my favorite usability adds are defmutation with that trick, and InitialAppState

tony.kay 2017-06-30T14:23:42.200878Z

which technically don’t do hardly anything, but they sure make life easier

cjmurphy 2017-06-30T14:25:41.245290Z

Yes InitialAppState more useful in practice than I thought it would be. Like when you have one-ofs it all composes well together.

tony.kay 2017-06-30T14:27:38.288970Z

well, it also enables really easy refactoring, since things just re-compose, and unions for UI concerns without hand-coding the graph.

cjmurphy 2017-06-30T14:27:55.295161Z

I'm writing quite a complicated UI and there's very little 'involved' mucking around with the state. Different from when I remember picking up Om Next at first. load is obviously a big deal too.

tony.kay 2017-06-30T14:28:48.315560Z

yeah, but load is most of the story 😉 I was referring to “trivial” things that added a lot.

tony.kay 2017-06-30T14:29:22.328415Z

InitialAppState was life-changing, but almost stupid simple.

2
cjmurphy 2017-06-30T14:30:12.348215Z

So 👍

claudiu 2017-06-30T20:10:14.233982Z

wow, untangled-spec is pretty awesome 🙂

tony.kay 2017-06-30T20:16:07.329320Z

glad you like it. the latest alpha has a few bugs with server rendering on a browser, but I think Anthony is looking at those

tony.kay 2017-06-30T23:29:47.515880Z

@claudiu So, I got merge alt unions passing server-side tests. I pushed that on develop. I have not actually tried it with SSR yet, but I think it should work.

tony.kay 2017-06-30T23:51:48.656285Z

I pushed a SNAPSHOT on clojars 1.0.0-SNAPSHOT.