Fork me on GitHub
#re-frame
<
2016-10-25
>
johanatan02:10:28

anyone using devcards with re-frame?

johanatan02:10:47

adding :devcards true to my :figwheel config for the build profile didn't work here

johanatan02:10:27

oh, wow. I guess I should read a little bit of history before jumping in with the question 🙂

johanatan02:10:16

However that re_frame.cljs won't exactly help get my project.clj set up correctly

johanatan02:10:03

[too bad those examples aren't standalone (i.e., with independent project.clj's)]

johanatan02:10:37

So, it looks like default devcards won't support re-frame. And it doesn't look like @nberger has published to clojars his fork of devcards

nberger03:10:28

@johanatan, @mattly: I couldn't put much time lately on bringing that branch to a "publishable" state. I think it's not very far from having something reasonably usable. My top priority (as soon as I find some time to play with it) is to refactor it to follow the "custom cards" examples, reifying IDevcardOptions to modify how the card is rendered depending on whether it's being rendered as a standalone card (inside of the iframe) or as part of the devcard system. That should decouple it from deep inside of the devcard system and leave it more as an extension. Once there + some minor polishing, I think it's ready for sending as a PR to devcards or to extract some stuff as PRs for devcards (mainly the routing changes to support the standalone routes, which are the iframe target) and publish the rest as a separate lib. If anyone wants to help in any way, feel free to send me a DM and we can discuss about it.

curlyfry06:10:49

@mikethompson: Thanks a lot! I'll look into it today and see what solution I come up with.

si1408:10:27

hey, any of you folks on Euroclojure? :)

kauko10:10:53

@sj14 yup

kauko10:10:55

@johanatan @mattly I know this is the reframe channel, but if you want to use devcards there are alternatives to reframe. Not being able to use cards was the smell that made me look for other options.

mikethompson10:10:45

Smell? re-frame is a framework rather than a library and that has been a very deliberate decision. There are pros and cons.

mikethompson10:10:08

I could easily make re-frame a library. But there would be consequences (smells?) to that as well.

mikethompson10:10:09

So that "smell" of which you talk has been much thought about and considered, I assure you.

kauko10:10:25

Hey Mike! I'm on a really poor wifi + mobile right now. I'd love to chat about this later if you're up to it. I didn't mean to offend, sorry.

kauko10:10:32

Poor choice of words

mikethompson10:10:14

All good. I'd love for there to be a solution for devcards but just in a way that doesn't cost in other important areas.

mikethompson10:10:13

There is also the small matter that I don't tend to use devcards (I find figwheel almost takes away the need) so I haven't personally been tempted to fix this.

mattly14:10:11

as much as I'd like for re-frame to not rely on global state, perhaps binding it to the component or such, what it offers in event/data flow is more than worth the trade-off

mattly14:10:39

I've converted a few people from Elm to re-frame

curlyfry15:10:46

@mikethompson: Read your response and it is now crystal clear. Thanks again! I think this message https://clojurians.slack.com/archives/re-frame/p1477338381004617 can be added to the documentation basically unedited 🙂

johanatan17:10:05

@kauko: what alternative did you settle on?

johanatan17:10:01

@kauko: does this mean that if you are a re-frame heretic like myself and only using global data/event stream for high order concerns that devcards may work as is?

johanatan18:10:53

And btw devcards would be immensely useful in my application as it has grown to a level of complexity such that navigating to various parts of the UI to test the different 'modes' of my re-usable components is taking a non-negligible amount of time. Would be much more efficient to see them side by side on a lab table such as devcards provides.

johanatan18:10:40

Also interestingly/ironically enough, it is this re-use of components primarily that inspired my re-frame heresy

nberger18:10:55

@johanatan that's exactly why I went the iframe route: I wanted to render multiple devcards in the same page, representing different states of a complex app, allowing me to even interact with it in some cases so I wanted all my handlers and subscriptions hooked up, and it was not an option to not use re-frame. And the iframe implementation worked pretty well for us

johanatan18:10:44

@nberger: that sounds great. Would be interested to see how much work your branch needs before it is ready for a PR upstream