Fork me on GitHub
#fulcro
<
2018-01-26
>
cjmurphy00:01:10

So a link is a key at the root level that has as its value a map. And this map is an entity (a table record where there can only ever be one). I'm thinking this entity can't itself have field joins that are Ident/s (single Ident or vector of Idents).

currentoor00:01:35

@chrisblom we use it and it’s pretty easy, you can even write your own version of defsc, based on the original, that just includes a call to sablono.core/html around the body

currentoor00:01:15

or use it around the body like so

(defsc ReportsTab [this {:keys [label
                                ui/current-user
                                reports/table]}]
  {:initial-state (fn [params]
                    {:page          :reports/index
                     :label         "REPORTS"
                     :reports/table (om/get-initial-state rep/ReportTable {})})
   :query         [:page :label
                   [:ui/current-user '_]
                   {:reports/table (om/get-query rep/ReportTable)}]}
  (html
    [:div.app-main-col-content
     [:div.row.app-main-panel-title.title-bottom-spacing
      [:div.large-12.columns {:style {:padding "0px"}}
       [:h1 "All Reports"]]]
     (ui-report-table table)]))

levitanong05:01:33

hi all, how do i prevent a {:ui/fetch-state ...} from showing up in place of data when an error happens?

;; initial app-state
{...
 :app/things []
 }

;; after a load error
{...
 :app/things {:ui/fetch-state {...}}
 }

;; this messes things up because app/things is a join against an identified component.
[{:app/things (prim/get-query Thing)}]

;; so the parent component receives a weird value instead of []
Note that I’ve already set the :marker key in the load, so the load status actually shows up in the load table and not in-place. Seems like this could be unintended behavior.

tony.kay06:01:38

@cjmurphy the value at root can be anything, but you are right that the value isn't normalized data.

tony.kay06:01:13

@levitanong could be a bug if marker is not true

levitanong06:01:48

@tony.kay the marker is set to some keyword

tony.kay06:01:04

Yeah probably a bug then

levitanong06:01:12

Will post an issue

levitanong07:01:31

hi all, what’s the story for code splitting during development? I understand that routing needs to be changed fundamentally to support code splitting, but AFAIK :modules is only supported in :simple or :advanced optimizations.

levitanong11:01:16

scratch that, i have outdated information 😅

drewverlee17:01:58

Any fulcro users use spaceemacs, cider, etc… the tutorials assume cursive. If its not much work to get spacemaacs + cider working i would rather do that as i’m slightly more used to it. If its going to be an on going headache then i’ll just switch over, as i’m a heavy intelliji user in java.

claudiu18:01:28

@drewverlee I've been using fulcro with spacemacs & cider. Don't remember running into any issues :)

drewverlee03:01:36

@U3LP7DWPR or @U09FEH8GN are these instructions relevant? http://www.photonsphere.org/posts-output/2017-12-19-fulcro-emacs-cider/ They seem different then offical docs: http://book.fulcrologic.com/ i’m a bit confused about the whole nrepl, headless repl business. I might be a good candidate for just sticking with intelliji. But i’ll probably miss parinfer support and the in file eval (i know you can push to the code to the repl).

currentoor03:01:01

@drewverlee what i do is similar to the first link but it’s missing a step

currentoor03:01:54

namely the dependencies you have to add

currentoor03:01:37

but both should work

currentoor03:01:12

if you use cider-jack-in, like the book suggests, then cider will inject the necessary dependencies

claudiu09:01:51

@drewverlee I am sticking with spacemacs mostly because I'm a split-scree & multiple tabs junky 🙂 Checked out cursive a bit, looks really nice. Don't know about in-file evaluatio but Cursive has parinfer out of the box, it's just not the default 🙂 Not sure I'm using cider right but works for me (start two repls, jack in to them, and start figwheel from a emacs repl buffer).

drewverlee16:01:58

Thanks a lot of the help!!!!! I’ll keep fiddling with both. Its annoying to switch editors so often as i can’t recall they key bindings. Hm, if parnifer works out of the box then i might switch over. I’ll miss the inline evaluation, but its not really to much different having it presented in the repl screen. I guess i’m not that excited about the amount of configuration i have to do on some clojure projects. Like figwheel is really cool, but when i look at the instructions necessary to set it up on some projects it seems daunting. Like i have an hour after work to get some momentum on something 😞

tony.kay17:01:36

@drewverlee if you’re already a heavy IJ user, I’d recommend it. That said, the template should be set up to work with emacs. I don’t use emacs myself, but the intention is for it to work.

tony.kay17:01:49

(e.g. lein new fulcro …)

tony.kay17:01:59

same with the fulcro-lein-template

tony.kay21:01:06

@levitanong try 2.1.4-SNAPSHOT for the marker fix on errors