untangled

NEW CHANNEL: #fulcro
mitchelkuijpers 2016-11-02T15:31:25.003526Z

Testing with the protocol support is insanely cool

mitchelkuijpers 2016-11-02T15:31:42.003527Z

I love how readable it makes the tests

tony.kay 2016-11-02T15:32:08.003528Z

@mitchelkuijpers Thanks. Our practical experience has been mixed, but I'm pretty happy with the idea 🙂

tony.kay 2016-11-02T15:32:32.003529Z

you using Datomic?

mitchelkuijpers 2016-11-02T15:32:37.003530Z

I only use it for the client-side mutations for now I am about to learn if the serverside stuff is nice

tony.kay 2016-11-02T15:32:52.003531Z

the client-side stuff is the sweet spot for now

tony.kay 2016-11-02T15:33:10.003532Z

the server-side setup is too hard at the moment, and I cannot really recommend it unless you want to help refine that 😉

tony.kay 2016-11-02T15:33:23.003533Z

the idea is solid. The execution is too hard

mitchelkuijpers 2016-11-02T15:33:38.003534Z

I’ll take a look at that we already have a lot of plumbing for testing with datomic and setting up the right db state

mitchelkuijpers 2016-11-02T15:34:00.003535Z

So that might help us (just guessing)

tony.kay 2016-11-02T15:34:11.003536Z

ours is underdocumented, but the tempid/seeding support in untangled is really solid

tony.kay 2016-11-02T15:34:14.003537Z

for testing etc

tony.kay 2016-11-02T15:34:58.003538Z

the hard part is that we really should have an easier way to "process" the server mutations without involving so much. it's too tangled, unfortunately 😕

mitchelkuijpers 2016-11-02T15:35:21.003539Z

Do you guys have any experience btw with mocking (.preventDefault e) for now I have just moved it to a function that I can mock

tony.kay 2016-11-02T15:35:52.003540Z

exactly. That is something we should do better in spec if possible, but I haven't looked too hard at the problem yet

mitchelkuijpers 2016-11-02T15:36:14.003541Z

Seems like a very hard problem, and you can argue that you should put this kind of stuff in helper funcs

tony.kay 2016-11-02T15:36:32.003542Z

well, that and protocols are a problem

tony.kay 2016-11-02T15:36:35.003543Z

and inline

mitchelkuijpers 2016-11-02T15:36:46.003544Z

Yeah inline would be very hairy I think

tony.kay 2016-11-02T15:54:55.003547Z

Anyone interested in a minor contribution: the generate stubs that @wilkerlucio was talking about earlier is a problem in our figwheel setup. https://github.com/cursive-ide/cursive/issues/1532#issuecomment-257904363 If anyone wants to figure out the specific fix I'd be glad to put take a PR for it. Affects template, om-css, and about every other project in Untangled

wilkerlucio 2016-11-02T16:10:00.003549Z

@tony.kay fix: https://github.com/awkay/untangled-template-workspace/pull/1

👏 2
tony.kay 2016-11-02T17:02:58.003551Z

@wilkerlucio figured it would be easy 🙂

tony.kay 2016-11-02T17:03:00.003552Z

thx

2016-11-02T18:28:13.003553Z

Even with :marker false, load-field-action still replaces the destination in app-state with nil/dissoc the key, when the read starts, and then finally fills it in with the value with the read finishes.

2016-11-02T18:28:54.003554Z

this causes UI to flicker as it first renders nil, then renders the value during a load, even though, initially the global app state had real values (from a previous load-field-action)

tony.kay 2016-11-02T20:10:54.003557Z

@jasonjckn on 0.6.0-SNAPSHOT? I thought I got all of those

tony.kay 2016-11-02T20:11:32.003558Z

if so, open an issue. It should be an easy fix. Maybe load-field-action isn't passing marker false through

2016-11-02T20:39:12.003559Z

haven't tested 0.6.0-SNAPSHOT, will do

2016-11-02T20:40:09.003560Z

is it fully backwards compatible with 0.5?

2016-11-02T20:43:24.003561Z

ok read the changelog, it looks backwards compatible, but deprecated api.

2016-11-02T21:49:22.003562Z

my co-worker tried 0.5.7 which had the marker false fix in the changelog, and he says it's still swapping in nil into global state during a loading phase

2016-11-02T21:49:50.003564Z

i will double check this on 0.6.0 tomorrow and file a bug report

currentoor 2016-11-02T22:02:14.003566Z

I raised this issue in bidi, but haven’t seen a response

currentoor 2016-11-02T22:02:20.003567Z

has anyone here dealt wit this?

currentoor 2016-11-02T22:02:21.003568Z

https://github.com/juxt/bidi/issues/145

currentoor 2016-11-02T22:02:31.003570Z

using tempids in bidi routes

adambros 2016-11-02T23:30:33.003571Z

@currentoor why would you want that to be in bidi itself? looks like you have exactly what you need to make it work

adambros 2016-11-02T23:32:53.003573Z

i might also just be reading your code wrong

adambros 2016-11-02T23:35:32.003574Z

aand i was reading it wrong

adambros 2016-11-02T23:43:32.003575Z

so i tried this locally and it worked:

adambros 2016-11-02T23:45:25.003577Z

you may be doing a few things wrong, but i would guess that your [[tempid :id] “/edit”] is what’s wrong

adambros 2016-11-02T23:45:41.003578Z

or you may not be doing the extend-protocol right

adambros 2016-11-02T23:48:32.003580Z

can you fully namespace methods in an extend-protocol?

currentoor 2016-11-02T23:53:24.003581Z

@adambros i believe that works because you’re not giving id a type, so it just defaults to a string, which is not what I’m trying to do

currentoor 2016-11-02T23:54:12.003586Z

this way types are enforced and encoded into the route

currentoor 2016-11-02T23:54:42.003587Z

so it works with the built in types like long and uuid

adambros 2016-11-02T23:54:56.003588Z

so the [tempid :id] part is saying it should be transformed with tempid?

currentoor 2016-11-02T23:55:06.003589Z

exactly

currentoor 2016-11-02T23:55:58.003590Z

i want to be able to use tempid as a first class type

currentoor 2016-11-02T23:56:11.003591Z

what i have works but it’s a hack IMO

adambros 2016-11-02T23:56:15.003592Z

but i can (om.tempid/tempid “asdf”) ;=&gt; <#C06DT2YSY|om>/id[”asdf"]

currentoor 2016-11-02T23:56:43.003593Z

yes you can, and i would like bidi to do that for me, by me implementing a protocol or two

currentoor 2016-11-02T23:56:56.003594Z

just like it does for uuids

adambros 2016-11-02T23:57:01.003595Z

well i think i’ve exhausted my bidi knowledge then

adambros 2016-11-02T23:57:08.003596Z

sorry

currentoor 2016-11-02T23:57:14.003597Z

no worries 😄

currentoor 2016-11-02T23:57:34.003598Z

if i can get this working i might make an untangled-router 😅

currentoor 2016-11-02T23:57:56.003599Z

we’ve got it in our app and it works pretty well

adambros 2016-11-02T23:58:03.003600Z

if you can or can*t* get it working?

currentoor 2016-11-02T23:58:20.003602Z

not sure what you mean

adambros 2016-11-02T23:58:34.003604Z

did you mean, if i cant get this working i might make an untangled router?

adambros 2016-11-02T23:59:10.003605Z

oh wait i think i just misunderstood again

currentoor 2016-11-02T23:59:27.003606Z

if i am able to figure out how to extend the bidi types to support om tempids, then i will try make a router for untangled, from the one we have in our app