portal

https://github.com/djblue/portal
djblue 2020-12-03T02:30:01.053500Z

I think the easiest thing to do would be to checkout from master all the formatting changes, otherwise a PR would be awesome!

JAtkins 2020-12-03T02:30:50.054200Z

👍. Will do in the am!

JAtkins 2020-12-03T19:14:45.054400Z

Made the pr

JAtkins 2020-12-03T20:11:18.054600Z

I'm very confused. I ran make fmt before committing both times, and it still fails the check...

djblue 2020-12-03T21:31:17.054800Z

Thanks for the PR! When I checkout the PR make fmt seems to fix the issue. What os are you running?

djblue 2020-12-03T21:32:24.055Z

diff --git a/src/portal/ui/app.cljs b/src/portal/ui/app.cljs
index 11130a5..23a8561 100644
--- a/src/portal/ui/app.cljs
+++ b/src/portal/ui/app.cljs
@@ -155,11 +155,11 @@
         viewers            (cons default-viewer viewers)
         compatible-viewers (filter #(when-let [pred (:predicate %)] (pred value)) viewers)]
     {:compatible-viewers compatible-viewers
-     :viewer 
+     :viewer
      (or
-       (some #(when (= (:name %) selected-viewer) %)
-             compatible-viewers)
-       (first compatible-viewers))
+      (some #(when (= (:name %) selected-viewer) %)
+            compatible-viewers)
+      (first compatible-viewers))
      :set-viewer!
      (fn [viewer]
        (set-settings! {:selected-viewer viewer}))}))

djblue 2020-12-03T21:32:41.055200Z

You can apply this diff if it doesn't seem to be working locally

JAtkins 2020-12-03T21:42:52.055400Z

I couldn't tell ya what changed, but it appears to have worked this time 🙂. I'm on Ubuntu 18 LTS btw.

1💯
djblue 2020-12-03T22:38:53.055700Z

Left some comments on the PR

JAtkins 2020-12-03T22:47:35.055900Z

Left a reply & a 2nd commit. Should resolve the issue if I understand it correctly

djblue 2020-12-03T23:55:42.056100Z

Looks good! I did notice your example doesn't seem to work.

djblue 2020-12-03T23:56:00.056300Z

I think you want the k and not the v in your nav fn