unitaryfund/metriq-api

Creating a blank new method hangs popup UI

Closed this issue · 2 comments

Repro: Go to a submitted benchmark and try clicking on the edit button for the method section.
I then tried to define a new method, but left it blank and hit create:
image

The first time I did this, I got this warning:
image

Subsequent attempts to do the same resulted in the UI for that popup freezing and all I can do is cancel. Makes sense, but maybe some sort of message like "please add content b4 submitting, plz thnx"

The popup alert is due to API call error response, because required fields aren't there in the POST body. We should validate for mandatory fields and completely disable the submit button until they're entered, with our usual reusable field validation indicators.

@crazy4pi314 We have a PR up to address this, and it's on the QA server already, so you can test it. Per our workflow, we close this issue at this point, but please reopen it, if you don't think the modification on QA to address this issue is satisfactory.