Fork me on GitHub
#fulcro
<
2017-12-06
>
tony.kay00:12:45

releasing 2.0.0-beta4 to clojars. Found a bug in defsc. Also expanded defsc to support react lifecycle with simple keywords in options: :shouldComponentUpdate (fn [props state] …)

tony.kay00:12:31

live developer’s guide update coming to the website in just a min. I’m through the (second) refinement up to section G

tony.kay00:12:01

http://fulcro.fulcrologic.com/guide.html has updated. You may need to clear cache.

tony.kay00:12:30

http://fulcro.fulcrologic.com/guide.html#!/fulcro_devguide.G_Mutation should talk about intern’ing mutations at the very end (if you have the latest version)

cjmurphy04:12:47

I need to get better at css. Something like this is difficult:

cjmurphy04:12:58

[(gs/> :.table-header "div") {:font-weight  "normal"
                              :text-align   "left"
                              :padding      "5px 4px"
                              :border-right border}
 [:&.flex {:flex 1}]
 [(gs/& gs/last-child) {:border-right "0"}]]

cjmurphy04:12:19

Any recommendations for how to learn this stuff when you don't have great browser/web experience? That happens to be a snippet from Fulcro Inspect.

tony.kay04:12:37

The functions are in garden…so I think gs/> is just the css > relation operator…like .table-header > div

tony.kay04:12:46

https://github.com/noprompt/garden in the “garden.selectors” part

cjmurphy04:12:38

I did read the garden doco quickly, but it assumes too much for me to grok it all.

tony.kay04:12:25

yeah, it’s the authority on how garden supports CSS, but you do have to know CSS

cjmurphy04:12:04

Just trying to understand every little bit of Fulcro Inspect. Lots of good stuff there. The ref thing is confusing as its always in env. Its certainly good to learn from thou...

wilkerlucio12:12:40

@cjmurphy learning more about CSS can help a lot, the selector you sent has indeed some mixed features of CSS that you have to know to understand it, but I can break those down for you:

wilkerlucio12:12:28

(gs/> :.table-header "div") -> .table-header > div -> this selector affects only the div tags that are direct children (first child level on tree) of the element with the classname table-header

wilkerlucio12:12:21

:&.flex -> .table-header > div.flex -> for those same div from the previous selector, if it has the class flex, add the flex property

wilkerlucio13:12:01

(gs/& gs/last-child) -> .table-header > div:last-child from those same div selection as before, affect only the last child on that level

cjmurphy13:12:07

So > means only direct children

wilkerlucio13:12:06

<div class="table-header">
  <div>I'm affected</div>
  <div>
    Me Too
    <div>But I'm not</div>
  </div>
</div>

cjmurphy13:12:24

Not yet, but can I come back to you, just heading out and need a rest from the screen. Thanks a lot and I'll come back...

piotrek14:12:54

Hello! I am learning Fulcro and I’m stuck with (I am sure) a silly issue - I have created a new project with lein new fulcro fulcro-playground and I started it from Intellij with -Dcards -Dtest -Ddev and figwheel script. The issue is that I have added :started-callback to src/main/fulcro_playground/client.cljs:

(defonce app (atom (fc/new-fulcro-client
                     {:started-callback
                      (fn [app]
                        (js/console.log "Loading data..."))})))
but it is not being called when I open http://localhost:3449/index.html Have I missed anything?

claudiu14:12:58

@piotrek

(defonce app (atom (fc/new-fulcro-client
                    :started-callback (fn [{:keys [reconciler] :as app}]
                                        (console.log "started ? ...")))))

piotrek14:12:09

Doh, I have just found it!

claudiu14:12:29

cool, you're welcome 🙂

roklenarcic15:12:03

@wilkerlucio do you have a pathom version that works without om.next?

wilkerlucio15:12:03

@roklenarcic no, pathom uses the om.next/query->ast and om.next/ast->query quite a lot, that would have to be re-implemented in order to remove om.next dependency, that said, this is something I would like to have in Pathom on future

thheller17:12:55

@wilkerlucio could you publish a non-snapshot version of fulcro.inspect? I don’t like adding snapshot deps.

thheller18:12:19

I’m trying to hook up the server interop. I get the request, I answer it but the data turns up empty on the client

thheller18:12:39

