feat: project-centric extension internal model
This MR finishes #558 (closed), it removes WrappedRepository
in favour of the new ProjectInRepository
. The extension has been almost completely migrated to the new model in previous MR's but this MR replaces the extension core.
User facing changes
- There is no
gitlab.instanceUrl
setting anymore. Either we'll match the git "remote URL host" with "token GitLab instance URL host" (99% cases) or the user has to create the link manually (visible in the multiple-projects-after screencast). - The preferred remote is no longer stored in settings.json. Instead, we store it in local storage. This is fixing a bug #546 (closed)
- Context menu on repositories where automatic project detection couldn't find unambiguous GitLab project
-
Select GitLab project
context action if we detected multiple projects. In the screencast, this happens because the extension has two remotes:git@gitlab.com:gitlab-org/gitlab-vscode-extension
andgit@gitlab.com:gitlab-org/security/gitlab-vscode-extension
- before, user had to click on the repository item and select a remote, but they didn't know if the remote contains a GitLab project, now we only offer detected projects -
Manually assign GitLab project
context action on repositories where we didn't detect any GitLab projects. This can happen in edge cases where users use local folders as remote URLs (#418 (closed)) or when they use SSH aliases defined in~/.ssh/config
(#537 (closed)) this issue couldn't be previously resolved by the user -
Clear selected project
- this removes the previous selection
-
- The project parent item is visible even if there's only one project (you can see in
single-project-before
we hide the project parent item once the user selects the remote) - I chose to do this so the user can use theClear selected project
context menu. In future iterations, we can come up with a different UX treatment.
before | after | |
---|---|---|
single project | single-project-before | single-project-after |
multiple projects | multiple-projects-before | multiple-projects-after |
Related to #558 (closed)
Edited by Tomas Vik