devcards

Devcards aims to provide a visual REPL experience for ClojureScript https://github.com/bhauman/devcards
jannis 2015-11-02T14:03:58.000374Z

Hi! What could lead to (def ^:export front-matter ...) not being applied?

bhauman 2015-11-02T17:51:30.000375Z

@jannis: good question? you mean front matter isn't showing up in the ns?

jannis 2015-11-02T17:54:36.000376Z

@bhauman: Not quite. I mean "not applied" as in setting e.g. {:base-card-options {:frame false}} doesn't set :frame false on the devcards.

jannis 2015-11-02T17:55:03.000377Z

Hold on, I can show you the code in a sec.

bhauman 2015-11-02T17:55:41.000378Z

@jannis: yeah that isn't intended to override devcards in the normal context

bhauman 2015-11-02T17:55:45.000379Z

yet

jannis 2015-11-02T17:56:04.000380Z

Ah. What is it intended to do then? 😉

bhauman 2015-11-02T17:56:09.000381Z

@jannis: that was a hack to get my blog posts working

bhauman 2015-11-02T17:56:54.000382Z

@jannis: so its only imported and applied to blog posts

jannis 2015-11-02T17:57:05.000383Z

Hehe, ok. So just passing :frame false to individual cards for now is the way to go.

bhauman 2015-11-02T17:57:35.000384Z

yeah unless you want to think about what global config looks like an send a PR :simple_smile:

bhauman 2015-11-02T17:57:51.000385Z

its certainly needed

jannis 2015-11-02T17:58:39.000386Z

One idea could be to pass them to start-devcard-ui!. But perhaps that's a) a bad idea and b) too global.

bhauman 2015-11-02T17:59:15.000388Z

that seems fine to me

bhauman 2015-11-02T17:59:46.000389Z

you really can only call that function once anyway

jannis 2015-11-02T18:00:32.000391Z

I can see if I can cook up a PR for that if you like.

bhauman 2015-11-02T18:01:10.000392Z

I certainly welcome it

jannis 2015-11-02T18:01:48.000393Z

I've seen a weird duplication of devcards on automatic page reloads (using boot-reload) by the way, but I'm almost sure that's me breaking devcards by setting up reloading in some odd way.

bhauman 2015-11-02T18:04:27.000394Z

Hmmmm, duplication of cards? or duplication of the whole interface?

jannis 2015-11-02T18:05:24.000395Z

A mix perhaps. Like, when I'm on the devcards page for one particular ns, saving a change will show the page content twice.

jannis 2015-11-02T18:05:59.000396Z

On that page, I mean. Not in the overview. But the cards number for that ns in the overview will be twice of what it should be. :simple_smile:

bhauman 2015-11-02T18:07:51.000397Z

That makes me think that the file is being reloaded twice in rapid succession

bhauman 2015-11-02T18:08:14.000398Z

do you have autosave enabled?

bhauman 2015-11-02T18:08:19.000399Z

@jannis: ^

bhauman 2015-11-02T18:08:50.000400Z

if not I would say that the boot reloading is pushing the file too many times

jannis 2015-11-02T18:10:09.000401Z

Yeah, my setup is indeed pushing it twice.

jannis 2015-11-02T18:10:45.000402Z

I'll fix that. No bug in devcards. :simple_smile:

bhauman 2015-11-02T18:23:02.000403Z

:simple_smile:

jannis 2015-11-02T21:31:07.000405Z

@bhauman: PR submitted :simple_smile: