Display branch operations in the source control menu
MR: Pending
Problem to solve
The Web IDE doesn't provide actions in the source control panel menu to manage branches. Users can't delete or create branches from a specific base branch.
Solution
Add actions to manage branches in the Web IDE:
- Create branch.
- Create branch from...
- Delete branch.
Acceptance criteria
The branch operations appear in the Source Control -> Branch submenu.
Create branch
-
When the user selects "Create branch" menu option, the Web IDE displays the input box to enter the new branch's name. The input box's title should be "Create a new branch".
-
When the user presses enter, the Web IDE creates and checkout the new branch.
-
The Web IDE displays an information message indicating that the branch was successfully created.
Create branch from...
-
When the user selects "Create branch from..." menu option, the Web IDE displays the picker box to select the base branch. The picker box should not display the "Create new branch" option.
-
When the user selects the base branch, the Web IDE displays the input box to enter the new branch's name
-
When the user presses enter, the Web IDE creates and checkout the new branch.
-
The Web IDE displays an information message indicating that the branch was successfully created.
Delete branch
- When the user selects "Delete branch" menu option, the Web IDE displays the picker box to select the branch they want to delete. The picker box should not display the "Create new branch" option. The picker box should not display the project's default or protected branches either.
- After the user selects the branch the Web IDE notifies the user that the operation is not recoverable and ask the user if they want to continue.
- If the user decides to continue, the Web IDE deletes the selected branch.
- If the selected branch is the current branch, the Web IDE checkouts the project's default branch after deleting the branch.
- The Web IDE displays an information message indicating that the branch was deleted successfully.