This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-10
Channels
- # announcements (1)
- # babashka (178)
- # beginners (216)
- # bootstrapped-cljs (1)
- # brompton (5)
- # calva (3)
- # chlorine-clover (1)
- # clj-kondo (2)
- # cljdoc (37)
- # cljfx (4)
- # cljs-dev (2)
- # clojure (360)
- # clojure-chile (8)
- # clojure-europe (3)
- # clojure-italy (5)
- # clojure-nl (9)
- # clojure-spec (2)
- # clojure-sweden (1)
- # clojure-uk (61)
- # clojuredesign-podcast (1)
- # clojurescript (83)
- # clr (2)
- # conjure (4)
- # core-async (14)
- # cursive (20)
- # data-science (2)
- # datomic (15)
- # docker (11)
- # emotion-cljs (1)
- # figwheel-main (28)
- # find-my-lib (1)
- # fulcro (46)
- # helix (16)
- # honeysql (14)
- # jobs (10)
- # jobs-discuss (17)
- # joker (1)
- # juxt (9)
- # kaocha (8)
- # leiningen (3)
- # meander (3)
- # news-and-articles (1)
- # off-topic (110)
- # pathom (7)
- # pedestal (4)
- # protojure (2)
- # re-frame (12)
- # reagent (25)
- # ring (4)
- # shadow-cljs (109)
- # spacemacs (9)
- # specter (1)
- # sql (3)
- # tools-deps (23)
Pinging @U0522TWDA, @U04VBBS6N, @U0DUNNKT2 =)…
hi! I am sorry, I have work meetings at the same time 😞
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.
Gods be with you :-)
Hey everyone, we’ll be meeting in an hour from now if anyone want’s to join in? Pinging @U0522TWDA, @U04VBBS6N, @U0DUNNKT2, @U2J4FRT2T, @U49U72C4V =)…
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
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/errors
key 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
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
cool. Can you access it in the :remote-error?
fn, and return true when present?
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.
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]
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
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?
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
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?
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.
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.
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: https://clojureverse.org/t/status-update-inspect-cljs-eval/6074