Skip to content

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:

  1. Eliminate some cognitive load
  2. Increases the speed at which users can complete the task
  3. 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
Screenshot 2024-11-08 at 12.58.30 PM.png Screenshot 2024-11-08 at 12.59.08 PM.png

Steps

  1. Go to "Code > Repository"
  2. Make sure you are on a branch that you do not have permission to commit to (i.e. "master")
  3. Select a file and go to file blob page
  4. 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

#444302 (closed)

!170512 (merged) (in review)

Code > Repository > Select a file > Edit > Edit single file

Delete file

#444302 (closed)

!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