Edit/Delete file: Move commit flow of single file editor into a modal
Proposal
Based on non-confidential info from https://gitlab.com/groups/gitlab-org/-/epics/9933+
When deleting a file or updating a file it results in a commit, so we can consolidate the flow into a "Commit changes" modal.
Steps
- Go to "Code > Repository"
- Select a file
- Click "Edit"
Scenarios
The following conditions should be considered (see !170512 (merged)):
- Commit to the current branch and user can push to the branch
- Commit to the current branch and user can NOT push to the branch
- Commit to new branch and open a MR
- Commit to new branch and NOT open a MR
- Edit LFS file
- Edit while collaboration on merge requests across forks
- Editing a file that has been edited by another user as a user with permission
- Editing a file that has been edited by another user as a user without permission
- Edit file from merge request
- Cancel button pops a confirmation modal
- Mobile screen
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 |
#444302 (closed) (this) !170512 (merged) (in review) |
Code > Repository > Select a file > Edit > Edit single file |
| Delete file |
#444302 (closed) (this) #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 |
