portal

https://github.com/djblue/portal
grumplet 2021-01-05T12:28:46.106800Z

Hiya - I’m looking at using Portal while developing a health related app containing large statistical model. This is a shadow-cljs single page app. Early days yet, so I’m going through the Portal demos and code.

grumplet 2021-01-05T12:29:10.107300Z

I’m hitting issues when accessing the web portal tests though

grumplet 2021-01-05T12:31:20.108900Z

So, from the repo I can do `make e2e/jvm’ etc and they all work fine except for ‘make e2e/web’. This barfs with an error when loading Portal:

grumplet 2021-01-05T12:31:25.109200Z

Downloading: djblue/portal/0.6.1/portal-0.6.1.pom from clojars
Downloading: djblue/portal/0.6.1/portal-0.6.1.jar from clojars
WARNING: Use of :main-opts with -A is deprecated. Use -M instead.
ClojureScript 1.10.764
cljs.user=> (ns cljs.user
  (:require [clojure.core.protocols :refer [Datafiable]]
            [<http://example.app|example.app> :refer [start]]
            [portal.web :as p]))

cljs.user=&gt; (def portal (p/open))
Execution error (TypeError) at (&lt;cljs repl&gt;:1).
Cannot set property 'onunload' of null

grumplet 2021-01-05T12:32:07.109900Z

I’m guessing there’s something special you need in your dev environment so Chrome launches correctly for Portal? There was a super-brief mention of using headless Chrome in the apropos video.

grumplet 2021-01-06T11:35:13.110500Z

Thanks Chris - yes that was the problem.

grumplet 2021-01-06T11:35:48.110700Z

Now to try and integrate it with my app and calva jack-in!

🎉 1
djblue 2021-01-05T15:02:47.110100Z

Hi @grumplet, I think you need to enable pop-ups for localhost so portal can open the child window