how do I debug this? I’m probably doing something incorrectly

tony.kay18:12:51

@thheller So, you can use the regular network panel in Chrome and look at the response. Transit isn’t too terrible to at least make out the basic structure.

tony.kay18:12:00

query or mutation?

thheller18:12:18

query, yeah network shows the request and response correctly (I think)

thheller18:12:43

doing a (df/load app :q/builds BuildList)

thheller18:12:52

returns from the server

thheller18:12:03

{:q/builds
 ({:target :browser,
   :output-dir "target/dce-test",
   :compiler-options {:fn-invoke-direct true},
   :modules
   {:core {:entries [cljs.core]},
    :main {:entries [demo.dce], :depends-on #{:core}}},
   :id :dce,
   :build-id :dce}
  {:target :node-script,
   :main demo.errors/main,
   :output-to "out/demo-errors/script.js",
   :id :errors,
   :build-id :errors} ...

thheller18:12:35

(defsc BuildItem [this props]
  {:initial-state (fn [p] p)
   :query [:build-id]
   :ident [:builds/by-id :build-id]}
  (html/div (pr-str props)))

(def ui-build-item (fp/factory BuildItem {:keyfn :build-id}))

(defsc BuildList [this {:keys [builds] :as props}]
  {:initial-state
   (fn [p]
     {:page :build-list
      :builds [(fp/get-initial-state BuildItem {:build-id :foo})]})
   :query
   [:page
    {:builds (fp/get-query BuildItem)}]}

  (html/for [build builds]
    (ui-build-item build)))

tony.kay18:12:09

1. lists are not valid data in Fulcro, only vectors. 2. Your query in BuildList is not asking for what you called it

tony.kay18:12:20

you either need to target the result, or change your top-level query

thheller18:12:59

(defmethod fs/read-root :q/builds [env _ params]
  {:value
   (-> (config/load-cljs-edn)
       (get :builds)
       (vals)
       (into []))})

tony.kay18:12:11

oh, then what you typed above is just a typo?

thheller18:12:39

no, thats the code and results I have

tony.kay18:12:40

the plumbing won’t rewrite things…it’s really your query

thheller18:12:45

dunnoy where the list is coming from

thheller18:12:49

I give it a vector

tony.kay18:12:32

Add :q/ to your join in your top-level query and it should work

thheller18:12:12

I tried adding {:target [:somewhere]} on the df/load but wherever I put it it ends up as an empty vector

tony.kay18:12:14

That’s where you asked it to go. If you want it to go elsewhere, use (load :q/build BuildList {:target [:builds]})

tony.kay18:12:50

:query [{:builds (prim/get-query BuildItem)}]

tony.kay18:12:08

the two have to match

tony.kay19:12:09

I love developing in devcards…the inspect-data true option shows your whole database…so you can tell the difference between what is in your database vs what you’re getting out with the query. fulcro-inspect works with 2.0 now, and will also show you this kind of stuff

thheller19:12:55

I don’t really understand where the list is coming from

thheller19:12:06

I guess I’m missing something on the server

thheller19:12:21

I’m not using easy-server or anything

thheller19:12:24

just the parser directly

tony.kay19:12:36

Are you? Is that your read-root?

thheller19:12:57

defmethod fs/read-root :q/builds [env _ params]
  {:value
   (-> (config/load-cljs-edn)
       (get :builds)
       (vals)
       (into []))})

(defn fulcro-request [{:keys [transit-read transit-str fulcro-parser ring-request] :as req}]
  (let [body (-> req :ring-request :body slurp transit-read)
        result (fulcro-parser
                 {:app req
                  :parser fulcro-parser
                  :ast body}
                 body)]

    (prn [:request body])
    (pprint result)
    {:status 200
     :header {"content-type" "application/transit+json"}
     :body (transit-str result)
     }))

thheller19:12:17

fulcro-parser is (fs/parser {:read fs/server-read :mutate fs/server-mutate})

tony.kay19:12:26

ah, no, you want handle-api-request

tony.kay19:12:04

there is plumbing you definitely want to have in that. See the dev guide on Rolling Your own Server

tony.kay19:12:39

then if you don’t want to use the macros (which separate out the traffic between entities and root) you might want to use your own parser and multimethod, or whatever, just make a new parser…

tony.kay19:12:17

as long as you’ve read the macros, you can use the multimethods…just saying, parser is completely open and standard component.

thheller19:12:30

switched to handle-api-request but AFAICT the response from the server is identical to before

tony.kay19:12:18

are you sure the way you’re viewing it isn’t morphing it?

thheller19:12:44

viewing it? pprint?

tony.kay19:12:52

hm…yeah, that should be ok

tony.kay19:12:00

OH….threading macro

tony.kay19:12:03

you’re threading it wrong

tony.kay19:12:32

you’re putting an empty vector into your list of things

tony.kay19:12:31

you’re left threading into into

thheller19:12:32

not threading anywhere

thheller19:12:47

haha indeed

tony.kay19:12:51

(-> (config/load-cljs-edn)
       (get :builds)
       (vals)
       (into []))

thheller19:12:48

yep, now its vector

thheller19:12:53

still empty on the client side though

thheller19:12:11

{:status 200,
 :body
 {:q/builds
  [{:target :browser,
    :output-dir "target/dce-test",
    :compiler-options {:fn-invoke-direct true},
    :modules
    {:core {:entries [cljs.core]},
     :main {:entries [demo.dce], :depends-on #{:core}}},
    :id :dce,
    :build-id :dce}
   {:target :node-script,
    :main demo.errors/main,
    :output-to "out/demo-errors/script.js",
    :id :errors,
    :build-id :errors} ...

tony.kay19:12:14

what is empty? Are you looking at the entire database, or the result of the broken query?

thheller19:12:25

let me hook up fulcro.inspect

tony.kay19:12:37

you can also just pprint app state

tony.kay19:12:41

your client in an atom?

tony.kay19:12:47

figwheel REPL?

tony.kay19:12:12

(pprint (-> app deref :reconciler (prim/app-state) deref))

tony.kay19:12:29

should do it

tony.kay19:12:58

or even from js console if you want to hack through the cljs name munging 🙂

tony.kay19:12:33

oh…keywords are kinda hard at js prompt 😕

thheller19:12:16

meh inspect doesn’t work but looking at the data directly looks fine now

thheller19:12:44

[  0.845s] [fulcro.client] Mutation fulcro.inspect.ui.transactions/add-tx failed with exception Error: Assert failed: Path [:fulcro.inspect.ui.transactions/tx-list-id [:fulcro.inspect.core/app-id nil] :fulcro.inspect.ui.transactions/tx-list] for append must target an app-state vector.
(vector? (get-in state data-path))

thheller19:12:05

not sure what that means

tony.kay19:12:14

@wilkerlucio is doing that project…not sure either

tony.kay19:12:52

sounds like the app ID thing in it didn’t work, and it isn’t able to put the tx on a list at the missing storage location

tony.kay19:12:08

so, your load is working? @thheller

thheller19:12:55

guess it doesn’t get normalized properly

tony.kay19:12:09

erm…that should not be the case

tony.kay19:12:28

show me the data

tony.kay19:12:52

Did you customize the client networking at all?

thheller19:12:03

no, didn’t even configure it

thheller19:12:16

(defn start []
  (reset! app-ref
    ;; I really don't like putting this in a defonce seems to break often
    (fc/new-fulcro-client
      :started-callback
      (fn [app]
        (js/console.log "fulcro started")
        (fdf/load app :q/builds BuildList {:target [:builds]})
        (when-let [prev-state @state-ref]
          ;; can't figure out how to restore app state otherwise
          (let [app-state (get-in app [:reconciler :config :state])]
            (swap! app-state merge prev-state))))))

  (swap! app-ref fc/mount Root "root"))

(defn stop []
  (reset! state-ref @(get-in @app-ref [:reconciler :config :state])))

tony.kay19:12:14

oh…your query does not match your response

tony.kay19:12:26

so normalization can’t work

thheller19:12:37

I need to query the root?

tony.kay19:12:30

so, the return value from your server function must match the query of the component. In your case [:page {:builds ...}]

tony.kay19:12:37

you’re returning the bit for ...

tony.kay19:12:30

You want (load app :q/builds BuildItem {:target [path-to-component-field-where-builds-should-live]})

thheller19:12:39

(fdf/load app :q/builds BuildList {:target [:build-list :top :builds]})

tony.kay19:12:49

but not BuiltList

thheller19:12:49

woho that works

tony.kay19:12:01

but it isn’t normalized

tony.kay19:12:05

you want BuildItem

tony.kay19:12:37

load is loading BuildItem instances. The default target is the keyword you provide.

tony.kay19:12:04

I you were loading a BuildList, you’d need to return {:page :boo :builds [ ... ]}

thheller19:12:37

I’m confused

tony.kay19:12:54

Yep…this is the “hard part”…getting used to the graph semantic

thheller19:12:12

the router union stuff was already pretty confusing

tony.kay19:12:17

you did something accidental that is half-working 🙂

tony.kay19:12:39

routing with unions is the other one that is hard, agreed

tony.kay19:12:49

fortunately, the hard ones are very limited 😉

tony.kay19:12:11

If you send a query for :x, you have to respond {:x value}

tony.kay19:12:06

If you send a query for [{:person (get-query Person)}] you have to respond with {:person {:db/id ...}} OR {:person [{:db/id ...} ...]} (to-many)

tony.kay19:12:10

they have to match

tony.kay19:12:26

The keyword in (load :keyword ...) becomes part of the query, as a join (you don’t have to care about that part, since the parser is already taking care of that level of the response). So, you’re asking for [{:q/build (get-query BuildList)}], but you’re responding with {:q/build [ list of build items]}

tony.kay19:12:29

this is a mis-match

tony.kay19:12:49

but load will load it where you said to load it, and try to normalize it with the query you gave

tony.kay19:12:32

but BuildList won’t find what it wants in that response, so…no go

tony.kay19:12:17

So, simple rule really: Return one or to-many of what you asked for. You didn’t do either. You asked for BuildList, but returned many BuildItem

tony.kay19:12:02

If you pull the query from the env on the server, you’ll see that what you’re being asked for does not match what you’re returning

tony.kay19:12:41

Technically Fulcro does not require you to normalize anything…so this is why it visibly seems to work.

thheller19:12:13

so when I return {:value {:builds [...]}} from the server it does get normalized

tony.kay19:12:33

right…now you’re manually doing the “parsing” 🙂

thheller19:12:03

hang on I broke something else .. nothing gets rendered anymore

tony.kay19:12:25

yep…your db is now one level deeper, because you targeted a BuildList at BuildItems 😜

tony.kay19:12:33

so, stop fidgeting for a moment and look at the symmetry. It’s quite simple 🙂

tony.kay19:12:03

we have a habit of fiddling till it works, but that won’t help here

tony.kay19:12:21

or perhaps it will…making mistakes is best teacher

thheller19:12:50

I understand 1% of what data-fetch does

thheller19:12:18

so that anything happens at all is a miracle 😉

tony.kay19:12:53

So I assume you did not get through the Guide yet? 🙂

thheller19:12:24

I did many times

thheller19:12:45

trying to do too many things at once

thheller19:12:01

should not have started with the router stuff

tony.kay19:12:15

that is probably true

tony.kay19:12:27

or customizing a server so early

tony.kay19:12:46

better to get the query norm/loading basics down before throwing more potential errors in the mix

tony.kay19:12:57

BUT, you’ve done remarkably well for as many things as you’ve thrown in 🙂

thheller19:12:24

yeah I can’t use easy server since I already have a whole server setup

thheller19:12:45

watched that already

tony.kay19:12:12

I think you’ve mostly got it…trying to find that one last little thing

thheller19:12:28

I think the router messes me up

wilkerlucio20:12:07

just got back people

wilkerlucio20:12:47

@thheller I'm planning making a release by today or tomorrow, most of the current things were mostly dev snapshots, that's why I kept snapshooting 😛, but yes, we will have a non-snapshot soon

wilkerlucio20:12:29

the error you posted I haven't seen before, are you using Fulcro 2.0 with inspect 0.2.0?

thheller20:12:59

beta4 with 0.2.0 yes

thheller20:12:46

@tony.kay can I query for * somehow? just gimme all the props or do I need to list them all?

tony.kay20:12:04

actually, '* should work (quoted symbol)

tony.kay20:12:25

unless you need joins, in which case…you need to type them out

tony.kay20:12:48

I don’t think they can be combined. I never tried ['* {:join ...}]

thheller20:12:23

“ID property of :ident does not appear in your :query”

tony.kay20:12:25

that might work…`db->tree` does thngs left-to-right, so the join might just overwrite the thing it pulled as a pro

thheller20:12:10

(defsc BuildItem [this props]
  {:initial-state (fn [p] p)
   :query ['*]
   :ident [:builds/by-id :build-id]}
  (html/div (pr-str props)))

tony.kay20:12:20

oh, use a lambda

tony.kay20:12:31

the sanity checking doesn’t understand *

thheller20:12:48

ah thx, that works

tony.kay20:12:48

I’ll open an issue…still working on adv support (unions and such)

wilkerlucio20:12:11

oh, not sure if is that, but in fulcro-4 the defscmacro had a breaking change, inspect isn't up to date with that yet

wilkerlucio20:12:30

not sure how you that even to compile :thinking_face:

thheller20:12:45

(defsc BuildItem [this {:keys [build-id target] :as props}]
  {:initial-state (fn [p] p)
   :query
   (fn [] ['*])
   :ident [:builds/by-id :build-id]}
  (prn [:build-item/render props])
  (if-not (map? props)
    (pr-str props)
    (html/div
      (html/h2 {} (name build-id))
      (html/p {} (pr-str props)))))

thheller20:12:56

[:build-item/render [:ui/fetch-state {:fulcro.history/tx-time 2, :fulcro.client.impl.data-fetch/uuid "79ae0bdc-e8f5-49da-a360-857eaad6fa5c", :fulcro.client.impl.data-fetch/parallel false, :fulcro.client.impl.data-fetch/target [:pages/builds :top :builds], :fulcro.client.impl.data-fetch/original-env {}, :fulcro.client.primitives/ident nil, :fulcro.client.primitives/remote :remote, :fulcro.client.primitives/query [{:q/builds [*]}], :fulcro.client.impl.data-fetch/refresh [[:pages/builds :top]], :fulcro.client.impl.data-fetch/type :ready, :fulcro.client.impl.data-fetch/post-mutation-params nil, :fulcro.client.impl.data-fetch/fallback nil, :fulcro.client.impl.data-fetch/marker true, :fulcro.client.impl.data-fetch/post-mutation nil, :fulcro.client.impl.data-fetch/field nil}]]

thheller20:12:18

is that supposed to be a vector?

thheller20:12:11

seems to be a side effect of '*

grzm20:12:32

@tony.kay is there a reason you're not using the lein figwheel command in the getting started docs?

wilkerlucio20:12:52

@thheller I just pushed a new snapshot to 0.2.0, with changes for fulcro 2.0.0-beta4, I think you problem seems different, but can you try that please?

wilkerlucio20:12:18

ah, but question, are you using figwheel or shadow-cljs to build?

thheller20:12:40

shadow-cljs of course 😉

wilkerlucio20:12:32

because I remember Mitchel tried and wasn't working with shadow-cljs, but I don't understand why

thheller20:12:51

are you doing any compiler tricks?

wilkerlucio20:12:00

nope, pretty standard stuff

wilkerlucio20:12:08

is there are difference regarding preloads?

thheller20:12:48

seemed to compile fine, shouldn’t be any difference with :preloads

wilkerlucio20:12:19

can you try compiling with figwheel once just to isolate if it's that?

thheller21:12:21

dunno how to use figwheel 😛

wilkerlucio21:12:50

is the project you are toying around public?

thheller21:12:31

its shadow-cljs itself, so yeah 😉

tony.kay21:12:39

@thheller that is a load marker your printing

tony.kay21:12:55

@grzm better REPL integration with Cursive, and being able to start arbitrary builds via a JVM prop (also better in Cursive)

thheller21:12:33

@tony.kay yes, but its a vector? should that not be a map? given that it comes in as props?

tony.kay21:12:59

Use normalized markers

grzm21:12:10

@tony.kay gotcha. Thanks. I'm trying to debug a situation where my dev/cljs/user.cljs file is only getting loaded in one of my builds. Trying to cut down what it might be.

tony.kay21:12:41

(load app :bi BuildItem {:marker :kw}) See the new dev guide about loading indicators…just use false for now if you want to get it out of the way

wilkerlucio21:12:27

@thheller I mean the fulcro example, are you writing that code directly on shadow-cljs lib code?

tony.kay21:12:12

@wilkerlucio I think Mitchel’s issue was a regression in the compiler that got fixed

tony.kay21:12:27

I think he said bumping shadow-cljs versions fixed it

tony.kay21:12:06

@grzm Yeah, you can use the plugin if you want…nothing special

thheller21:12:46

it might be “non-standard” fc/new-fulcro-client I’m doing?

grzm21:12:02

@tony.kay I'd rather not, frankly. I'm feeling there's too much magic in general in the build tools, both lein and boot. Right now I'm just trying to figure out this bug I'm seeing between different figwheel builds.

tony.kay21:12:55

@thheller I don’t see a substantial difference there…you’re still defonce the atom to make sure it sticks around through hot code reload

wilkerlucio21:12:26

the inspector is started for the app when you mount it, this initialisation should not be a problem

tony.kay21:12:04

and I’m not sure what you’re asking….if the load marker problem is due to that? no

thheller21:12:52

@tony.kay talking to @wilkerlucio about the fulcro-inspect issue. solved the load issue by just checking if props is a map

wilkerlucio21:12:03

@thheller how can I run that? I would like to see what you are seeing

thheller21:12:03

just thought it was odd that I got a vector with two elements which looked like it wanted to be a map 😉

thheller21:12:15

clone shadow-cljs, checkout fulcro branch, shadow-cljs watch ui open

thheller21:12:43

its a bit weird right now to compile shadow-cljs with shadow-cljs itself so that might not work properly

wilkerlucio21:12:53

@thheller ok, one thing that might be a problem it seems on your app launch, is that your start always generate a new app

wilkerlucio21:12:08

you should just create one app, and re-use that if possible, just re-mounting, but not re-initializing

wilkerlucio21:12:23

(I didn't finish running yet, just a guess)

thheller21:12:28

yeah but that seems to require the occasional page reload for initial state and stuff

thheller21:12:02

thats why I’m creating a new one after each reload

wilkerlucio21:12:15

yeah, well, it's a 2 edge sword, because we can argue that you might want to keep state as you develop 😛

thheller21:12:31

I do keep my state, thats what stop does

wilkerlucio21:12:34

but I guess how much you want each depend on how far you project are (in beginning you usually want more of data refresh, and later less)

wilkerlucio21:12:24

but then you are triggering the data fetch load every time becasue the app is getting re-initialized

thheller21:12:43

yep, thats what I want for now 😉

thheller21:12:17

start from scratch with each reload basically until I understand the moving parts better

wilkerlucio21:12:44

ah, if you undestand what's going on, all good 🙂

wilkerlucio21:12:18

I got this when I tried to compile:

wilkerlucio21:12:20

[19:22:25,052] failed to inspect resource "jar:file:/Users/wilkerlucio/.m2/repository/fulcrologic/fulcro/2.0.0-beta4/fulcro-2.0.0-beta4.jar!/fulcro/client/core.cljc", it will not be available.
clojure.lang.ExceptionInfo: failed to inspect cljs file: jar:file:/Users/wilkerlucio/.m2/repository/fulcrologic/fulcro/2.0.0-beta4/fulcro-2.0.0-beta4.jar!/fulcro/client/core.cljc {:tag :shadow.build.classpath/inspect-cljs, :resource-name "fulcro/client/core.cljc", :url #object[java.net.URL 0xa58a099 "jar:file:/Users/wilkerlucio/.m2/repository/fulcrologic/fulcro/2.0.0-beta4/fulcro-2.0.0-beta4.jar!/fulcro/client/core.cljc"]}
	at clojure.core$ex_info.invokeStatic(core.clj:4739)

thheller21:12:17

thats fine, there is an empty file in the jar

wilkerlucio21:12:38

[:ui] Build failure:
The required JS dependency "intl-messageformat" is not available, it was required by "yahoo/intl_messageformat_with_locales.cljs".

thheller21:12:54

right npm install intl-messageformat

thheller21:12:44

using npm directly, not the bundled foreign-libs

thheller21:12:57

might also need npm install react react-dom

wilkerlucio21:12:07

we will see 🙂

thheller21:12:37

I need to create a proper package.json so this gets easier 😉

wilkerlucio21:12:49

it missed create-react-class on the second time

wilkerlucio21:12:22

yup, that will help

wilkerlucio21:12:10

I think it's running now

thheller21:12:12

btw is there a fulcro/stop or shutdown or so? something I can call so it removes all traces of itself?

thheller21:12:01

or just ReactDOM.unmountComponentAtNode?

wilkerlucio21:12:16

not that I know, just unmount should be fine

wilkerlucio21:12:33

ok, it siad it compiled, but the page is not finding hte js

thheller21:12:25

oh hehe. start the compile again

thheller21:12:37

bad dev tweak since normally users don’t want to load the dev ui build

wilkerlucio21:12:55

did you tried the latest snapshot?

thheller21:12:01

what the heck?

thheller21:12:37

I have it in checkouts

thheller21:12:15

develop or master branch?

wilkerlucio21:12:25

I noticed this on the compilation:

Failed reading cache for fulcro.inspect.ui.events: com.fasterxml.jackson.core.io.JsonEOFException: Unexpected end-of-input: expected close marker for Array (start marker at [Source: java.io.FileInputStream@1859955a; line: 1, column: 93414])
 at [Source: java.io.FileInputStream@1859955a; line: 1, column: 98851]

thheller21:12:09

yeah dunno why that happens but its just a cache read error, if that fails it just will recompile and not use the cache

thheller21:12:07

I don’t get it 😛

thheller21:12:50

thats why I don’t like snapshot deps 😛

thheller21:12:10

can’t really tell which version its using

wilkerlucio21:12:06

you can looking at the .m2, not ideal I agree

wilkerlucio21:12:11

but you can try this: ls ~/.m2/repository/fulcrologic/fulcro-inspect/0.2.0-SNAPSHOT/

wilkerlucio21:12:23

it will show all the versions, they have suffix

wilkerlucio21:12:35

@thheller the latest for fulcro-inpect is 6

thheller21:12:58

but its in checkouts so it should be using that

wilkerlucio21:12:20

I don't trust checkouts for CLJS, they never worked properly in my experience

thheller21:12:34

 "fulcro/inspect/preload.cljs")
=> #object[java.net.URL 0x56fe464c "file:/Users/zilence/code/shadow-cljs/checkouts/fulcro-inspect/src/fulcro/inspect/preload.cljs"]

thheller21:12:45

so its using the checkout definitely

thheller21:12:45

I don’t get why its working for you though

wilkerlucio21:12:01

can you try removing the checkout and updating the snapshot?

thheller21:12:43

btw which browser are you using? wonder why the flexbox isn’t working

wilkerlucio21:12:58

ah, but one thing, I got that error message you got anyway

wilkerlucio21:12:05

just start with ctrl+f

thheller21:12:37

I guess I should read the docs. I was waiting for something to appear by itself 🙂

wilkerlucio21:12:47

well, Element seems broken, worth investigation

thheller21:12:24

ah right you don’t have the shadow checkout. need to bump that. 😉

thheller21:12:30

inspect is neat. I like it

thheller21:12:38

much easier to figure out whats going on now.

thheller21:12:21

can I tx something manually so it opens on start?

wilkerlucio21:12:16

humm, never though of that, let me check

wilkerlucio22:12:33

@thheller

(fulcro.client.primitives/transact! (:reconciler (fulcro.inspect.core/global-inspector))
  [:fulcro.inspect.core/floating-panel "main"]
  [`(fulcro.client.mutations/set-props {:ui/visible? true})])

thheller22:12:30

works, thx.

thheller22:12:29

I’m really starting to like this. nice work everyone. still lots to process but I’m making progress 🙂

thheller22:12:05

defsc hides the ugly defui macro every well

mitchelkuijpers23:12:17

What kind of UI are you building @thheller something for shadow-cljs?

thheller23:12:05

something like https://github.com/oakmac/cuttle to start with. starting/stopping/inspecting builds via web ui

thheller23:12:31

so in the traditional REST style thinking I want to do a request that does some stuff and returns a response

thheller23:12:42

mutations don’t return data themselves though?

thheller23:12:56

so should I be using a query for that then? seems wrong.

thheller23:12:14

or do a mutate and then read?