This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-20
Channels
- # announcements (16)
- # babashka (104)
- # beginners (77)
- # bristol-clojurians (1)
- # calva (3)
- # chlorine-clover (50)
- # cider (19)
- # clojure (73)
- # clojure-australia (1)
- # clojure-europe (37)
- # clojure-france (3)
- # clojure-nl (3)
- # clojure-norway (13)
- # clojure-spec (21)
- # clojure-uk (79)
- # clojurescript (225)
- # conjure (102)
- # cursive (11)
- # datascript (1)
- # datomic (1)
- # defnpodcast (1)
- # events (3)
- # figwheel-main (2)
- # fulcro (49)
- # ghostwheel (10)
- # helix (1)
- # kaocha (17)
- # leiningen (10)
- # meander (1)
- # off-topic (26)
- # other-lisps (3)
- # pathom (5)
- # re-frame (40)
- # reagent (6)
- # reitit (33)
- # shadow-cljs (107)
- # testing (3)
- # tools-deps (68)
- # xtdb (16)
- # yada (3)
@roklenarcic I could not reproduce your issue. I’m pushing 3.2.7 now. Perhaps you were having a SNAPSHOT update issue
btw does the :query
propery of pre-merge parameter have query with or without the elided parts?
on my demo, the query in the params is: :query [:form/id :form/name {:com.fulcrologic.fulcro.algorithms.form-state/config [:com.fulcrologic.fulcro.algorithms.form-state/id :com.fulcrologic.fulcro.algorithms.form-state/fields :com.fulcrologic.fulcro.algorithms.form-state/complete? :com.fulcrologic.fulcro.algorithms.form-state/subforms :com.fulcrologic.fulcro.algorithms.form-state/pristine-state]}]
the bug in 3.2.6 was that I was passing the wrong query to merge (and thus pre-merge)
I’ll try to put together a github repo that reproduces the bug and I will notify you when/if I have that
I have money on there not being a bug at this point. If you have an issue, it is either solved now, or it has to do with something specific you’re doing in configuration of the app or parameters passed to load itself.
If you have not fiddled with adv config, and are not passing query update params to load, then it should work
I'm writing some docs based on the youtube videos at the moment, does any one know when you would choose to use https://github.com/binaryage/dirac over https://github.com/binaryage/cljs-devtools? dirac certainly looks a whole lot more involved, where devtools looks fairly out the box
I found dirac’s a bit like having a full repl inside chrome console? It’s neat, but for the moment I don’t really find myself requiring it? devtools is just enough in my mind =)…
For example:
- eval cljs code in the context of currently selected stack frame (when paused on a breakpoint)
ah ok, I read somewhere today that chrome is considering dropping the custom formatters https://twitter.com/wazound/status/1263277295411671041 not sure if this matters in relation to picking dirac over cljs-devtools or vice versa
How can I find the source of errors like "ERROR [com.fulcrologic.fulcro.ui-state-machines:?] - #error {:message "Invalid expression [object Object]", :data {:type :error/invalid-expression}} Handler for event :com.fulcrologic.fulcro.ui-state-machines/started threw an exception for ASM ID :com.fulcrologic.rad.authorization/auth-machine"?
idk, from your message it looks like the handler function of com.fulcrologic.rad.authorization/auth-machine prob received some data it didn't like
there may be some more details in the stack trace, but sometimes not because of asynchrony. for bugs where i don't have any ideas i'll start commenting out parts of the code until things works, and then add them back in until the bug is triggered to narrow down what part of the app is the source of the issue
has anyone dealt with a route target that you want to allow optional path params? ["page"]
["page" :number]
seems to me like you'd need two components to handle this
You can also look into the RAD code where the started event is defined and add a println or something
i'd recommend this also: you can add a local alias in ~/.clojure/deps.edn (or equivalent location for windows)
:local-fulcro {:override-deps {com.fulcrologic/fulcro {:local/root "/Users/my-user/projects/fulcro"}}}
clone fulcro to that path and then enable the alias in your shadow-cljs.edn fileOr simply (in-ns '...) and eval your modified definition of the uism
@danvingo depends on what you mean by optional. To me that is two different routes…or you should pass something like :default for the :number parameter. DR doesn’t support optional path params.
It also isn’t the only solution…it just happens to be one I coded for you. Nothing keeps you from making your own routing system…lots of code to start from 😉
on will-enter the page component would read the params from the url and if it's missing use a default
Is it really a hardship that you might have to use [“page” “default”] instead of [“page”]?
or that those few extra characters show up in the URL? (BTW, it would be easy for you to translate the latter into the former in code, and let the URL still be /page)
so, there is convenience built into D.R. It is easy to translate between the routes you’d use in code and what you’d show on the URL. That is intentional. But it isn’t a UX requirement.
Fulcro 3.2.8 is on Clojars: I found and fixed a regression in component indexing. Also note that the versions between 3.2.0 and 3.2.5 or so have some subtle bugs I accidentally introduced with transaction processing. I’ve reverted those changes internally, and recommend version 3.1.22 (conservative) or 3.2.8+ if you want some of the newer tx features..
I just came across a defn syntax that I've never seen before and don't understand. I posted this in #beginners thinking it might be a Clojure thing rather than a fulcro thing, but didn't find the answer there. What are the second vectors below the param vectors and above the body? Looking at https://clojuredocs.org/clojure.core/defn, I expected to only see a pre/post map in that position. So what is this thing?
(defn default-tx!
"Default (Fulcro-2 compatible) transaction submission. The options map can contain any additional options
...
"
([app tx]
[::app ::txn/tx => ::txn/id]
(default-tx! app tx {:optimistic? true}))
([{:keys [::runtime-atom] :as app} tx options]
[:com.fulcrologic.fulcro.application/app ::txn/tx ::txn/options => ::txn/id]
(txn/schedule-activation! app)
;;; ,,,
That function was a guardrails defn that I changed to plain defn, but I left the type sigs in place. They are no-ops
was trying to reduce the dev-time overhead of tx processing a bit, and checking those specs was a little heavy, and unlikely to break since it is an internal pass-through call.
Defn variant from https://github.com/fulcrologic/guardrails combining defn with Clojure Spec
Though I normally see it used as >defn
?!
It's a defn
, not a >defn
, and I don't see it rebound. Is it left over from a refactor and clojure doesn't treat it as a compiler error? Just a no-op?
ah ok, I read somewhere today that chrome is considering dropping the custom formatters https://twitter.com/wazound/status/1263277295411671041 not sure if this matters in relation to picking dirac over cljs-devtools or vice versa