Clarify what the gl and gon global objects are in the frontend docs

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

  • Close this issue

Description

While reading the Vue documentation in our FE development guide, I was confused about accessing the gl object, especially because the example below it passes in a property from the gon object instead.

Until you dig into the usage of these two objects you start to understand that gl objects are where you can access cross-component stores/services and gon containing more contextual properties such as current user information.

It may prove useful to clarify these in our Architecture or Best Practices areas.

Proposal

Add documentation to the FE guide explaining what the gl and gon objects are, to better understand why we would need to do something like accessing them at the same time we query the DOM and instantiate Vue components.

Links / references

https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/fe_guide/vue.md#L111-129

Edited Sep 28, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading