This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-10
Channels
- # adventofcode (54)
- # announcements (30)
- # asami (13)
- # aws (10)
- # babashka (16)
- # babashka-sci-dev (44)
- # beginners (95)
- # calva (63)
- # clara (10)
- # clj-kondo (3)
- # cljfx (6)
- # cljs-dev (7)
- # cljsrn (1)
- # clojure (68)
- # clojure-europe (59)
- # clojure-nl (7)
- # clojure-norway (12)
- # clojure-spec (6)
- # clojure-uk (6)
- # clojurescript (4)
- # component (4)
- # conjure (5)
- # datomic (3)
- # deps-new (1)
- # events (4)
- # exercism (1)
- # figwheel-main (1)
- # fulcro (33)
- # gratitude (1)
- # improve-getting-started (3)
- # jobs (3)
- # lsp (5)
- # malli (10)
- # membrane (5)
- # music (3)
- # nextjournal (6)
- # off-topic (42)
- # pedestal (2)
- # polylith (14)
- # portal (11)
- # re-frame (42)
- # releases (3)
- # reveal (4)
- # shadow-cljs (62)
- # tools-build (1)
- # tools-deps (3)
- # web-security (1)
- # xtdb (3)
@juan.ignacio848 the viewer got it’s predicate relaxed. I’ll check what the new one is
for vega-lite to actually be able to render something you’d need an actually valid vl spec. a tiny one would be this:
{:data
{:values
[{:a "A", :b 28}
{:a "B", :b 55}
{:a "C", :b 43}
{:a "D", :b 91}
{:a "E", :b 81}
{:a "F", :b 53}]}
:mark "bar"
:encoding
{:x
{:field "a"
:type "nominal"
:axis {:labelAngle 0}}
:y {:field "b", :type "quantitative"}}}
Does it make sense to automatically choose vega viewer when stuff under :data doesnt conform to vega lite spec?
my indentation was bad, sorry. the data can be basically map/vector thing, so its hard to spec. and in general vega-lite needs very little in it’s spec, which is why djblue changed it to be more forgiving on the clojure side. the main problem is: you can’t be certain that something is valid vega before passing it into vega, so you want to be relaxed, but then you get false positives, like your case. the best solution would be to a separate predicate for “allowed as viewer” and “default as viewer”, but that’s a project that hasn’t started yet
I think for now, the spec can still be more open but the inspector view could have a higher priority to avoid this issue
ah it should “only” kick in when you have a :data attribute
so I build a thing to reposition and focus/pull to front the portal instance belonging to the currently focused ide: https://lukas-domagala.de/blog/cljs-to-jxa-for-automation.html