nextjournal

Lukas Domagala 2021-12-03T14:10:34.161Z

how do i put one viewer into another?

(v/html [:div.text-center
         [:button.bg-blue-500.hover:bg-blue-700.text-white.font-bold.py-2.px-4.rounded
          "press"]
         (v/plotly {:data [{:z [[1 2 3] [3 2 1]] :type "surface"}]})])
i’ve been trying this, but its not working. is there some way to make it happen?

mkvlr 2021-12-05T10:03:16.173900Z

this should work when you wrap the v/plotly in a call to v/inspect. Plan to document this and write a bit about why that's required next week

mkvlr 2021-12-05T10:13:03.176900Z

on second thought might also make a small change to support the snippet above

respatialized 2021-12-07T17:25:26.177900Z

what namespace is v/inspect in?

mkvlr 2021-12-07T19:15:45.179200Z

@afoltzm this the the sci env that the viewer render functions evaluate in https://github.com/nextjournal/clerk/blob/main/src/nextjournal/clerk/sci_viewer.cljs#L879

Lukas Domagala 2021-12-06T14:08:17.177400Z

Great, thank you, I'll try it later today. Would the change work for all nested views?

Lukas Domagala 2021-12-03T16:32:00.161400Z

ah sorry, i’m talking about clerk