Is there a way in UI to drop individual values in the portal?
What’s the preferred way to configure such things on user’s side?
Like filtering out stuff you've tapped out?
Just completely removing them
Like clearing all, but only the selected items
Currently, this can be achieved via a custom tap list:
(def tap-list (atom (with-meta (list) {:portal.viewer/default :portal.viewer/inspector})))
(defn submit [x] (swap! tap-list conj x))
(add-tap #'submit)
(defn clear-selected [& args]
(let [values (into #{} args)]
(swap! tap-list (fn [taps] (remove values taps)))))
(p/register! #'clear-selected)
(p/inspect tap-list)
(tap> :hi)You could also implement the command in terms of the default Portal tap-list atom #'portal.runtime/tap-list but technically that's an internal implementation detail, but I probably won't change it 😂
The other thing here is that items are removed by value, not by index since that info isn't really available to commands
Interesting, thanks! Do you think it would make sense to have it in the standard features?
I think if something can be accomplished by the user, I would rather not include it. Currently, there are certain commands that could be user added, but they were added before the ability to add your own commands and now I can't remove them.