topcoder-platform / work-manager

This is the frontend application for creating and managing challenges.
13 stars 47 forks source link

Assignee drop down changes #1415

Closed jmgasper closed 2 years ago

jmgasper commented 2 years ago

Expected behavior

The user should be able to enter a member handle in the assigned member drop down in its entirety. We will make two API calls - one to search for the handle (and populate the dropdown), but a new, additional call to do a member lookup directly using the member API:

https://api.topcoder-dev.com/v5/members?handle=Ghostar

If a direct lookup works, we should use that result and allow the copilot to set the assignee handle.

Basically, we are going to combine the output from:

Actual behavior

Currently, the copilot or PM has to select the handle name from the drop down, even if they put it in correctly. The problem now is that the API doesn't allow for searching by handles that start with a number, like 52code. We have a fix for the API, but deploying it will take a little while, so we're going to change this to allow for direct member entry, as well as searching in the meantime. This way we can just type 52code in the box and it will validate the handle and work.

Screenshot/screencast

SCR-20220909-ffr

52cs commented 2 years ago

We cannot do it this way!

Only when you click the dropdown, you can trigger the onChange callback in react-select.

We can verify 52code, and set it as a one option dropdown.

But the problem is that instead of search 52code return 0 result, it returns 500 results which is too many to make react-select not work...

Fuck those fake account!!!

sdgun commented 2 years ago

Verified in Prod.

image