Update GLQL presenter to support Projects
## Summary The GLQL library now supports querying Projects as a source type (added in [gitlab-org/glql!337](https://gitlab.com/gitlab-org/glql/-/merge_requests/337)). The GitLab frontend GLQL presenter needs to be updated to render Project objects correctly. This can be done as part of a GLQL version bump as a follow-up once the Project source type has been released in the next GLQL version. ## Implementation 1. **Update `field.vue` presenter mapping** In `app/assets/javascripts/glql/components/presenters/field.vue`, add `Project: LinkPresenter` to `presentersByObjectType`: ```javascript const presentersByObjectType = { MergeRequest: IssuablePresenter, Issue: IssuablePresenter, Epic: IssuablePresenter, WorkItem: IssuablePresenter, Project: LinkPresenter, // <-- ADD Milestone: MilestonePresenter, // ...rest unchanged }; ``` 2. **Update `link.vue` to support Project fields** In `app/assets/javascripts/glql/components/presenters/link.vue`, add `name` as a fallback: ```javascript // validator — add name: validator: ({ webUrl, webPath, title, username, fullName, nameWithNamespace, name }) => Boolean(webUrl || webPath) && Boolean(title || username || fullName || nameWithNamespace || name), // computed title — add name fallback: title() { return ( this.data.title || this.data.username || this.data.fullName || this.data.nameWithNamespace || this.data.name ); }, ``` 3. **Update specs (if applicable)** Review and update any existing specs for the GLQL presenters to cover the new Project type. ## Verification After implementation, verify that GLQL blocks with Project queries render correctly: ```glql query: type = Project and namespace = "gitlab-org" fields: name, description, fullPath, visibility display: table ``` Projects should render as clickable links using `nameWithNamespace` or `name` as the link text.
issue