Skip to content

Update edit blob to use commit change modal

What does this MR do and why?

Update to use commit modal in edit blob flow. Note, the first attempt of this feature was reverted and included as first commit in this MR. Since then the notable changes are:

  • Instead of leveraging hidden input fields, pass down a custom form submit handler
  • In the handler, append data that's unique to edit blob flow
  • Wrap the data with Object.entries to maintain line ending in the file content
  • Add tests

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.

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.

See cases in !170512 (merged)

To make sure line ending is not mutated, I've tested on our supported browsers:

browser
chrome Screen_Recording_2024-12-05_at_2.56.32_PM
firefox Screen_Recording_2024-12-05_at_3.00.19_PM
safari Screen_Recording_2024-12-05_at_2.59.02_PM

How to set up and validate locally

  1. Open a file in repo
  2. Select "Edit" > "Edit Single File"
  3. Select "Commit changes"

Related to #444302 (closed)

Edited by Chaoyue Zhao

Merge request reports

Loading