Hey, first off I wanna say I really love this project and the whole idea of it! https://cljdoc.org/d/djblue/portal/0.24.0/api/portal.ui.viewer.charts This version had chart viewers. What happend to them?
The viewer still exists, I think the docs for the UI code was removed since most consumers don't use the UI code directly.
In that doc it has a note "CLJS" only, is that still the case? I haven't looked too deeply into everything now, I just figured the output of frequencies would be a prime candidate for a bar chart viewer, but it seems I was mistaken. How would I go about figuring out what a value needs to satisfy for a particular viewer to be applicable?
the cljs only is referring to how the reagent component is implemented in cljs, but the viewer supports data from any runtime that can send it data.
https://github.com/djblue/portal/blob/master/src/portal/ui/viewer/charts.cljs#L7-L21 are the specs that the viewer uses to match data
This is friggin magic man thanks. If I really wanted to customize the vega, I would go and write custom viewers right?
yeah stupid question the longer I look at the code
You can view some examples for that here https://djblue.github.io/portal/?content-type=application/edn&content-url=https://raw.githubusercontent.com/djblue/portal/gh-pages/docs.edn
It's the static documentation like on cljdoc + live viewer docs with the specs extracted from the viewers
Thanks! Speaking of vega, I know this is a very open question likely to have a disappointing answer, but I am still very new to the whole data visualization thing - in the bioinformatics field you have pretty elaborate visualization systems at times that conceptually don't map too well to what vega seems to be designed for mostly. Anyways, the tools out there don't use vega, but there are some good JS components - are you aware of some tooling or "supported" way of glueing vega interactions to API calls to other stuff? Is that a thing people do?
I think the vega spec has some hooks for interactivity, but I haven't explored it too much. For custom interactivity, in portal, I would go down the path of building a custom reagent viewer. https://github.com/djblue/portal-workflows/blob/main/src/portal/workflows.cljsis an example of a what you can do with a custom viewer that I used for my recent conj talk. https://cljdoc.org/d/djblue/portal/0.58.5/doc/guides/custom-viewer are some docs on getting started with a custom viewer. Is that what you were looking for?
Your custom viewer can import modules from npm if they are installed btw
Yeah that definitely covers the part of more tailored visualizations for the specific data I am working with. The hooking vega components up with stuff like protein, alignment or graph viewers I guess will go pretty far beyond that, but again, new stuff for me, I'll revisit that when I am more familiar with the the vega ecosystem
Really cool stuff! And to think what made me aware of this whole thing was the bb docs 😄
Also, this setup: https://cljdoc.org/d/djblue/portal/0.58.5/doc/guides/nrepl overall works fine for me using nREPL, but I don't get any source and file info or timestamping?
This may be an issue with how your nrepl client (editor/cli repl) is conveying source information to the nrepl server. I know cursive communicates source info in a non-standard way. Although, portal was https://github.com/djblue/portal/commit/6d2639f7629d2f8ae8bc80e9dd7ad9b2a1fb3e40to support cursive's non-standard behavior. The timestamp is generated by the server, so that should always work which is a bit more odd 🤔
I'm using CIDER in Emacs, and so far I thought my setup is pretty standard/ootb, but maybe I screwed something up somewhere
I originally built the nrepl middleware when I was using emacs, but I haven't validated it recently.
When I get some time I'll double check 👍
If you want to take a look, you can tap some values from https://github.com/djblue/portal/blob/master/src/portal/nrepl.clj#L91-L92 and see if the data flowing into the nrepl middleware has the expected info.
I think eval'ing the PortalTransport will impact future evals so you don't need to restart your repl after connect/jack-in