Skip to content

Edit/Delete file: Move commit flow of single file editor into a modal

ℹ️ For latest discussion see: #444302 (comment 2192732639) and !170512 (merged)

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.

🎨 Initial design thinking was done in epic 9933#designs. After discussion and #444302 (comment 2158381424), the designs have been updated below. See current implementation for Edit/Delete file in !170512 (merged). For consistency, these changes will also need to be percolated to other areas where the commit changes modal is surfaced: New file, Upload file, and New directory.

Modal-updated.jpg

Steps

  1. Go to "Code > Repository"
  2. Select a file
  3. 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)

!168992 (merged)

#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

Edited by Alyssa Trinh