Fork me on GitHub

Our little fulcro study group, is meeting again in 10 mins =)…

👍 4

Hey please ping me next time too. would love to join.


Oh sure =)…

Jakub Holý (HolyJak)14:06:43

hi! I am sorry, I have work meetings at the same time 😞

Chris O’Donnell15:06:09

Thanks for the ping! I am at the mercy of my 6 week old baby's whims right now. Can only join if he allows it.

Jakub Holý (HolyJak)15:06:35

Gods be with you :-)


No problem, just let me know if you don’t want me to ping you ;)…


i'm interested in joining next week! please ping me if you can


Hey everyone, we’ll be meeting in an hour from now if anyone want’s to join in? Pinging @U0522TWDA@U04VBBS6N@U0DUNNKT2, @U2J4FRT2T, @U49U72C4V =)…

Jakub Holý (HolyJak)10:06:25

Thx! I am on a conference today.... 😞

😞 3

Just wrapped up =)…


What exactly triggers the error-action in a client mutation? I tried as much as throwing an exception in the server-side pathom mutation, but that still triggers the ok-action

Jakub Holý (HolyJak)14:06:24

I can describe how this works for normal loads, I guess the same applies to mutations. By default only non-200 status is considered an error. To change that, set :remote-error? on the Fulcro app, checking e.g. for the top-level :com.wsscode.pathom.core/errorskey in the body (beware: make sure it is included in your query, e.g. via global-eql-transform). When this returns true then it will trigger the :global-error-action , which you can also override. I assume that for a mutation it would invoke its error-action


Oh I am fine with only non-200 being an error, but in all Fulcro examples, the error-action gets triggered by throwing an exception, yet in fulcro-rad-demo that does not work

Jakub Holý (HolyJak)15:06:16

Try what I suggested. BTW latest RAD adds the psthom/errors automatically to the query. Check the raw network response in the browser dev tools I bet you will see the error there


Hm yes, it is in the raw response

Jakub Holý (HolyJak)06:06:58

cool. Can you access it in the :remote-error? fn, and return true when present?


I'll try that, but it feels hacky


Okay I checked again, and I don't have it as a top-level. All I have is a :com.fulcrologic.rad.pathom/errors key that is inside :body namespace/mutation-name. But I guess that'll have to do.

👍 4
Jakub Holý (HolyJak)16:06:27

It is not hacky, that's what remote error is for.


The parameters sent back to the client mutation's ok-action contain the :outgoing-request under the :result key


Is a route-segement with more than two items, like :route-segment ["drawing" :drawing/id "view"], valid? This produces /drawing/:drawing/id/39d38f08-4255-410d-93c8-4ace2209fb06. This does work when there are just two items, like :route-segment ["view-drawing" :drawing/id]


@tvaughan don’t remember, to be honest


in that I don’t remember if there is a real limitation necessary, or if misbehavior would be a bug


I see no problem with it on the surface, and would lean towards “it should work”…but you have to run through the nesting cases. What if someone started with a parameter? IF two siblings did that matching could get difficult


so route segments need to start with a solid string, and a trailing string really strains the possible problems with route matching. I would recommend making the 3rd a parameter if that really needs to vary, instead of trying to make route matching figure it out


["drawing" :drawing/id :drawing/action], and dispatch within your target to the different functionalities


Thanks @tony.kay I'll give this a try


This :route-segment ["drawing" :drawing/id "view"] works with (dynamic-routing/path-to DrawingView id "view") FYI


@tony.kay, you mentioned yesterday that you could use query-inclusion on a report to get extra data for controls. I thought query-inclusion only worked for forms, fo/query-inclusion. There is ro/row-query-inclusion, that solves the problem for row controls. What if I want to get additional data to a report level control like “Add Item”? Should there be a ro/query-inclusion too?


report level controls are what ro/controls are about


ah, but you’re saying you want the report to get that data from where? There is no query for the report, only the rows


Yup. 🙂


If I put a report level control, it gets this, which means I can get the props, but if I want more information, like the current user, or the user’s department, information that would let me fill in better defaults or fill in hidden form attributes. Being able to add a query at the top level of the report instead of the rows would allow getting extra attributes for the report level controls. Unless there is already a better way to handle this sort of thing?

Jakub Holý (HolyJak)06:06:37

Hi! I was thinking about the same, that I might need it. So you are not the only one 🙂


ah, ok, so you want like link-level queries and such. Sure, thats fine. Send a PR. Add an option to report-options, and then tweak the macro. It’s straightforward.

🙏 4

So I think I might add an "actual" pick-many to the form generator, but I am not sure if you have some kind of policy as to the kind of elements allowed in fulcro-rad-semantic-ui. Would it be okay if I use Semantic UI React components in there? Because for what I've seen, right now there are only "normal" components in there.

Jakub Holý (HolyJak)07:06:54

As discussed here previously, it makes sense to use dom + semantic ui classes for simple cases and Semantic React components if you also need their built-in behavior.


the types of elements allowed in f-r-sui right now are anything that is in the deps, which includes SUI react.


I’m considering adding one or two more deps, like react-number-format , which I find handy for a number of fields and use in my own projects…but I’m torn on that in the lib


and it’s easy enough to just add your own per project…they are pretty darn simple to make


PSA, new version of shadow-cljs is out with improved inspect support:

👍 6