Fork me on GitHub
#untangled
<
2016-06-17
>
tony.kay17:06:57

@jasonjckn: Hm. So, I'm not seeing nested normalization working on the older version

tony.kay17:06:55

oopps...bad query

tony.kay17:06:14

hm...no, bad eyes

jasonjckn18:06:31

@tony.kay: need anything from me? when I tested it worked on 0.5.2 but not 0.5.3-snapshot

tony.kay18:06:00

no...I'm just confused. I can't see it working with nested normalization at all

tony.kay18:06:08

which makes me think I'm just not awake enough

tony.kay18:06:26

on 0.5.2 or otherwise

jasonjckn18:06:40

i'll try to whip up a working version

tony.kay18:06:24

Not sure that is worth it

tony.kay18:06:38

I'm in the midst of tracing through the guts ,so, should find it eventually

tony.kay18:06:41

@jasonjckn: That should fix it. Pushed new snapshot to clojars

tony.kay18:06:49

I really don't believe it was working right ever

tony.kay18:06:54

but it is now

tony.kay18:06:42

initial app state example in cookbook (on develop) pushed

tony.kay18:06:50

shows how to do both kinds of unions

tony.kay18:06:54

(to one and to many)

tony.kay18:06:32

also fixes the not-found mess

jasonjckn18:06:32

wicked, works perfectly 😄

jasonjckn18:06:51

great work, thanks!

tony.kay18:06:45

welcome. Unions are screwy, so I'm glad to have this automated helper...makes things so much better. And the initial-app-state cookbook recipe is so trivial and clear now...very nice

tony.kay18:06:03

(even though it has both a to-one and to-many union that need initial app state)

tony.kay18:06:20

definitely a huge improvement in local reasoning and simplicity

jasonjckn18:06:30

agreed, very happy with this

tony.kay18:06:14

I'll probably cut a release of 0.5.3. Need to make some more docs, tutorial, and training vids on this

tony.kay18:06:48

Done. 0.5.3 of Untangled Client on Clojars

jasonjckn19:06:06

one day i was thinking of implementing mixins for om.next like https://github.com/plumatic/om-tools but probably won't have time for a while 😉

jasonjckn19:06:15

with it you could abstract the pattern of tabs into a mixin

therabidbanana19:06:31

We got bit by https://github.com/omcljs/om/issues/604 today - wasn't sure what you guys were discussing at the time but glad I remembered there might be an om bug or could have wasted a lot of time on it.

jasonjckn19:06:53

cool, looking forward to that one being closed

therabidbanana19:06:13

In our case it's working with enums in datomic, so it doesn't really make sense to normalize those (changing {:db/ident x} to [:enum/by-ident x] doesn't seem to gain anything), but we might end up normalizing them anyway just to get it working.

ethangracer20:06:23

@therabidbanana: you could consider using untangled.datomic.core/replace-ref-types so you don’t have to refer to enums in a nested data structure. that’s what we do for all of our enums

jasonjckn21:06:52

when I do load-field-action, the field gets replaced with an untangled loading keyword, and there's a rerender that happens, what if I just want to keep the old data around and rendered until the new data comes in ?

jasonjckn21:06:11

as oppose to rendering "loading..."

jasonjckn21:06:32

i could have two fields, one for just loading data with, and one for rendering

jasonjckn21:06:42

any way to keep just the 1 field ?

tony.kay21:06:17

don't use load-field 🙂

tony.kay21:06:43

use load-data with a post mutation that puts the new thing into place

jasonjckn21:06:03

why not load field?

tony.kay21:06:18

load-field just builds the query for you, but if puts the marker in the app state at that spot

tony.kay21:06:33

actually, not sure load-data is going to work for you either

jasonjckn21:06:43

oh.. i can try it

tony.kay21:06:18

Untangled does the loading marker for your convenience...it doesn't need to do it; however, we don't currently have a way for you to say "don't do it"

jasonjckn21:06:33

that would be a good feature

tony.kay21:06:37

probably should, yes

jasonjckn21:06:50

saves me from having two fields for a lot of stuff

tony.kay21:06:06

it would be trivial to add...just put something in the load mutation that records "no loading marker"

tony.kay21:06:52

The plumbing, when reading the ready-to-load, peppers those around in app state...it could filter out the ones marked that way

tony.kay21:06:01

it's like 4-5 lines of new code

tony.kay21:06:37

put an issue in github if you'd like, or a PR.

jasonjckn21:06:00

i hooked up a spinner to :ui/loading-data on the root, so I really don't need any UIs like "loading.." throughout my entire app

jasonjckn21:06:06

since I have the spinner now whenever something is loading

tony.kay21:06:14

yep...makes sense. have a good weekend, I'm out early.

therabidbanana22:06:52

@ethangracer: thanks - I'll take a look at that - sounds relevant to our needs