portal

dangercoder 2022-12-05T11:30:52.239639Z

Is it possible to extend the UI for self registered commands? Couldn't find it in the docs.

dangercoder 2022-12-13T10:12:40.282579Z

Initial idea was something like this:

(register! #'run-tests {:default     :uncommited-changes
                        :options     [:uncommited-changes
                                      :changes-for-branch
                                      :all-tests]
                        :option-form ..hiccup})
run-tests is a function that runs all tests, it takes an input argument ctx which can be the currently selected value in portal. When the function is executed via portal the first time it's possible to select an option, that option will stay until you run a "clear"-fn via portal and be available in ctx (perhaps the key could be namespaced based on the fn name, e.g. :run-tests/option 💭

dangercoder 2022-12-09T11:30:57.787249Z

I'm using portal to execute functions for e.g running tests, reformatting code. I would like to have the same functionality as "select columns" for my own custom commands (being able to select options which is then sent as an input param to the handler)

djblue 2022-12-09T21:44:34.680839Z

That would be cool. How would you expect the API to work?

djblue 2022-12-08T21:27:33.819469Z

No, currently you can't customize the UI for user commands. What did you have in mind?