gitlab-org--gitlab-foss/doc/development/fe_guide/index.md
Simon Knox d7c92faacb Cleanup of fe_docs
Start moving back to regular fe_docs
Remove Initiatives, add section to index in fe_guide
Delete some no-longer-relevant parts from principles
Update title - Progressive Enchancement is a browser-support term
and could be confused
"When to use" parts are discussed elswhere
Vue & jQuery issue is no longer relevant
Delete duplicate Security docs
Remove empty files, move event_tracking
Shuffle index sections around
Remove sections on Vue & Webpack (we say same thing in prev paragraph)
Remove link to Droplab docs
2019-03-22 09:24:10 +11:00

3.4 KiB

Frontend Development Guidelines

This document describes various guidelines to ensure consistency and quality across GitLab's frontend team.

Overview

GitLab is built on top of Ruby on Rails using Haml and also a JavaScript based Frontend with Vue.js. Be wary of the limitations that come with using Hamlit. We also use SCSS and plain JavaScript with modern ECMAScript standards supported through Babel and ES module support through webpack.

Working with our frontend assets requires Node (v8.10.0 or greater) and Yarn (v1.10.0 or greater). You can find information on how to install these on our installation guide.

Browser Support

For our currently-supported browsers, see our requirements.


Initiatives

Current high-level frontend goals are listed on Frontend Epics.

Principles

High-level guidelines for contributing to GitLab.

Development Process

How we plan and execute the work on the frontend.

Architecture

How we go about making fundamental design decisions in GitLab's frontend team or make changes to our frontend development guidelines.

Testing

How we write frontend tests, run the GitLab test suite, and debug test related issues.

Design Patterns

Common JavaScript design patterns in GitLab's codebase.

Vue.js Best Practices

Vue specific design patterns and practices.

Vuex

Vuex specific design patterns and practices.

Axios

Axios specific practices and gotchas.

GraphQL

How to use GraphQL

Icons and Illustrations

How we use SVG for our Icons and Illustrations.

Components

How we use UI components.

Event Tracking

How we use Snowplow to track custom events.


Style Guides

JavaScript Style Guide

We use eslint to enforce our JavaScript style guides. Our guide is based on the excellent Airbnb style guide with a few small changes.

SCSS Style Guide

Our SCSS conventions which are enforced through scss-lint.


Performance

Best practices for monitoring and maximizing frontend performance.


Security

Frontend security practices.


Accessibility

Our accessibility standards and resources.

Internationalization (i18n) and Translations

Frontend internationalization support is described in this document. The externalization part of the guide explains the helpers/methods available.