Fork me on GitHub
#portal
<
2024-04-22
>
hanDerPeder15:04:00

shouldn't this work? from clojurescript

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

hanDerPeder15:04:42

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

hanDerPeder15:04:31

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)

hanDerPeder15:04:42

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

djblue17:04:01

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}))

hanDerPeder17:04:47

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

chromalchemy22:04:17

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?

chromalchemy22:04:26

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