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:
- !250507 (79e67d86) - Logic changes in the code used to generate the path helpers
- !250507 (9dad5f68) - Generate the path helpers. This is why the diff is huge, because we git track the path helpers and every single one needs to be updated.
- !250507 (11e0818d) - documentation updates
- !250507 (bf88f931) - use the new
organizationPath: nullin the top bar to show it works - !250507 (ec61ffd1) - fix a few specs
Screenshots or screen recordings
How to set up and validate locally
- Enable
ui_for_organizations,org_stage_experimental, andorg_stage_beta - Create an organization at
/o/new - Click the GitLab logo in the upper left corner
- 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.
