ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
13.86k stars 3.4k forks source link

Add reorder and sort by functionality for survey options #14090

Open trevorl-dtl opened 1 year ago

trevorl-dtl commented 1 year ago

Please confirm the following

Feature type

Enhancement to Existing Feature

Feature Summary

Allow survey options to be sorted by alphabetical order, lowest to highest, etc.

Alternatively, allowing reordering or creating new entries anywhere within the list would be helpful as well.

Select the relevant components

Steps to reproduce

For example, you have a list of apt packages like so: image

Current results

You can't reorder the lib apt packages to be together (for easier viewing) or sort them alphabetically especially when the list of options is really long.

Sugested feature result

Similar to how you can reorder survey questions, you can also reorder survey options.

Additional information

No response

MrGitBlob commented 1 year ago

Can someone please address this issue. The current UI for specifying the items in a multiple choice list is an absolute disgrace.

I have an AWX instance from 3 years ago, in which the list is specified just as a text box you can edit/copy/paste multiple lines, insert a line between existing lines and so on. So that made it very easy to add a new item in-between other items, even in a long list.

The current UI, is an embarassingly amateurish and functionally appalling attempt to make the UI "fancy", which completely ruins the functionality.

If I have a list of 20 items in the multiple choice list, and I want to insert a new item near the top... can I just insert an item? No. The only way to insert is to add an empty row (n+1) at the bottom, and then copy and paste row n to row n+1, then copy row n-1 to the now empty row n, and on an on and on. This isn obviously completely unacceptable UI design. Just absolutely utterly unacceptable, and a completely unnecessary regression, considering that all these problems are avoided simply by having a multiline text box, like the AWX of 3 years ago.

The OP here has also requested the ability to sort the multiple choice list. This also was achievable in the old UI. If you had a list of 20 or 20 items you could sort them as lines in a text file, using simple unix "sort" or whatever, and then just past the sorted list into the text box. But now, with the current UI that keeps the items as separate entries, you cannot do anything like this.

Finally, there is another issue with the multiple choice list. It does not even preserve the order of the list when items are selected and deselected and so on. If i have a list of items "1,2,3,4", and i have "1,3,4" selected by default, and then I select 2, what do i get? Do i get the list "1,2,3,4"? In the OLD AWX from 3 years ago, yes, you get "1,2,3,4", and that is far more likely to be what people want. In the current AWX, the result will be "1,3,4,2". And if i then de-select 3, and then select it again, i have "1,4,2,3". Sure, it is possible that behaviour is what someone might want, but it is absolutely absurd to force that behaviour onto everyone and not provide the ability to maintain the order specified when the list was created in the job template.

Whoever creates these multiple choice lists in the job template has put the items in a certain order, and you must consider the possibility that they put them in that order for a reason, and give them the ability for that order to be maintained when the job survey is launched and the user selects and deselects some items. Not to allow for this, is the equivalent of just throwing your hands up in the air and saying i'm designing a UI but i do not care in the slightest whether it is actuallly usable.

For Christ's sake, when you make changes to a UI, have some consideration as to how the UI is actually going to be used.

Please do not ignore this ticket.

If the ordering and other behaviour of these multiple choice lists is not improved and these problems resolved, then these multiple choice lists will remain incredibly annoying, unwieldy, and utterly useless for many purposes.

And that is not good enough, when 3 years ago all these problems were avoided by actually having a simpler and more flexible solution, ie a simple multiline text box. So. Easy.

vassil-velichkov commented 6 months ago

The old new-line delimited list would have been just fine - configuring surveys is less-frequent job and one does not need "fancy UI", while selecting the right option from a multiple-choice list is much more frequent task, and the "designed" order saves time and errors (the order of items is not necessarily A-Z, that's why I use "logical" instead, depending on the context)