Fork me on GitHub
#fulcro
<
2020-10-11
>
AJ Snow02:10:59

ok I got routing halfway setup. right now it looks like it'll load different components, but nothing is being loaded into the component. Before setting up this router I had everything set up in the initial state, could that be why?

AJ Snow03:10:37

pass id maybe?

AJ Snow03:10:39

also keep getting invalid ident return; trying to fix though.

nivekuil07:10:27

niche issue: set-ident-route-params in legacy-ui-routers doesn't work recursively, so if you have a nested ident like [:table/id {:inner :param/id}] that param doesn't get replaced. clojure.walk/postwalk instead of mapv seems to do the trick. PR wanted?

zilti09:10:31

I am setting up testing for our project, and have run into an issue: my pathom mutation uses form/save-form* and just using mock-resolver-env is not enough to cover that; I get runtime errors because the form middleware is missing. Has someone done mocked testing with that before and knows a good way to do it?

njj13:10:11

Any tips on better server side logging for a new FC3 app?

tony.kay17:10:09

@njustice the template is set up quite nicely already, forwarding all JVM logging styles to timbre, and configuring timbre through the edn config…what else are you talking about? You could add a sentry appender to timber for error level messages…

👍 3
tony.kay17:10:26

@zilti I’ve done the following two styles: 1. write a macro for doing the boilerplate setup in a test (I think I called mine full-stack-round-trip) that sets up everything except the networking and runs EQL through it. 2. Consider the plumbing to be a separate testing story and just test the core logic of the thing, so that the pathom resolver is really just a pass-through to that function. In either case you’re going to have to do the necessary env setup for save-form* if you want save-form* to work. No idea which mock-resolver-env you’re talking about, but the built-in middleware is side-effect free, so you can just compose that stuff into an env.

zilti18:10:57

I'm talking about the mock-resolver-env from fulcro-rad-datomic. I tried to just assoc the save- and delete-middlewares into the generated, but that gave me NullPointerExceptions. I am considering to just run the main mount/start and use the actual thing for testing, with a bunch of centralised mock data in an in-memory db

tony.kay17:10:36

@kevin842 if you understand the problem, have a repro case, and want to, sure. I really don’t want to put my head into those older routers at this point.

AJ Snow21:10:31

I may need help ensuring I'm understanding this right. I'm trying to get a working instance of example 38 in my code; a dynamic router. Can a router replace sub components, or can they only replace the data tree of some component? From 38 it looks be the latter of the two, but I was wanting to set up a router that loaded a different component when navigated to via an onclick, for instance.

AJ Snow22:10:57

also where the heck do sally and tom come from in that example

Jakub Holý (HolyJak)18:10:09

A router can have different targets, ie different target component, eg Person Overview and Person Details

AJ Snow01:10:59

do the targets have to assume that the structure of dating being passed in is identical between the two components?

Jakub Holý (HolyJak)07:10:59

what do you mean by "dating"? Passed in to what? Two components used as targets on the same router are completely independent and can have completely different queries and idents.

AJ Snow01:10:39

*data sorry. I'm referring to data being based into the component. I think that answers my question though, despite still being stuck, thanks!