Fork me on GitHub
#fulcro
<
2020-08-10
>
Tyler Nisonoff00:08:33

Are form confirmations working for others on Fulcro RAD? I noticed forms set base options as so:

base-options               (merge
                                     {::validator        (attr/make-attribute-validator attributes)
                                      ::control/controls standard-controls
                                      :route-denied      (fn [this relative-root proposed-route]
                                                           #?(:cljs
                                             
                                                                (when-let [confirm (or (comp/component-options (get-class) ::confirm) js/confirm)]
                                                                  (do
                                                                    (when (confirm "You will lose unsaved changes. Are you sure?")
                                                                      (dr/retry-route! this relative-root proposed-route))))))}
However, it seems that js/confirm is nil for me.. However, if I set a manual confirmation on the form class like so:
::form/confirm  (fn [message]
                     #?(:cljs
                          (js/confirm message)
                        ))
it works… Trying to figure out why the default isn’t working. I added some logging in the RAD code when the :route-denied function is called, and js/confirm is nil, but js/alert isn’t :thinking_face:

murtaza5209:08:36

I have server side mutations which runs an operation which may take couple of minutes to complete. After that I redirect the user using the (ok-action) to another form. During the 2 mins, when the server side operation is running I would like to display a spinner on the UI. How do I do that ?

tvaughan15:08:14

I have a component with a form that uses route-deferred on will-enter. This component has a :ui/ready? property that is set to true in initial-state. However, it seems that the ui is replacing, not merging, the server response in the post-mutation call to target-ready (see below). Since the server response doesn't include :ui/ready the component sees ui/ready? as nil. I tried to pass :ui/ready? true in the post-mutation-params without any luck. What am I doing wrong? Thanks

(dr/route-deferred ident #(load! app ident TeamForm {:post-mutation `dr/target-ready
                                                     :post-mutation-params {:target ident}}))

ozzloy22:08:25

i'm following along with the book and am unable to get the better tools to work http://book.fulcrologic.com/#_using_better_tools here's my app https://gitlab.com/ozzloy/fulcro-book-app

ozzloy22:08:23

the chrome extensions sees that localhost:8000 is a fulcro app, but i get a blank area where i expect to see info about the DB behind the app

ozzloy22:08:40

and Fulcro Inspect says "No app connected."

ozzloy22:08:16

the app is depending on fulcro 3.2.12, which is i think the latest

ozzloy22:08:24

and shadow-cljs.edn has com.fulcrologic.fulcro.inspect.preload in its preloads. i'm not sure what i'm doing, and it looks like it's already in there, but i added it again since i think that's what the book is telling me to do. idk

ozzloy22:08:44

the repl works. cider connects to it just fine

souenzzo17:08:12

I'm working on this demo I just added workspaces on it https://github.com/souenzzo/eql-realworld-example-app/ You can try with git clone .... && cd ... && npm install && make dev, then connect on Or just take a look at https://souenzzo.com.br/eql-realworld-example-app/workspace.html

piobaire23:08:35

Totally stupid newb question here... In the Fulcro RAD demo, com.example.model.account.cljc line ~27-28 there's a note about using ns aliasing instead of a fully qualified keyword. Can someone please give me an example of what is meant?

piobaire01:08:25

Thank you! Much appreciated.

AJ Snow23:08:00

why is it that I can follow an example from the dev guide and it still won't work? the answer is that I'm not actually following it, I just think I am but I'm missing something somewhere. so really I have no one to blame but myself, but that just makes me more sad...and sad spelled backwards is "das" because das not good. In summary, defmutations are also hard to make sense of.