Fork me on GitHub
#fulcro
<
2019-02-17
>
hmaurer13:02:01

@wilkerlucio I just noticed that some data I am displaying through shared props isn’t rendering while rewinding the history in Fulcro Inspect. Any idea why this could be?

wilkerlucio13:02:58

humm, nothing strait, but can make sense, the story just rewinds the state (its literally getting your root factory and running against a previous state map), so thats probably a bug that its not considering shared

hmaurer14:02:11

@wilkerlucio what is the use of this checkbox? https://puu.sh/CNzWN/5ad85168fb.png . From what I gather it seems to deactivate history rewind, but… not sure why

wilkerlucio14:02:27

it deactivate the preview

wilkerlucio14:02:40

when you scroll you just seen the preview

hmaurer14:02:53

also, in my transaction history I have a lot of empty vectors, e.g. https://puu.sh/CNzXE/88778eaac2.png . Any idea why?

wilkerlucio14:02:55

to actually return to that version you need to click on that button right before the snapshot button

hmaurer14:02:03

thanks 🙂

wilkerlucio14:02:28

not sure, check if you are not calling some empty transactions by accident

wilkerlucio14:02:31

I hanve't saw those before

hmaurer14:02:43

hmm ok I might just be doing something funky then

hmaurer14:02:12

I consistently get 3 of those

hmaurer14:02:13

even after loads

wilkerlucio14:02:20

if you get to try to implement the haskell version for the pathom processing, this is the heart of it 😉 https://github.com/wilkerlucio/pathom/blob/4aa7180c7420ab67d251da90bf92c561c378322c/src/com/wsscode/pathom/connect.cljc#L477-L517

hmaurer14:02:58

It’s on the bottom of my todo list, but thanks 😄 it will be useful when I get there

liesbeth08:02:29

We also have these empty vector transactions! They seem to show up between a load that is issued and the subsequent merge. If you happen to find out what the problem was for you, I’m very curious to know!

hmaurer10:02:24

@U5MU0K0S0 oh, I'm glad I'm not alone! I'll let you know if I find the answer

hmaurer14:02:36

it seems to happen before every merge! actually

hmaurer14:02:29

I don’t think I’m doing empty transactions though. I’ll try to create a new project and see if it happens. (this project was created using the lein template)

hmaurer14:02:50

I am certainly not triggering any transaction manually between that load and the merge

wilkerlucio14:02:07

yeah, seems strange

hmaurer14:02:38

where is the inspect tool takin gthat transaction history from?

hmaurer14:02:45

perhaps I could dumb the data from wherever it is and see what’s there

wilkerlucio14:02:57

did you tested in a blank app?

hmaurer14:02:28

i’ll try now

hmaurer14:02:30

@wilkerlucio hmm ok, it doesn’t happen in the blank app (`lein new fulcro foo`), so I must have fucked it up somehow 😅

hmaurer14:02:22

Ah! I think I know where it might be coming from

hmaurer14:02:35

I have an auth response middleware which looks like this:

(defn auth-response-middleware [response]
  (if (= 401 (:status-code response))
    (do
      (redirect! "/sign-in")
      (assoc response :transaction [] :body {}))
    ((net/wrap-fulcro-response) response)))

hmaurer14:02:58

Tony told me to set :transaction to [] there to avoid Fulcro processing the response (if I understood what we said correctly)

hmaurer14:02:39

Actually, no. That can’t be it. I get [] transactions even when properly signed in

liesbeth08:02:29

We also have these empty vector transactions! They seem to show up between a load that is issued and the subsequent merge. If you happen to find out what the problem was for you, I’m very curious to know!