Delete blob commit changes modal: Pre-populate target branch name when user does not have permission to commit to current branch
Updates to the Edit/Delete file commit changes modal were made due to #444302 (closed) and !168992 (merged). A comment raised in !170512 (comment 2195721782) pointed out that in cases where users do not have permission to commit to the current branch, we should pre-populate the target branch name in the "Commit to a new branch" field to:
- Eliminate some cognitive load
- Increases the speed at which users can complete the task
- Allows the submit button to be enabled by default (in line with Pajamas Design System)
The change to pre-populate the branch name is being made in the Edit file commit changes modal in !170512 (merged). These changes need to also be percolated to the Delete file commit changes modal.
| Current | Proposed |
|---|---|
|
|
Steps
- Go to "Code > Repository"
- Make sure you are on a branch that you do not have permission to commit to (i.e. "master")
- Select a file and go to file blob page
- Click "Delete"
Related UI
These are areas of the UI that should all be using the same commit changes modal UI:
| UI element | Issues/MRs | Reproduction steps |
|---|---|---|
| Edit file |
!170512 (merged) (in review) |
Code > Repository > Select a file > Edit > Edit single file |
| Delete file |
#503405 (closed) (open) |
Code > Repository > Select a file > Delete |
| New file |
#502460 (closed) (open) |
Code > Repository > New file |
| Upload file |
#479249 (closed) (open) |
Code > Repository > Upload file |
| New directory |
#502483 (closed) (open) |
Code > Repository > New directory |

