portal

hanDerPeder 2024-04-22T15:32:00.310719Z

shouldn't this work? from clojurescript

(tap> (with-meta
        (ddiff/diff {:a 1} {:a 2})
        {:portal.viewer/default :portal.viewer/diff}))

hanDerPeder 2024-04-22T15:32:42.130249Z

opens the inspector viewer with no way of choosing the diff viewer

hanDerPeder 2024-04-22T15:34:31.752699Z

relevant parts of shadow-cljs.edn

{:builds
 {:my-build
  {:target :browser,
   ,,,
   :build-hooks [(portal.shadow.remote/hook {:port 12345})]
   :devtools {:preloads [cljs.user]}
   ,,,}}}
cljs.user
(ns cljs.user
  (:require [portal.web :as p]
            [portal.ui.viewer.diff]))

(add-tap p/submit)

hanDerPeder 2024-04-22T15:35:42.445139Z

I can highlight two values and run the lambdaisland.deep-diff2/diff-impl/diff command

djblue 2024-04-22T17:08:01.272839Z

lambdaisland.deep-diff2 is already included in the client so you just need to set the viewer.

(tap> (with-meta
        [{:a 1} {:a 2}]
        {:portal.viewer/default :portal.viewer/diff}))

hanDerPeder 2024-04-22T17:28:47.821549Z

as expected; I was holding it wrong. Thanks! 😄

chromalchemy 2024-04-22T22:26:17.249619Z

I have a html view that is not showing the full height of portal tab. (and has it’s own scrollbar) is there a way to make this full height?

chromalchemy 2024-04-22T22:30:26.221099Z

Also i am doing below to navigate past the meta parent container an only show this html. Is this the way? (seems like some ceremony to render only the value I’m inspecting)

(p/clear)
(-> [myhiccup ctx]
  (portal-hiccup) ;; hiccup-> portal.viewer/html with embedded