Fork me on GitHub
#portal
<
2021-11-11
>
djblue01:11:03

With the upcoming https://www.meetup.com/London-Clojurians/events/279631487/, I though it would be cool to have a slide or two with how current users have their portal setup. Feel free to share a screenshot and I'll include it in the talk 💯

👍 1
seancorfield01:11:25

Something like this?

👍 2
seancorfield01:11:15

(plus, you know where my dot-clojure and vscode-clover-setup repos are)

👍 1
wilkerlucio12:11:49

looks like this here 🙂

👍 1
genekim21:11:05

Floating window on laptop, with IntelliJ on large screen next to it.

genekim01:11:00

OMG @U04V70XH6 your Portal screen is beautiful — I freaking LOVE that you put log messages with timestamps with your tapped data. So good!!! How one might replicate this? Would make it so easy to scan for the data I'm looking for!!

djblue01:11:28

@U6VPZS1EK this https://clojurians.slack.com/archives/C0185BFLLSE/p1636499007053500?thread_ts=1636498885.053400&amp;cid=C0185BFLLSE should provide the context for how to emit log data. It essentially boils down to emitting data of a certain shape :thumbsup:

seancorfield01:11:38

@U6VPZS1EK This is the code I use https://github.com/seancorfield/dot-clojure/blob/develop/dev.clj#L80-L110 in the dev.clj that starts up my REPL. It piggybacks on tools.logging (which we use for everything at work) and makes every logging call also tap> data in the format that Portal understands.

genekim16:11:31

Thank you, @U04V70XH6 — this is utterly incredible. (Not quite sure I know why log messages are being duplicated yet) But this could change how I work! I’ll keep you posted!

djblue17:11:10

@U6VPZS1EK if you haven't already, select a log item and try the portal.runtime.jvm.editor/goto-definition command (shortcut g d)

genekim17:11:52

Wow. That is fabulous! Amazing work! BTW, is there a keyboard command to switch between inspector/table/tree? (I’m currently mousing around a lot to do that.) And a keyboard shortcut to bring up the command palette? (I did look in the docs, but couldn’t find it.) Congrats on creating something that is so freaking useful!

❤️ 1
seancorfield17:11:43

ctrl-j for the command palette, v to select a viewer (inspector/tree/etc).

genekim17:11:21

Thank you, @U04V70XH6 — I’ll rescan the documents and maybe submit a PR to make this a little more obvious!

seancorfield17:11:02

Chris has said he plans to work on the docs quite a bit "soon". They are a bit minimal right now.

genekim17:11:49

@U1G869VNV I think I saw somehwhere @U04V70XH6 mention some strange keyboard focus issues. Here’s a video 3m video showing some strange keyboard focus issues in IntelliJ. (You can hear me gushing about how great Portal is to use in the beginning. 🙂 My notes: 1. arrow keys don’t work when shifting focus into Portal. To replicate. (53s in video) > clear Portal (ctrl-L) > tap> new value > Meta-` to shift focus to Portal > keyboard focus not in Portal -- requires mouse-click in element 2. “cmd-j, esc: focus shifts back to IntelliJ window; expect it to stay in Portal”. (actually, 53s in video, too.) https://www.dropbox.com/s/thserzqfc4z6js4/for%20djblue%20from%20gene%20keyboard%20issues%20in%20portal.mov?dl=0

👍 1
wilkerlucio11:11:21

hello, I'm trying to reproduce the log thing here as well, what makes Portal render that log ui? I'm trying this for demo, but still logging the standard maps (based on the code from @U04V70XH6):

(tap> 
    {:form '()
     :level "WARN"
     :result "bla"
     :ns 'some.ns
     :file "some-file"
     :line 10
     :column 2
     :time (l/now)
     :runtime :clj})

wilkerlucio11:11:32

ups, just found, the :level needs to be keyword, working after that 😛

1
seancorfield17:11:17

@U066U8JQJ yeah, the level is a keyword in tools.logging...

Lukas Domagala12:11:58

@U1G869VNV i’m guessing it might be a bit early to show it in a presentation but i’m working on a tracer that puts out flamegraphs into portal: https://github.com/Cyrik/omni-trace