Skip to content

Create new directory modal: Replace toggle with commit changes UI

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

Proposal

After discussions in #444302 (closed), the piece of UI that allows users to commit to a new/existing branch has been updated for the Edit/Delete file flow in !170512 (merged). This branch selection UI inside modals that allow users to commit changes should also be percolated to: New file, Upload file, and New directory. The design proposal is:

  1. Replace the "Start a new merge request with these changes" toggle with the checkbox UI from the commit changes modal.
  2. Change modal header text "Create New Directory" with "Create new directory" to be consistent with Pajamas guidelines.
Current Proposed
current.png proposed.jpg

Problem

When you go to create a new directory, the option to start a merge request is a toggle. This is inconsistent with the changes made to the edit file blob in !170512 (merged) and #444302 (closed).

Screenshot_2024-11-01_at_4.34.20_PM.png

Steps

  1. Go to "Code > Repository"
  2. Click on the "+"
  3. Click on "New directory"

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
  • 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)

!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) (this, open)

Code > Repository > New directory

Edited by Alyssa Trinh