portal

hanDerPeder 2023-11-07T18:48:01.331409Z

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

djblue 2023-11-07T18:50:30.782519Z

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

hanDerPeder 2023-11-07T19:08:49.822249Z

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

djblue 2023-11-07T19:10:08.554179Z

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.

hanDerPeder 2023-11-07T19:11:19.247509Z

just restarted my repl and working as intended 👍 thanks

1
hanDerPeder 2023-11-07T19:12:23.512909Z

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

hanDerPeder 2023-11-07T19:14:03.301549Z

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?

djblue 2023-11-07T19:15:32.485459Z

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.

hanDerPeder 2023-11-07T19:18:33.161689Z

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

hanDerPeder 2023-11-07T19:24:05.805609Z

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?

djblue 2023-11-07T19:25:21.497539Z

Have you taken a look through https://cljdoc.org/d/djblue/portal/0.49.1/doc/guides/custom-viewer?

hanDerPeder 2023-11-07T19:25:51.738299Z

I hadn't seen that. thanks!

djblue 2023-11-07T19:26:51.178039Z

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

👍 1
djblue 2023-11-07T19:34:30.302319Z

https://github.com/mentat-collective/emmy-viewers/tree/main/src/emmy/portal is how emmy-viewers is doing it

hanDerPeder 2023-11-07T20:26:14.804239Z

so far so good 😄

hanDerPeder 2023-11-07T20:31:36.157969Z

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)