Fork me on GitHub
#reveal
<
2021-12-16
>
vlaaad11:12:07

also, I made a short talk (7 min) about Reveal and stickers in action on @reClojure data science special — https://youtu.be/lqb4XlFI-08?t=1220

Célio13:12:51

Hi! What’s the secret to programmatically show some cljfx stuff in the results panel? I’m writing an action that renders some cljfx ui in the results panel, and I’m trying to find an easy way to test it without having to right click on value -> show action popup -> click on action, so I’m hoping that I could do some magic like this instead: (show-this-in-the-results-panel {:fx/type … })

vlaaad15:12:33

do you use reveal as a REPL?

vlaaad15:12:40

if yes, use (r/open-view {:fx/type …})

vlaaad15:12:20

if not as a REPL, use #reveal/inspect {:fx/type ...} for inspector popup

vlaaad15:12:07

or, if you don’t use reveal as a REPL, but use one window where you want to open the view, use (r/submit-command! (r/open-view {:fx/type ...}))

vlaaad15:12:44

if you do some sort of iterative progress on a particular view that you have in a def, you could also use observable-view to watch the var holding the view. Then, you can open the view once and iterate on defed value while the view will update automatically…

vlaaad16:12:40

here is a demo of observable-view watching the var the holds a vega visualization data https://youtu.be/lqb4XlFI-08?t=1568

kenny16:12:36

This is really helpful @U47G49KHQ. I too have been doing the manual flow Celio described. It'd be awesome if this knowledge was documented somewhere 🙂

vlaaad16:12:52

I probably should write another blog post..

vlaaad16:12:58

Or even do a video..

kenny16:12:13

A post on how you develop reveal would be awesome.

Célio16:12:24

Sorry for the delay. Thanks so much for the info! Yeah I was reading the docs before, trying to make sense of the built-in component fns. I think the missing piece for me was to understand the submit-command! + open-view combo (I don’t use reveal as a repl). I’ll also check out observable-view, seems useful to my workflow.

Célio16:12:34

> I probably should write another blog post Maybe a short section in the docs on development workflow?

vlaaad17:12:21

Not sure it can be short given how many ways there are to use reveal...

Lukas Domagala20:12:03

I had similar problems when I played with building new views. Maybe a “common patterns” section would help in the docs. also breaking out the docs for “extending reveal” into its own page might help

2