untangled

NEW CHANNEL: #fulcro
tony.kay 2017-02-09T00:38:02.003007Z

@wilkerlucio I've already asked our devs to fix their formatting configs.

wilkerlucio 2017-02-09T12:23:31.003014Z

@tony.kay nice 🙂

tony.kay 2017-02-09T18:39:12.003023Z

@wilkerlucio @mitchelkuijpers @therabidbanana @baris and anyone else thinking of helping with components: I'm going to merge stylekit with components into untangled-ui today. This will enable us to keep the two in sync more easily, and make it easier to work on the shared concern of making the CSS styling into active components. I'll update the README, and try to get at least one component fully written as an example for us to treat as a straw-man for working together on this.

2017-02-09T18:41:31.003024Z

Sounds good. Just watched the video so now I actually get what I signed up for. Nice trick with the syntax quoting for IDE mutation documentation by the way. We've always treated the expansion thing in mutations as a bug instead of harnessing it as a feature. 🙂

tony.kay 2017-02-09T18:42:35.003025Z

thanks. I'm still refining the trick. I don't love defmutation because of the implicit use of state and such

tony.kay 2017-02-09T18:43:23.003027Z

at the moment I lean towards a placeholder defn with the docstring (and a body that is a comment to look at the defmethod below it), and just a real defmethod for the implementation

tony.kay 2017-02-09T18:44:58.003029Z

(defn do-thing "Om Mutation: ..." [{:keys [thing-id]}] (comment "See defmethod"))
(defmethod m/mutate `do-thing [env k {:keys [thing-id]}] ...)

tony.kay 2017-02-09T18:47:18.003030Z

just because of :remote and the warnings that the macro causes. A bigger macro could help:

(defmutation do-thing "doc string" [{:keys [thing-id]}]
   (action [env] body-of-action)
   (remote [env] code-related-to-computing-remote))

tony.kay 2017-02-09T18:47:58.003031Z

would give the IDE advantages and not cause warnings in the defmutation definition AND would allow for remote support

2017-02-09T18:49:52.003033Z

I kind of like the way that looks too.

2017-02-09T18:50:13.003034Z

Makes it more like a defui.

tony.kay 2017-02-09T18:50:17.003035Z

it also prevents you from screwing up and doing the action without the map {:action/:remote}

2017-02-09T18:50:31.003037Z

Something I've done more than once.

tony.kay 2017-02-09T18:50:34.003038Z

me too

tony.kay 2017-02-09T18:51:18.003039Z

if you want to write it, I'll take a PR 😉 otherwise, might get to it in the next few days

tony.kay 2017-02-09T18:51:38.003040Z

the one I wrote already should make it a relatively light task

tony.kay 2017-02-09T18:51:58.003041Z

then again, macros have sucked more than one day out of me when clj/cljs interactions go awry