untangled

NEW CHANNEL: #fulcro
cjmurphy 2017-06-22T03:13:31.251781Z

Just playing with app.basic-ui. My understanding is that the same keyword is sometimes used as an edge, and sometimes as the the id value in an ident - for instance the keyword :friends (and :enemies). Perhaps it would it make understanding easier if there's some differentiation, so two different keywords used, for example: :friend-edge and :friend-id?

tony.kay 2017-06-22T12:24:38.193800Z

@eric.shao contributions welcome. I don’t personally need react native, so I don’t have a lot of motivation…unless you want to fund such an effort 😉

tony.kay 2017-06-22T12:25:39.208521Z

@claudiu I didn’t realize merge alt unions it didn’t work on the server. You can open an issue. The server-side rendering could use some love. It is low on my personal priority list, but I’d be glad for help cleaning it up. The whole satisfies, implements, etc story between server and client is fun.

gardnervickers 2017-06-22T12:25:50.211316Z

Ah great new, I'll keep an eye on that issue. We've disabled pathopt before to try and avoid problems with our query struture but for our app the performance hit was too high.

tony.kay 2017-06-22T12:26:31.221110Z

@gardnervickers Oh! that’s great news

tony.kay 2017-06-22T12:26:44.224122Z

you should comment on the issue to encourage a fix

tony.kay 2017-06-22T12:26:54.226764Z

#876

tony.kay 2017-06-22T12:27:49.239995Z

stay on the older version for now, as long as it is working for you. I assume you’ve moved transacts towards the root as a workaround for the errors

gardnervickers 2017-06-22T12:28:15.246163Z

I was trying to reproduce the issue yesterday but I didn't make much progress.

tony.kay 2017-06-22T12:28:19.247238Z

which are: “no queries found…” and index OOB exceptions on reconcile.

tony.kay 2017-06-22T12:28:40.252509Z

Unfortunately, recent versions of Untangled were clamping pathopt to ON

tony.kay 2017-06-22T12:28:47.254079Z

even though there was an option to turn it off

tony.kay 2017-06-22T12:29:23.263149Z

BTW: I’m in a Starbucks in the middle of Montana at the moment on a road trip. Need to head out soon.

gardnervickers 2017-06-22T12:29:35.266023Z

Ah nice enjoy!

tony.kay 2017-06-22T12:30:02.272878Z

@wilkerlucio Hm. Did you resolve that?

tony.kay 2017-06-22T12:30:39.282635Z

I didn’t change anything except pathopt…it should not have caused any regressions.

cjmurphy 2017-06-22T12:39:46.421508Z

Not so much edge/join verses table, but edge/join verses what goes into the second place of an ident. In your example :friends was used as both.

tony.kay 2017-06-22T12:40:28.432329Z

OH, I see 🙂

tony.kay 2017-06-22T12:40:36.434533Z

yeah, using keywords as IDs can be confusing I guess

cjmurphy 2017-06-22T12:42:25.462460Z

I quite liked :the-one!

tony.kay 2017-06-22T12:42:53.469316Z

let me think on that some. Perhaps a careful naming update on that guide would be good. Perhaps even doing something silly like starting every ident table name with TABLE. 😄 I knew he was :the-one!

tony.kay 2017-06-22T12:43:14.474345Z

table.people/by-id

cjmurphy 2017-06-22T12:44:31.494606Z

Then also join.people and id.people.

tony.kay 2017-06-22T12:44:48.498799Z

hm. less loving those 😕

tony.kay 2017-06-22T12:45:35.511223Z

If you’re looking at an app state, idents make it obvious what is a join. In a component, the query makes it obvious. Not seeing the need for a naming convention in general on those

tony.kay 2017-06-22T12:45:52.516038Z

but at root, those get confusing

cjmurphy 2017-06-22T12:46:01.518474Z

Not so much a convention I was thinking, just to help people when they see :friends used in many different ways for the example.

tony.kay 2017-06-22T12:46:49.531132Z

so, this is only really a concern on the root node. How about :root/prop-name?

tony.kay 2017-06-22T12:47:09.536206Z

move the root-level props “out of the way” so to speak…then all that’s left is tables.

claudiu 2017-06-22T12:47:31.542300Z

@tony.kay 'The whole satisfies, implements, etc story between server and client is fun.' Is there anywhere where I can find this working, or how should I go about solving this ?

tony.kay 2017-06-22T12:47:43.545406Z

@claudiu Read om/next.cljc. There are a few places where it is split out.

wilkerlucio 2017-06-22T12:50:45.595531Z

@tony.kay: I was able to get around it, it seems something odd is going when the root component requires only keys not present on the data, my fix was to add a :ui/react-key at my initial state, so it always have at least this one present, I might have some time to look on it later and try to pinpoint more exactly whats going on

claudiu 2017-06-22T12:50:53.597958Z

ok 🙂 will try to see if I can get it working. Got a bit stuck on that one since I was expecting it to work 🙂

tony.kay 2017-06-22T12:52:17.621049Z

@claudiu Sorry about that. As far as I knew it was.

cjmurphy 2017-06-22T12:53:23.639623Z

So :root/prop-name means it is an edge used on the root component? Just :friends the id part of the ident. I supposes there is no ns used for :friends, so its available...

tony.kay 2017-06-22T12:54:04.651137Z

I have seen cases where an empty db causes db->tree to not return data for a node. Never heard of that causing problems for root, but I guess if your query gives back nothing, then shouldComponentUpdate might prevent a render? But not an initial render 😕

tony.kay 2017-06-22T12:54:08.652290Z

weird

tony.kay 2017-06-22T12:54:41.661699Z

:root/ means it is off of the root node as a prop OR edge

tony.kay 2017-06-22T12:54:55.665559Z

everything else would then be table names, since nothing else could get there

tony.kay 2017-06-22T12:55:20.673095Z

unless a load loaded something there without that prefix, but I generally :target loads so I can use something convenient for the server naming in the load query.

cjmurphy 2017-06-22T12:58:18.723996Z

[:person-list/by-id :friends] [:person-list/by-id :enemies] was how I understood it. So here these keyswords are not tables, not joins/edges, they are ids.

tony.kay 2017-06-22T12:58:37.729442Z

yep

tony.kay 2017-06-22T12:58:53.734053Z

idents are always [TABLE ID]…the assoc-in, update-in, get-in path of the entity

cjmurphy 2017-06-22T12:59:28.744888Z

Yeah I know - was just saying to help with understanding for people.

tony.kay 2017-06-22T12:59:57.753715Z

right, and if the root edges were like :root/friends it would be clear, since there wouldn’t be a name collision

tony.kay 2017-06-22T13:00:12.760387Z

the ID could still be :friends

claudiu 2017-06-22T13:00:23.764021Z

@tony.kay Will add a issue and in the meantime try to see if I can find a fix. Really slow progress (wedding in 2 months is killing my free time & I'm new to clojure). But would love to help out with untangled if I can. Thank you 🙂

cjmurphy 2017-06-22T13:00:23.764131Z

True - just have a difference is all that is needed.

tony.kay 2017-06-22T13:01:06.778108Z

yeah, and I’m trying to solve the other issues I’ve been wanting to help ppl with: stomping on root props/edges with loads, and making the app state a little easier to read from root.

cjmurphy 2017-06-22T13:01:28.785433Z

You look to one :friends, then look to another, you want them to mean the same thing.

tony.kay 2017-06-22T13:01:41.789587Z

yep. I gotta hit the road. Happy Untangling!

cjmurphy 2017-06-22T13:02:03.796350Z

np thanks! :simple_smile: