Add additional fields and optional slot to commit changes modal
What does this MR do and why?
We've a list of UIs (edit file, new file, upload/replace file, new directory) that are going to be migrated into commit change modal. This MR preps the modal for these flows by adding
- UI when users do not have permission to push code in the repo
- an optional slot for file dropzone in upload file and directory input in new directory on top of modal body
- an optional slot for hidden input fields within the form element
This MR also refactors to pass down a handleFormSubmit
function vs. individual props (method
, actionPath
) within it.
Note, this MR does add an additional message, when user deletes a file in a repo they cannot push to (see detailed steps below). But I believe this is a small win for UX: 1) the message provides very helpful context to the user on what's happening 2) will give a more consistent experience with the rest of the flows, once we finish the UI migration work
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
Currently this component is only being used in delete blob flow, which was updated in !168992 (merged) recently.
This changes is the prep work for the following issues:
- edit file #444302 (closed)
- new file #502460 (closed)
- upload/replace file #479249 (closed)
- new directory #502483 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
Screen_Recording_2024-11-22_at_7.37.52_PM | Screen Recording 2024-11-27 at 5.40.16 PM.mov |
How to set up and validate locally
- In a project, log in as user who does not have permission to push (e.g. guest user)
- Open a file
- Select Delete
- User will be prompt to create a fork
- Complete the flow
- Select Delete in the original repo
Related to #479249 (closed)