This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-14
Channels
- # asami (1)
- # babashka (50)
- # beginners (70)
- # bristol-clojurians (6)
- # calva (36)
- # chlorine-clover (1)
- # cider (4)
- # clj-kondo (3)
- # cljdoc (49)
- # cljsrn (5)
- # clojure (96)
- # clojure-australia (3)
- # clojure-dev (1)
- # clojure-europe (84)
- # clojure-nl (4)
- # clojure-spec (9)
- # clojure-uk (65)
- # clojurescript (31)
- # community-development (6)
- # conjure (17)
- # cursive (8)
- # datascript (5)
- # datomic (12)
- # duct (3)
- # emacs (18)
- # figwheel-main (2)
- # fulcro (7)
- # helix (1)
- # jobs (3)
- # luminus (7)
- # off-topic (77)
- # pathom (3)
- # portal (1)
- # rdf (4)
- # re-frame (1)
- # reitit (4)
- # remote-jobs (4)
- # reveal (15)
- # rum (1)
- # sci (38)
- # shadow-cljs (22)
- # spacemacs (1)
- # specter (6)
- # sql (1)
- # test-check (1)
- # tools-deps (60)
- # vim (12)
Not yet. Vlad has said he's considering that for a future version.
@vlaaad So at this point I've been running Reveal all-day, every-day instead of REBL for over a week. With that auto-table-view code you provided, I haven't felt the need to go back to REBL (although I do still miss the multi-pane view sometimes, showing the expression, the bare value, the metadata and the table/graph view -- I suspect if I modified that auto-table-view to also show the metadata in a vertical panel I'd be satisfied). I do miss the call tree stuff occasionally (but not as much as I expected 🙂 ). Reveal still feels a bit more "work" than REBL -- but it's also more "specific" and more controllable so that's both a pro and a con.
(easy mod to display metadata over the table-view... ok, satisfied now 🙂 )
Thank you for talking time to provide feedback, Sean! Can you share your metadata table mod so I can add it to reveal example?
(let [last-tap (atom nil)]
(add-tap #(reset! last-tap %))
(rx/view-as-is
{:fx/type rx/observable-view
:ref last-tap
:fn (fn [x]
{:fx/type :v-box
:children
[{:fx/type rx/value-view
:v-box/vgrow :always
:value (meta x)}
(if (or (nil? x) (string? x) (not (seqable? x)))
{:fx/type rx/table-view
:items [x]
:v-box/vgrow :always
:columns [{:fn identity :header 'value}]}
(let [head (first x)]
{:fx/type rx/table-view
:items x
:v-box/vgrow :always
:columns (cond
(map? head) (for [k (keys head)] {:header k :fn #(get % k)})
(map-entry? head) [{:header 'key :fn key} {:header 'val :fn val}]
(indexed? head) (for [i (range (count head))] {:header i :fn #(nth % i)})
:else [{:header 'item :fn identity}])}))]})}))
It just adds a v-box around the table and a value-view with the meta. I wasn't sure about the :v-box/vgrow :always
but it seems to make the two panels better behaved as their content expands and contracts?My Atom/Chlorine hot key of ctl-; v
sends a Var of the current symbol so Reveal now shows docstring/arglists and file/line/col. It also helps show what content is datafiable/navigable since that's in the metadata
I may yet change that to assoc
in the :_obj
and :_class
values which I seem to recall REBL used to show in the metadata panel...?
:value (assoc (meta x) :_obj x :_class (class x))}
That's a bit redundant since the auto-table-view shows the value as well, but it is nice to see the class of the object.(although it's nice to see the value and the table view side-by-side -- or one above the other -- with the class)