Skip to content

feat: add local git context item category

Description

Integrates UI changes from gitlab-ui!4615 (merged) to support a local git context provider.

This allows selecting a git diff, such as Local working changes, or a specific revision. Once selected, the diff is included as context. This is very useful for quickly applying a full set of changes as context.

This MR also introduces the flow for loading the content of a contextItem into the UI, to be displayed within the webview.

@gitlab/ui package has been updated to v95.2.0 for Vue2 webviews as part of this work. package already updated to later version in main

Note: this MR won't actually make the local_git context category available until this language server MR is released: gitlab-org/editor-extensions/gitlab-lsp!877 (merged) but can be preemptively merged without issue.

Related Issues

Resolves #1583 (closed)

How has this been tested?

Tested via integrating this language server MR: gitlab-org/editor-extensions/gitlab-lsp!877 (merged)

Screenshots (if appropriate)

img notes
local_git_demo new local diff category
item-details-modal Viewing context item details within webview
item-details-loading-state-themes item details loading state + theme integration
image Without the language server changes deployed yet (local_git category hidden, no problems running this revision independently)

What CHANGELOG entry will this MR create?

  • fix: Bug fix fixes - a user-facing issue in production - included in changelog
  • feature: New feature - a user-facing change which adds functionality - included in changelog
  • BREAKING CHANGE: (fix or feature that would cause existing functionality to change) - should bump major version, mentioned in the changelog
  • None - other non-user-facing changes
Edited by Elwyn Benson

Merge request reports

Loading