Is there a viewer that can nav and expand a nested value in place instead of showing it as a single top-level item?
For example I would like to nav on the 1 under ArtistId and have it expand in place:
Interesting, that might work. If I override the nav command, get the nested value, assoc it into the original value, replace the original value in taplist and then send the command to expand it.
Another option I've been considering is having a fn viewer that could transform selected values, kinda like some of the parse viewers. This could operate off of any registered fn effectively turning any command into a viewer. nav would have to be treated a little special but that wouldn't be too difficult. Does something like that sound like a good solution to your problem?
The default inspector viewer will open it as a single item:
Here is the data structure from the example:
(do
(tap>
(with-meta
{:AlbumId 1
:Title "track name"
:ArtistId 1}
{'clojure.core.protocols/nav
(fn [_ k v]
(if (= k :ArtistId)
{:ArtistId 1
:Name "artist name"}
k))}))
(tap> (pv/markdown "Before naving:"))
(tap>
{:AlbumId 1
:Title "track name"
:ArtistId {:ArtistId 1
:Name "artist name"}})
(tap> (pv/markdown "Desired after naving:")))Afik you can send cljs commands to the portal instance, after eval, to navigate to desired (nested) val.
https://clojurians.slack.com/archives/C0185BFLLSE/p1723475349449989
That sounds useful. Is the reason for nav being special because it needs to make a rountrip to jvm or some other reason?
Nav is special because it needs three params [coll k v] that would be implicitly generated when selecting a value.
Im interested in maybe easier (or more direct) on the fly navigation/customization of the view