Make Merge Request button states consistent with other buttons in GitLab
Problem to solve
Success state- When a user clicks to create a merge request it takes a few seconds to respond. After a user clicks, the button looks (or is) disabled while the request goes through.
Failure state- This looks identical to the success state, and the button remains disabled. Ignoring the placement of the banner alert which we are already addressing, keeping the button disabled puts the user in a bad state. I would assume they either sit there thinking the request is just taking a long time (because this is the pattern for the success state) or scroll around the page until they ultimately reload.
Proposal
I propose we make this button's states consistent with other buttons in GitLab which currently seems to be button inverted- button filled on hover- button active on click- button filled after click ie:
If the merge request fails to create it will go back to button inverse and trigger the error state (which is currently the static banner that is being ideated on) and allow the user to click and try again (or perhaps refresh for them?). This is not perfect, but hopefully will reduce anxiety and give more feedback to our users. Is there a reason we don't already do this and some historical knowledge I am missing here?
What does success look like, and how can we measure that?
The button state is consistent with others while better showing users the status of their request.
Future State
This is a small piece of the puzzle. In the future, some things to think about would be how might we better show users the status of their request, especially on requests that take some time? It could be contextual error states, a better alerting/error system, or even some kind of indicator on the button to show success and failure. Just for fun:



