Fork me on GitHub
#portal
<
2021-05-18
>
Felipe Nascimento17:05:40

Hi there, Can I ask a question about portal?

Felipe Nascimento17:05:10

it is possible change de default viewer from inspector to table?

djblue18:05:19

Hi @blindcoding9, there isn't a way to do this globally, but you can set a default viewer for a value via metadata. (with-meta value {:portal.viewer/default :portal.viewer/table}) would be a work around for now.

plexus18:05:13

oh that's good to know. I agree I would also love to see a way to make the global sticky, but the metadata also opens some nice possibilities

djblue19:05:53

^{:portal.viewer/default :portal.viewer/hiccup} [:div [:h1 "hello, world"] [:portal.viewer/tree {:some :data}]] 💯

djblue19:05:56

You can paste the edn string directly into the https://djblue.github.io/portal/ and you get this view

djblue19:05:00

You are looking at a string, parsed as edn, rendered as hiccup, with an element that is a portal viewer aw_yeah

plexus04:05:34

really cool!

djblue18:05:47

However, I'm open to suggestions on how to improve the UX 👌