Update the "submit a review" workflow to reflect current reviewer's state
Proposal
Update the workflow to "submit a review" by updating the button and interactions.
Changes
- Button label "Your review" changes to conveys what happens when the button is activated:
- When there are no pending comments
Review changes - When pending comments exists, changes to
Finish review
- When there are no pending comments
- Visual changes to reflect reviewer's review state:
- If you are assigned as reviewer:
- No review left -> Blue
- Requested changes -> Red outline
- Approved -> Blue outline
- If you are not assigned as a reviewer:
- Default color (white)
- If you are assigned as reviewer:
- Dropdown button for review state
-
Commented Button does not change to a dropdown
- Same button behaviour as always (Opens sidebar)
-
Requested changes
- Dropdown: 1 option
-
Update reviewopens the review sidebar
-
- Dropdown: 1 option
-
Approved
- Dropdown: 2 options
-
Update reviewopens the review sidebar -
Reset approvalunapproves
-
- Dropdown: 2 options
-
Commented Button does not change to a dropdown
- Add link to feedback issue in the review sidebar
Engineering notes
- We need to fetch the current users reviewer state, we could do this on page load so we don't need a loading state
- However we get this data we need to update in realtime
Design
Edited by 🤖 GitLab Bot 🤖