Ad-hoc commands/dataforms: show list-single field as tree view instead of drop down menu when it is the only editable field
With this MR, when a data form only has one editable field of type list-multi list-single, we don't render it as a drop-down menu but a tree view instead. This improves usability quite a lot, since a form that has a single drop down menu is a bit weird and does not take advantage of screen real estate.
Screenshot from prosody "globally reload module" command:
Before:
After:
Screenshot from a slidge command:
Before:
After:
I think the code is OKish except nicoco/gajim@7d7d08ac which implements "trigger next stage by double clicking on a cell" which does not feel right. If the general idea of the MR is accepted, I'd be happy to get some guidance on how to properly "bubble up" the double-click event back to the "ad hoc command step page".
Besides that, I noticed dead code which I removed in nicoco/gajim@5714b477 and a type in a class name fixed in nicoco/gajim@25c97091