File templates in the Web IDE
File templates are a really useful feature when creating projects. GitLab provide some vendored templates, and support for instance templates https://gitlab.com/gitlab-org/gitlab-ee/issues/5986 and group templates https://gitlab.com/gitlab-org/gitlab-ee/issues/5987 is coming soon. We should add support for file templates to the Web IDE.
This is also the last feature in the existing edit interface that is not supported in the Web IDE. Without this, we can't consider replacing the existing edit interface with the Web IDE.
Proposal
- Add the ability to create new files from file templates
- Add the ability to overwrite a file with a file template
Designs
Choose a type | Choose a template | Success |
---|---|---|
- The file templates bar automatically appears for files
.gitlab-ci.yml
,.gitignore
,LICENSE
andDockerfile
. - The template type is automatically selected based on the file type.
- When changing the template type, the file name should automatically change to the selected file type.
- The "Undo" button when clicked should disappear along with the success message.
Links / references
- Design artifact: https://gitlab.com/gitlab-org/gitlab-ce/issues/45023
Edited by James Ramsay (ex-GitLab)