Fork me on GitHub
#devcards
<
2016-07-15
>
Macroz06:07:40

@nberger how about getting that included in the main?

bbss11:07:17

I am having trouble using both the dom-node and defcard-om-next helpers with an om-next component. They don't render with the notification Card has not mounted DOM node.

anmonteiro11:07:33

@bbss: if you’re using defcard-om-next in Devcards itself you might want to consider using https://github.com/anmonteiro/devcards-om-next

anmonteiro11:07:00

it provides the same helpers (`defcard-om-next` and om-next-root) with support for reloadable code

anmonteiro11:07:10

(e.g. doesn’t lose component local state on reload)

bbss11:07:56

Okay giving it a go, thanks @anmonteiro

anmonteiro11:07:21

@bbss: wrt to your actual problem, you don’t need dom-node to use defcard-om-next

anmonteiro11:07:28

simply drop your Root component there

bbss11:07:45

I meant either one, the same for om-root

anmonteiro11:07:46

example:

(defcard-om-next my-card
  MyComponent)

bbss11:07:20

I think something is wrong with my dependencies or so.

bbss11:07:39

If I copy the examples from the devcards repo they don't work, neither do the ones from the om next repo

anmonteiro11:07:42

if they don’t render then you might just have a runtime error

bbss11:07:51

No errors to be found

anmonteiro11:07:11

are those devcards online somewhere?

anmonteiro11:07:15

I can take a quick look

anmonteiro11:07:56

@bbss: those I know, and they work for me

anmonteiro11:07:04

I meant your project

bbss11:07:38

Hmm but if I copy those they don't work for me. I don't have the project online but it's just a couple of lines.

anmonteiro11:07:42

@bbss: maybe something wrong with your namespace requires?

bbss11:07:57

possible

anmonteiro11:07:00

Just guessing here if I can’t have a look

bbss11:07:54

(ns synth.devcards.adsr
  (:require
   [synth.devcards.time]
   [synth.devcards.player]
   [synth.devcards.editor]
   [synth.devcards.radial-menu]
   [clojure.data :as data :refer [diff]]
   [om.next :as om :refer-macros [defui]]
   [om.dom :as dom]
   )
  (:require-macros
   [devcards.core :as dc :refer [defcard defcard-om-next dom-node]]
   [cljs.core.async.macros :refer [go]])
  )

anmonteiro12:07:09

@bbss: does your CLJS build have :devcards true?

bbss12:07:40

it's live-reloading and all

anmonteiro12:07:06

@bbss: FWIW the namespace declaration looks good

bbss12:07:43

Yea "it worked before".

bbss12:07:12

Anyway I'll dive a little deeper and give your library a go as well. Thanks for your effort.

anmonteiro12:07:14

if you’re using figwheel, try (reset-autobuild)

anmonteiro12:07:30

at the CLJS REPL

bbss12:07:03

nope, didn't help. I had tried lein clean before. Maybe it's an old dependency in my maven cache or so.

anmonteiro12:07:12

@bbss: one last thought: which Om version are you using?

bbss12:07:33

38 alpha

anmonteiro12:07:40

hrm that should work, yeah

bbss12:07:17

I'll figure it out 🙂 thanks anyway

bhauman13:07:31

@bbss: what version of figwheel are you using?

bbss13:07:35

@bhauman: in dependencies: [figwheel-sidecar "0.5.4-7"] in profiles:

:profiles {:dev
             {:dependencies [[binaryage/dirac "0.6.1"]
                             [ring/ring-devel "1.5.0"]
                             [com.cemerick/piggieback "0.2.1"]
                             [figwheel-sidecar "0.5.4-7"]

bhauman13:07:50

well I would back off to a simple example at this point

bhauman13:07:24

would be interested to here whats causing this

bhauman13:07:31

I'm going to be delving back into devcards work in a few weeks hopefully, so many cool opportunities to support spec

bbss13:07:08

I love the changes to figwheel showing the expected signature on mistakes!

bhauman13:07:15

hmmm not sure what you are talking about, your talking about code context, or the propagation of clojure 1.9 macro errors?

bbss13:07:01

I mean the macro errors I guess

bbss13:07:22

The arrow pointing to the place where things are going wrong and also showing when for instance an arguments list is too short.

bhauman13:07:56

are you using clojure 1.9?? I think you may be getting new clojure macro errors along with figwheels context stuff

bbss13:07:16

I am using that yes

bhauman13:07:25

so the new 1.9 stuff is just flowing through I think

bbss13:07:46

when I try to define a react method on a defui

bbss13:07:41

I forget the next-props for example, it tells me so fast!

bbss13:07:47

It's almost like having types 😛

bhauman13:07:57

I'm really happy it works so well, I'm surpised myself sometimes

bhauman13:07:06

And I'm planning on some big improvements

bbss13:07:42

Even more goodies! 🙂