Fork me on GitHub
#portal
<
2023-11-07
>
hanDerPeder18:11:01

how to you view the state of an reagent app using portal? seems portal.web does not have an inspect function

djblue18:11:30

Ohh, I may have forgotten to add one. (portal.web/open {:value 123}) should work as well. Will add it soon 👌

hanDerPeder19:11:49

strange, :value doesn't seem to do anything. I'm also only able to spawn one window. Should it be possible to spawn multiple?

djblue19:11:08

Currently, portal.web only allows for a single instance. I think it was a bit easier to get it going, but I could see removing this limitation. This would involve getting sessions working for it.

hanDerPeder19:11:19

just restarted my repl and working as intended 👍 thanks

awesome 1
hanDerPeder19:11:23

too bad about the one session thing, ideally I'd like one window for the application state and one for random taps.

hanDerPeder19:11:03

quite new to clojurescript, like TIL you can't do requiring-resolve. do you see any major problems with adding support for multiple sessions, or more of a time/need issue?

djblue19:11:32

I think the main issue will be around the parent browser process and page reloads. I think it was easier to re-establish the connection with a single instance, but tracking multiple should also work. Just a bit more involved.

hanDerPeder19:11:33

I see, thanks! the nrepl-wrapper + a state window gets me 90% there. this is not a major issue.

hanDerPeder19:11:05

btw, since you're around @djblue. I have a debug utility called maptap that renders geojson layers in leaflet. it would be cool to have this as a viewer in portal. is it possible to add custom viewers? if not, would you be interested in a PR for this?

hanDerPeder19:11:51

I hadn't seen that. thanks!

djblue19:11:51

Let me know how it goes. I would like to improve building things for portal outside of portal 👌

👍 1
hanDerPeder20:11:14

so far so good 😄

hanDerPeder20:11:36

btw, you should probably steal include https://github.com/mentat-collective/emmy-viewers/blob/main/src/emmy/portal/css.cljs#L4! very handy and not obvious (at least to me)