Skip to content

Rewrite modal copy when editing files from a commit

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Description

Currently, when users attempt to edit a file from a specific commit revision, they are shown a misleading modal suggesting they fork the project, which doesn't address the actual limitation.

Example: https://gitlab.com/gitlab-org/gitlab/blob/609eb5fb66dca10cb0874564e80ae0a9d2e9d144/app/assets/javascripts/repository/utils/fork_suggestion_utils.js#L21-48

May_7_Screenshot_from_Slack

Problem

  • The forking modal copy doesn't accurately reflect the scenario of editing a file from a commit revision
  • The message doesn't mention that WebIDE supports this workflow, missing an opportunity to guide users to the supported path
  • Users can edit a file starting from a commit using the WebIDE, but not from Edit single file, which creates a dissonance in what is supported

Solution

See #540848 (comment 2550994568).

For users who want to create a revision starting from a commit, we will allow users to edit the file from their editing method of choice. Currently, we allow users to edit a file from a commit revision using WebIDE, but not Edit single file. The recommendation is to enable this for both WebIDE and Edit single file. Users will be prompted to create a new branch when they commit changes.

Design recommendation

  • Add the ability to Edit single file
  • Add a modal for Edit > WebIDE to set appropriate user expectations
  • Add a modal for Edit > Edit single file to set appropriate user expectations
1.Select edit option 2.Modal opens 3.User can edit
WebIDE

webide 1 - select.jpg

webide 2 - modal.jpg

Edit file

You're viewing this file at a specific revision. A new branch is required to make changes.

[Cancel] [Open in Web IDE]

webide 3 - edit.jpg

Users are prompted to create a new branch in order to commit changes

Edit single file

editsinglefile 1 - select.jpg

editsinglefile 2 - modal.jpg

Edit file

You're viewing this file at a specific revision. A new branch is required to make changes.

[Cancel] [Edit file]

editsinglefile 3 - edit.jpg

Users must create a new branch in order to commit changes

Edited by 🤖 GitLab Bot 🤖