Skip to content

Snippets: add a loading indicator and cancellation

As part of gitlab!169195 (merged), I have UX questions about working with snippets in the VS Code extension.

  • @aqualls started a discussion:

    question: hello technical reviewer, I had a problem here! When I ran the command [to apply a snippet], I really really shouldn't have picked the gitlab project to browse for snippets. The selection option disappeared, and I couldn't figure out why. There was no indication it was doing anything behind the scenes. I tried running GitLab: Insert Snippet again, and couldn't get the project dropdown to appear again. A couple of minutes later, a snippet list appeared.

    • I checked the snippet list for the gitlab project (https://gitlab.com/gitlab-org/gitlab/-/snippets) and it has 419 snippets. Should there be some kind of loading spinner / indicator?
    • Is there some way to cancel the action if it takes too long?
    • Can a user change the project after it's selected?
  • @viktomas responded:

    @aqualls What are you doing to the extension Amy 😸 trying to load a snippet from the main GitLab project... (joke)

    • Should there be some kind of loading spinner / indicator?

    Well, we haven't implemented any but it sounds like there should 🙇

    • Is there some way to cancel the action if it takes too long?

    No, unfortunately, no. But there also should be.

    • Can a user change the project after it's selected?

    Is the project selector available only when multiple projects are in the same workspace? I think you should be able to press ESC and then start the command again. But if you have only one project, I believe the command uses that project and doesn't ask you.

Edited by Amy Qualls