djblue / portal

A clojure tool to navigate through your data.

Home Page:https://djblue.github.io/portal/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: navigate multiple level at the same time

schneiderlin opened this issue · comments

thanks for the great tool!

screenshot from hacker news demo
image
currently, if I click on the item id. it would just return the id as a value.

I want the user to be able to supply a nav function in meta similar to this

(defn nav-multiple [_coll k v]
    (if (= k [:submitted :nth])
      (let [item-id v]
        (nav-item item-id))
      v))

when the id is clicked, invoke nav-item. achieve the same effect as clicking on the submitted vector, then click on the id.

might be related to #77

@schneiderlin Good catch, I think attaching metadata directly to the sub collections should do the trick 👌