Add organizationPath argument to JavaScript path helpers

What does this MR do and why?

Frontend equivalent to !249936 (merged). We adjusted the logic around how we determine if the regular path helper or the organization specific path helper should be used. We have JavaScript path helpers that are generated based on Rails routes that we need to add the same logic from !249936 (merged). This MR also adds a new organizationPath argument to all the generated path helpers. This can be used to override the path helpers organizationPath argument when outside of an organization data context. This means we can set organizationPath: null for URLs in the top bar and it will work as follows:

  • When inside of an isolated org you will stay inside of the organization specific URLs (e.g. o/acme/dashboard)
  • When outside of an isolated org the global URLs will be used (/dashboard)

This MR splits the commits up into multiple commits to make it easier to review:

Screenshots or screen recordings

Screenshot_2026-08-17_at_11.09.48_AM

How to set up and validate locally

  1. Enable ui_for_organizations, org_stage_experimental, and org_stage_beta
  2. Create an organization at /o/new
  3. Click the GitLab logo in the upper left corner
  4. You should not be in a scoped organization URL

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Hegman

Merge request reports

Loading
Loading