The following page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features or functionality remain at the sole discretion of GitLab Inc.
|Content Last Reviewed||
Thanks for visiting this direction page on Snippets in GitLab. This page belongs to the Editor group of the Create stage and is maintained by Eric Schurter (E-Mail). More information about the Editor group's priorities and direction can be found on the Editor group direction page.
This direction is a work in progress, and everyone can contribute:
GitLab Snippets allows users to share small bits of code and text by directly linking, downloading, or embedding them in web apps within a
<script> HTML tag. Each snippet is essentially a lightweight Git repository, meaning they are versioned and even support multiple files.
Commonly Snippets are often used for smaller pieces of code that are reused among several projects, additional documentation for specific one-off scripts/functions and instructions for using the main project.
Next, we'll be working on improving collaboration with multiple users, sharing snippets in and out of GitLab, and adding the ability to execute snippets in a sandboxed environment.
Snippets are primarily targeted at engineering personas who are looking for ways to quickly share bits of code and information with other users. GitLab personas that represent this are:
Currently, users of snippets have strong mental models of expected functionality based on existing competitors in the market. As new features are added to GitLab snippets to further running code or creating simple prototypes it will be important to gain feature parity and then build on top of that to increase adoption of the product.
We want GitLab to be the first choice for developers looking to share or demo small samples and prototypes with other users either within their team on GitLab or externally via links and embeds. Now that we have added the ability to version control snippets and support multiple files, we will be researching and validating opportunities to extend the base functionality.
We also want snippets to follow standard embed capabilities so they can be used outside of GitLab easily. These enhancements will help to further make snippets a valuable tool for sharing knowledge across the ecosystem.
The Editor group is not actively prioritizing new features for Snippets at this time, in favor of furthering the direction of the Web IDE, Wiki, and Content Editor. However, when we do return to working on Snippets, we will focus on:
Snippet Visiblity and Permissions - Collaboration in Snippets are limited by the current permission models. We want to further collaboration and will start with aligning project based snippet permissions with projects.
Organizing Snippets - There is currently no way to organize Snippets for easier access, nor is there a way to search within the contents of a Snippet. The ability to categorize, label, or otherwise add some hierarchy to Snippets will enable management of more robust Snippet libraries.
Currently, GitLab's maturity in Snippets is complete. Here's why:
A complete snippets category would allow users to utilize snippets in way that aligns with other
git functionality. Snippets can have multiple files that are easily versioned and shared with other users. GitLab has solved for
movingtogitlab and supports the needs of those users looking for alternatives.
Lovable snippets build upon
git support and expand the collaboration of Snippets inside of projects and groups. Project members can collaborate on the same snippet and groups can use and share those snippets across projects. Snippets will be the common way to communicate code across issue comments and wiki's within GitLab and outside of GitLab in other documentation.
The success of Snippets can be measured in both the inception and consumption of the code. The creation of a snippet indicates that someone has identified reusable code and taken the extra step to make it more easily accessible. After the snippet is created, however, the success of the feature can be measured by how often (if at all) the code is shared, updated, referenced or, ultimately reused.
Snippets capabilities are currently most close to Pastebin.
A range of clever tools have since been built on top of Gists including:
Atlassian has Bitbucket Snippets which is very similar to Gists.
Other business built completely on Snippets are:
If Snippets were combined with the Web IDE with client-side and server-side evaluation it would also compete with:
Snippets and pastebins are not currently an area of analyst interest.
We are going to use the dogfood everything approach to increase the usage of Snippets internally.