Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

Can't submit ranking on website until order changed

Open othrayte opened this issue 2 years ago • 7 comments

When ranking replies or prompts on the website the submit button is disabled until at least one reply or prompt has been moved. This means that in order to submit the order unchanged the user needs to move something and then move it back. I think the submit button should always be enabled so long as there is an active task.

Note: this actually made it slightly harder in writing the e2e tests as originally I had planned to just leave them in the initial ranking ans submit but in the end I had to find a way to have the test change the rank. It might also mean that there are additional undue ways that test can fail.

othrayte avatar Jan 02 '23 11:01 othrayte

I think it's good that we prevent the user from just clicking "submit" right away. Maybe we could do this: if the user clicks submit without touching anything, make a small popup that essentially says "you haven't touched anything, are you sure this is the correct order?" that needs to be confirmed.

yk avatar Jan 02 '23 12:01 yk

That's a good point, it's quite probable that new users would do it accidentally, no matter how good our instructions get.

othrayte avatar Jan 02 '23 12:01 othrayte

I like Yannic's proposal.

fozziethebeat avatar Jan 02 '23 23:01 fozziethebeat

Hey, I'm giving this a shot. Any feedback would be appreciated.

When try to submit without changing anything the following happens:

  1. Alert popup (modal is probably more appropriate if we go this route) Screenshot 2023-01-03 at 20 56 50

  2. Ranking is prepared and button changes Screenshot 2023-01-03 at 20 56 57

I could remove the popup and just change the button as well if that's preferred.

stephancill avatar Jan 03 '23 19:01 stephancill

@stephancill looks neat! I think the common approach is to do popups not via alert, but via custom components. I'm sure chakra-ui (which we use) has something prepared, could you give that a try? could you do a PR with your proposed changes?

yk avatar Jan 03 '23 22:01 yk

For my 2 cents, I think having a popup of some kind is clearer than just changing the button text as that might get missed. On the other hand, I think the ideal would be for the popup to include the options to edit or submit anyway. That said take that with a grain of salt as I'm not all that familiar with what our chosen UI framework has in terms of pop-overs that we can use or how much work that would be to use an integrated popup.

othrayte avatar Jan 03 '23 22:01 othrayte

Can we close this issue?

stephancill avatar Jan 07 '23 11:01 stephancill