Skip to content

Snippets with multiple files

I often come across a need for multiple files within a single snippet. A common use case for me is I have a team that shares a package.json along with a gulpfile.js. Both of these files work hand-in-hand with using Gulp.

Obviously, this isn't specific to Gulp in any way, but I wanted to illustrate the need. I'm sure basically every node-based project could benefit. Please assign the feature proposal label.

Design proposal

In preparation of #31128 (closed), these are our designs for snippets with multiple files. These already take over the new snippet design from #32714 (closed) and #31964 (closed).

Prototype

https://sketch.cloud/s/zbdro/a/lPP0lK/play

Snippets page

Empty state List of snippets
image image

New snippet form

Initial state Markdown field expanded Multiple files Limit of 10 files
image image image image

Snippet

image

Edit snippet

image

Embedded snippet with multiple files

If there are multiple files in a snippets, these different files will render right below each other when embedded on another page. There won't be a way to embed a single file from a multi-file snippet.

This 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.

Edited by 🤖 GitLab Bot 🤖