devcards 2016-07-15

@nberger how about getting that included in the main?

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.

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

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

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

Okay giving it a go, thanks @anmonteiro

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

simply drop your Root component there

I meant either one, the same for om-root

example:

(defcard-om-next my-card
  MyComponent)

I think something is wrong with my dependencies or so.

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

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

No errors to be found

are those devcards online somewhere?

I can take a quick look

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

I meant your project

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.

@bbss: maybe something wrong with your namespace requires?

Just guessing here if I can’t have a look

(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]])
  )

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

it's live-reloading and all

@bbss: FWIW the namespace declaration looks good

Yea "it worked before".

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

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

at the CLJS REPL

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

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

hrm that should work, yeah

I'll figure it out 🙂 thanks anyway

@bbss: what version of figwheel are you using?

@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"]

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

would be interested to here whats causing this

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

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

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

I mean the macro errors I guess

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

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

I am using that yes

so the new 1.9 stuff is just flowing through I think

when I try to define a react method on a defui

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

It's almost like having types 😛

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

And I'm planning on some big improvements

Even more goodies! 🙂