Fork me on GitHub
#untangled
<
2017-05-18
>
ianchow03:05:09

does untangled-websockets work with the new, modular untangled-server?

tony.kay03:05:53

@ianchow Sure. You just have to work the server-side handler into the stack.

tony.kay03:05:43

@cjmurphy Hm. I’ll pull it down and take a look.

tony.kay03:05:24

@cjmurphy So, I never got the error you described, but I first made sure the projects deps were clean. There were some problems there. Then, there were some render issues, but everything in the console was clean.

tony.kay03:05:43

I’m double-checking my fixes to the re-render, but I think your problems were largely project-file based

tony.kay03:05:40

I’ll send you a PR with the patch in a few mins

tony.kay03:05:46

So, I think there is a bug in Om. If you try to trigger a re-render on root with a property keyword it doesn’t seem to re-render, though if you use a keyword from a join it is fine.

tony.kay03:05:35

So, the main thing I did was change the follow-on read where edit is transacted to use :main-ui-router as the follow-on read, and that seems to fix it.

tony.kay03:05:50

Also, there should not be a need for adding lag where you were adding it

tony.kay03:05:12

PR with comments, if anyone else is interested.

cjmurphy06:05:22

Thanks a lot simple_smile

danielgrosse10:05:26

Hello I working through the youtube videos and currently on the server components. When I reload the page the local-app-state tells me

{:items/by-id {:untangled.client.impl.om-plumbing/not-found {}},
 :ui/locale "en-US",
 :om.next/tables #{:items/by-id},
 :list [:lists/by-title "Initial List"],
 :untangled/loads-in-progress #{},
 :om.next/ready-to-load [],
 :ui/loading-data false,
 :lists/by-title
 {"Initial List"
  {:title "Initial List",
   :ui/new-item-label "",
   :items [:items/by-id :untangled.client.impl.om-plumbing/not-found]}}}
`

danielgrosse10:05:52

Is it caused by the empty atom, which is initialized at the start?

danielgrosse10:05:05

Ah found it. I had made an atom with a map and not a vector

tony.kay16:05:10

@cjmurphy see discussion in #om I just had. I forgot that the follow-on read causes the query to get focused, and since that kw (:ui/react-key) wasn’t changed, the refresh got optimized away.

tony.kay16:05:07

follow-on reads do two things: look up the components to refresh, AND narrow the re-query to just the things you’ve indicated. If those things don’t change, then no refresh is done (because Om thinks there is nothing to do).

tony.kay16:05:18

I was (mistakenly) thinking that the narrowing was to the component, but I guess it is all the way down to the specific item in the (sub)query.

cjmurphy22:05:44

I wonder if there is there any way to by-pass the first part (index lookup) by using an ident/s as the follow on read? I'm saying that because in the past I've had success with using idents for follow on reads. Also (maybe related), is it always the case that something somewhere needs to have changed for a follow on read to re-render?