[go: up one dir, main page]

Skip to content

Change Open MR In Web IDE route to use query params

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

Context

@himkp commented

I wonder if we can think about passing the file path in the URL itself so that when clicking “Edit in Web IDE” from the MR diff, we actually open and focus on the file there as well.

You had suggested on Slack that our /merge_requests/:id route really should be a query parameter: .../-/path/to/file.md?from_mr=123&source_project=. I searched for issues and there isn't any for allowing "Edit in Web IDE" button to open the actual file in the IDE. Do you mind opening a follow up issue for this? Thanks!

This also causes issues when trying to open the Web IDE on a specific file from a MR.

Investigation notes

One approach, and possible the easiest implementation, would be to simply update openMergeRequest to accept a filePath parameter. This way we wouldn't have to touch openBranch at all.

Questions:

  • What about preexisting references to the old merge request route? Are we wanting to support those and redirect?
Edited by 🤖 GitLab Bot 🤖