Skip to content

Use relative _path helper URLs in the GitLab UI

Eric Eastwood requested to merge 40825-use-relative-path-urls into master

What does this MR do?

EE MR, https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3676

Use _path helpers instead of _url for things that are used within the GitLab UI.

The list of fixed things here is extensive but not absolutely exhaustive. I searched through *.haml|*.rb for _url and manually found spots.

  • Job link, <namespace>/<project>/-/jobs
  • <link rel="alternate" type="application/atom+xml" in the <head>
  • /projects/new, switch to "Import project" tab and look at gitea button
  • Outdated browser flash/banner/alert, replace the if condition with true to see it
  • Endpoint used in boards which flows to the FE, assign_endpoint_vars -> <namespace>/<project>/boards
  • Endpoints used on Job page, javascript_build_options -> <namespace>/<project>/-/jobs
  • Endpoints used in the top nav search to construct URLs to redirect to on the FE, app/views/layouts/_search.html.haml
  • Avatar URL used in Issue comment form <namespace>/<project>/issues/<iid>

Other potential spots to fix

Potential tech debt discovered while browsing

Should I create a follow-up issue for these? Update: issue created, https://gitlab.com/gitlab-org/gitlab-ce/issues/40859

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes #40825 (closed)

Edited by Eric Eastwood

Merge request reports

Loading