Snippets with Multiple Files
## Problem to Solve
Snippets aren't able to be used for sharing anything more than a single file or piece of content. This is due to limitations that prevent the use of multiple files when creating a Snippet. This forces users to use other tools, markdown with odd constructs to simulate many files or share items across multiple individual snippets.
## Progress
**2020-08-12:** During the %"13.4" development cycle (Aug. 18 - Sept. 17) we should be able to toggle the feature flag on for GitLab.com for testing and evaluation.
## Vision
We want Snippets to be the first choice for engineers who need to share code and other scripts that don't fit in a project with others.
## Additional Details
With the completion of https://gitlab.com/groups/gitlab-org/-/epics/239, Snippets are now git based. This was a first step to move towards enabling Snippets to support multiple files.
## Proposal
Snippets should allow users to create multiple files to support the content they are sharing.
Initially multiple file support will be limited to 10 files per Snippet.
### Designs
In preparation of https://gitlab.com/gitlab-org/gitlab/issues/31128, these are our designs for snippets with multiple files. These already take over the new snippet design from https://gitlab.com/gitlab-org/gitlab/issues/32714 and https://gitlab.com/gitlab-org/gitlab/issues/31964.
### Prototype
https://sketch.cloud/s/zbdro/a/lPP0lK/play
### Snippets page
| Empty state | List of snippets |
| ------ | ------ |
|  |  |
### New snippet form
| Initial state | Markdown field expanded | Multiple files | Limit of 10 files |
| ------ | ------ | ------ | ------ |
|  |  |  |  |
### Snippet

### Edit snippet

### 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.
### Availability and Testing
As most of the initial development is done in backend behind a feature flag, it will be sufficient to initially just have lower level test coverage (unit/component). Once the changes are made to frontend we might need to modify/write new feature specs with the feature flag stubbed. NB https://gitlab.com/gitlab-org/gitlab/-/issues/214761.
A new issue will be created for snippet E2Es to be modified to include coverage for multiple files. It will be linked to this Epic and implemented at the final stages of development.
IMPORTANT: Before `:snippet_multiple_files` feature flag is enabled by default (on any environment), please run full `package-and-qa` job and include a SET to review selectors/page object changes.
epic