untangled

NEW CHANNEL: #fulcro
urbank 2017-07-10T06:39:12.928708Z

@tony.kay Ah ok, thanks! I'll posy a pull request sometime today. Except, regarding InitialAppState, I didn't use it because the devguide hasn't yet covered it at that chapter.

claudiu 2017-07-10T09:13:14.758519Z

@tony.kay Don't know if the suggestion is any good. But thought I should share https://github.com/awkay/untangled/issues/15

adambros 2017-07-10T09:14:38.789082Z

@claudiu you should be able to make your own :config component that will override the default... I think, have you tried that?

claudiu 2017-07-10T09:34:48.225579Z

@adambros For now I'm pretty happy with config-path, think it's a nice feature to have out of the box, in the future as my project grows will probably want my code to do the reading and just send the config to untangled. Just thought it would be nice to be as straightforward as possible.

mitchelkuijpers 2017-07-10T14:13:19.511951Z

I am running into a very weird issue.. And I am really breaking my head around this one. If i trigger a certain load a component will get the root-query result all of a sudden

mitchelkuijpers 2017-07-10T14:13:43.525810Z

No really sure how to explain this one

mitchelkuijpers 2017-07-10T14:23:01.861717Z

So it goes from loading state to the root query result.. while I am running a very simple load it is basically:

(df/load (:reconciler @app) [:sale.issue/by-id 17592186046693] atlas-crm.sales.components.issues/LinkedIssue)

claudiu 2017-07-10T14:35:27.319644Z

@mitchelkuijpers . Might be wrong. But think in remembering from om-next that loading with reconciler is not really that recommended. And it will trigger a full app refresh.

mitchelkuijpers 2017-07-10T14:36:12.346705Z

That still does not explain why I get the root app-state 8 components deep when I am not asking for it

mitchelkuijpers 2017-07-10T14:37:08.380022Z

This is a example that I am running to reproduce the bug normally I use the component instance. But I think that a component without a query basically does the same as just using the reconciler. It only triggers a full app refresh when you don't add read keys after a mutation

claudiu 2017-07-10T14:40:57.519089Z

sounds like a interesting issue. Have you tried running the query from inside of a component using this ?

mitchelkuijpers 2017-07-10T14:44:02.631057Z

Not that interested anymore trying to get something done this has cost me about 6 hours already 😞

mitchelkuijpers 2017-07-10T14:44:50.661115Z

But good idea @claudiu will try that out

mitchelkuijpers 2017-07-10T14:45:26.684020Z

I nested something with a query in some components without queries and that seems to break it

mitchelkuijpers 2017-07-10T14:45:42.694076Z

Without this it seems to work

mitchelkuijpers 2017-07-10T14:46:17.716412Z

So I at least know the fix now don't nest components with query in intermediate components, which might explain why I get the root query after a certain operaion

claudiu 2017-07-10T14:47:24.758725Z

ahh yep 🙂 think they have to compose all the way down.

mitchelkuijpers 2017-07-10T14:49:20.831222Z

It does compose but we render it with some intermedia components, not sure if that makes sense

mitchelkuijpers 2017-07-10T14:51:50.926940Z

So we have a query of {:issues [(om/get-query IssueItem)]} on component Tab and we render it by Tab->Table->IssueItem where Table is a component without a query. This works fine untill you try to do a load on a single IssueItem component

mitchelkuijpers 2017-07-10T14:52:26.949421Z

I'll try to make a reproduction of this

mitchelkuijpers 2017-07-10T14:52:41.959018Z

But now first try to fix my application

claudiu 2017-07-10T14:54:06.012149Z

ok interesting gotcha , thanks for sharing 🙂

mitchelkuijpers 2017-07-10T14:54:36.031482Z

Yeah maybe this helps someone else who runs into this case 🙂

mitchelkuijpers 2017-07-10T14:54:52.041212Z

Not sure if I have to report this as a bug in Om or Untangled

claudiu 2017-07-10T15:00:27.256903Z

agh found it 🙂

claudiu 2017-07-10T15:00:51.273091Z

https://awkay.github.io/om-tutorial/#!/om_tutorial.E_UI_Queries_and_State -> there's a section "Failing to Reach the UI Root"

mitchelkuijpers 2017-07-10T15:02:19.331816Z

@claudiu Oh thank you will read that

mitchelkuijpers 2017-07-10T15:04:01.397335Z

I have to run will report back

tony.kay 2017-07-10T15:50:39.127563Z

@mitchelkuijpers so, I'm on the road at the moment, but that does seem very odd. As long as things compose to root An intermediate stateless should not hurt. Remember that the db is not deep. It is flat. All tables are at the root. But it is very strange. It's almost as if you're destructuring of props is wrong and you're passing things through render wrong.

tony.kay 2017-07-10T16:06:55.727672Z

Did you examine app state. That would isolate it to load. Also, what version? Path-opt on?

tony.kay 2017-07-10T16:13:32.957868Z

I can't see how load could screw up in that manner, but a bad query or more likely props passing. Could also be a problem with the new read local in beta2 snapshot, if you're using that, but I'm not sure how

mitchelkuijpers 2017-07-10T17:50:06.118526Z

The app-state seems correct and re-render from root after it went wrong fixes it

mitchelkuijpers 2017-07-10T17:54:48.279378Z

You are correct I have the same problem without the intermediate components

urbank 2017-07-10T21:27:40.774627Z

@tony.kay Sorry, I'm still not quite getting it 😕 I mean it's almost right, but something's not quite clear: