fix(webview): highlighting labels (including scoped)
This MR is finishing refactoring from !150 (merged). It also prepares the ground for #257 (closed).
The only observable change of this MR is rendering of the labels as shown in the following table:
scenario | before | after |
---|---|---|
GitLab Bot | ![]() |
![]() |
Normal label | ![]() |
![]() |
Scoped label | ![]() |
![]() |
All labels now show the description on hover:
How to review
This MR contains only three types of changes and even though it changes +289 -100 lines, it can be reviewed quite easily if you keep the types of changes in mind:
- All discussion and label events fetching has been moved from
gitlab_service.ts
togitlab_new_service.ts
(finishing after !150 (merged)) (this logic is poorly tested by one integration test, there are no new tests for this logic added in this MR🙁 ) - This MR simplifies how to create
GitLabNewService
(which causes small change to many files) - And the main change is changing and testing
LabelNote.vue
component to render the (scoped) labels. It removes calls toNoteBody
component which was making API calls to render Markdown (explained in !150 (merged)). Here I would especially appreciate any suggestions for the CSS.
Labels now don't open web search
With this change, none of the labels links to the web search. Previously some labels (I think non-scoped one-word labels) could be clicked and VS Code would open a web search with the given label. E.g. https://gitlab.com/gitlab-org/gitlab-vscode-extension/-/issues?label_name=feature. This won't be possible after the change. However, it would be easy (frontend-weight1) to implement.
before | after |
---|---|
![]() |
![]() |
Related to #253 (closed)