fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
Mr. Savy 2020-10-11T02:17:59.238600Z

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?

Mr. Savy 2020-10-11T03:34:37.238700Z

pass id maybe?

Mr. Savy 2020-10-11T03:45:39.239Z

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

nivekuil 2020-10-11T07:13:27.239300Z

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?

zilti 2020-10-11T09:26:31.250100Z

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?

exit2 2020-10-11T13:12:11.250600Z

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

tony.kay 2020-10-11T17:01:09.252200Z

@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…

👍 1
tony.kay 2020-10-11T17:04:26.255300Z

@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.

tony.kay 2020-10-11T17:05:36.256300Z

@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.

zilti 2020-10-11T18:14:57.256400Z

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

Mr. Savy 2020-10-11T21:32:31.259100Z

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.

Jakub Holý 2020-10-12T18:06:09.267700Z

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

Mr. Savy 2020-10-13T01:32:59.272800Z

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

Jakub Holý 2020-10-16T07:11:59.305700Z

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.

Mr. Savy 2020-10-17T01:26:39.315800Z

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

Mr. Savy 2020-10-11T22:26:57.259200Z

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