Frontend Development Guidelines
This document describes various guidelines to ensure consistency and quality across GitLab's frontend team.
We also utilize webpack to handle the bundling, minification, and compression of our assets.
Working with our frontend assets requires Node (v4.3 or greater) and Yarn (v0.17 or greater). You can find information on how to install these on our installation guide.
For our currently-supported browsers, see our requirements.
When you are assigned an issue please follow the next steps:
Divide a big feature into small Merge Requests
- Big Merge Request are painful to review. In order to make this process easier we must break a big feature into smaller ones and create a Merge Request for each step.
- First step is to create a branch from
master, let's call it
new-feature. This branch will be the recipient of all the smaller Merge Requests. Only this one will be merged to master.
- Don't do any work on this one, let's keep it synced with master.
- Create a new branch from
new-feature, let's call it
new-feature-step-1. We advise you to clearly identify which step the branch represents.
- Do the first part of the modifications in this branch. The target branch of this Merge Request
new-feature-step-1gets merged into
new-featurewe can continue our work. Create a new branch from
new-feature, let's call it
new-feature-step-2and repeat the process done before.
master └─ new-feature ├─ new-feature-step-1 ├─ new-feature-step-2 └─ new-feature-step-3
- Make sure
new-featurebranch is always synced with
master: merge master frequently.
- Do the same for the feature branch you have opened. This can be accomplished by merging
- Avoid rewriting history.
Share your work early
- Before writing code guarantee your vision of the architecture is aligned with GitLab's architecture.
- Add a diagram to the issue and ask a Frontend Architecture about it.
- Don't take more than one week between starting work on a feature and sharing a Merge Request with a reviewer or a maintainer.
- Follow the steps in Vue.js Best Practices
- Follow the style guide.
- Only a handful of people are allowed to merge Vue related features. Reach out to one of Vue experts early in this process.
How we go about making fundamental design decisions in GitLab's frontend team or make changes to our frontend development guidelines.
How we write frontend tests, run the GitLab test suite, and debug test related issues.
Vue specific design patterns and practices.
Our SCSS conventions which are enforced through scss-lint.
Best practices for monitoring and maximizing frontend performance.
Frontend security practices.
Our accessibility standards and resources.
DropLab dropdown library.