reveal

vlaaad 2021-12-16T11:12:07.138800Z

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élio 2021-12-16T13:41:51.141600Z

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 … })

vlaaad 2021-12-16T15:48:33.141700Z

do you use reveal as a REPL?

vlaaad 2021-12-16T15:49:40.141900Z

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

vlaaad 2021-12-16T15:50:20.142100Z

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

vlaaad 2021-12-16T15:52:07.142300Z

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 ...}))

vlaaad 2021-12-16T15:53:44.142500Z

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…

vlaaad 2021-12-16T16:01:40.142900Z

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

kenny 2021-12-16T16:18:36.144400Z

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

vlaaad 2021-12-16T16:22:00.144800Z

It's mentioned there https://vlaaad.github.io/reveal/#built-in-components

vlaaad 2021-12-16T16:22:52.145Z

I probably should write another blog post..

vlaaad 2021-12-16T16:22:58.145200Z

Or even do a video..

vlaaad 2021-12-16T16:23:01.145400Z

Or both..

kenny 2021-12-16T16:24:13.146500Z

A post on how you develop reveal would be awesome.

Célio 2021-12-16T16:54:24.146700Z

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élio 2021-12-16T16:56:34.147Z

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

vlaaad 2021-12-16T17:52:21.147300Z

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

Lukas Domagala 2021-12-16T20:31:03.147600Z

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