Commit Graph

295 Commits

Author SHA1 Message Date
Robert Speicher 4ecb959492 Merge branch 'add-stackprof' into 'master'
Add StackProf to the Gemfile, along with a utility to get a profile for a spec

The test suite needs speeding up significantly. This is one tool for investigating it.

Related to #23034

See merge request !7784
2016-11-30 05:29:29 +00:00
Nick Thomas 5e05f9c5c2 Add StackProf to the Gemfile, along with a utility to get a profile for a spec 2016-11-29 14:14:34 +00:00
Robert Speicher 25c1256736 Merge branch 'refactor-issuable-description-and-metadata' into 'master'
Refactor issuable description and metadata form sections

Continuation of https://gitlab.com/gitlab-org/gitlab-ce/issues/23864.

Brother of gitlab-org/gitlab-ee!916.

See merge request !7758
2016-11-29 04:57:09 +00:00
Achilleas Pipinellis 297c868398 Add guidelines in doc linking with HAML
[ci skip]
2016-11-28 18:27:29 +01:00
awhildy 5a5e03b5aa [ci skip] UX Guide: Anchor hover guidance include color change
Primary and secondary links should be dark blue on hover

Update anchor image to dark blue for secondary

Clean up markdown

Fix anchorlinks image
2016-11-26 21:38:50 -08:00
awhildy a1f53e92ca [ci skip] UX Guide: add guidance for max height for dropdowns
Fix spelling
2016-11-25 20:30:13 -08:00
Rémy Coutable 2ec4d167b6
Refactor issuable description and metadata form sections
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-25 17:40:36 +01:00
Rémy Coutable 39378d0e97 Document that we always use `do...end` for `before` in RSpec
[ci skip]

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-24 17:36:09 +08:00
Achilleas Pipinellis af1dabe805 Reduce size of images from 25MB to 13MB using pngquant
Took it from https://gitlab.com/gitlab-com/www-gitlab-com/merge_requests/3232

[ci skip]
2016-11-22 19:53:43 +01:00
Achilleas Pipinellis d6603493ea Merge branch 'ux-guide-update-mr-copy' into 'master'
Add Approve and Remove approval to UX Guide terminology table

Updating UX Guide page on terminology to include guidance on 'Approve' and 'Remove approval'.

See merge request !7632
2016-11-22 11:16:11 +00:00
Achilleas Pipinellis acaa6d733b Merge branch 'object-state-models-docs' into 'master'
Object state models docs

Object state models docs for issues and merge requests.

This is to start documenting object models, focused more on users and how they experience the product.

See merge request !7544
2016-11-22 10:33:47 +00:00
awhildy 4a411f2711 [ci skip] Add Approve and Remove Approval to UX Guide terminology table 2016-11-21 12:44:37 -08:00
Victor Wu e887e96893 Remove contents section since it's not necessary [ci skip] 2016-11-20 15:44:21 +00:00
Victor Wu 88cc283fd7 Remove hyphen [ci skip] 2016-11-18 21:04:21 +00:00
Victor Wu bef75852a0 Remove hyphen [ci skip] 2016-11-18 21:03:49 +00:00
Victor Wu 709e590d3b Add spaces to conform to style guide [ci skip] 2016-11-18 17:59:43 +00:00
Lin Jen-Shin 9c4e0d6445 Use `Gitlab.config.gitlab.host` over `'localhost'`
This would fix long standing failures running tests on
my development machine, which set `Gitlab.config.gitlab.host`
to another host because it's not my local computer. Now I
finally cannot withstand it and decided to fix them once and
for all.
2016-11-18 20:17:10 +08:00
Victor Wu 6314a51dce Update object_state_models.md [ci skip] 2016-11-17 22:54:29 +00:00
Victor Wu 32fc9d39db Delete .gitkeep [ci skip] 2016-11-17 22:36:42 +00:00
Victor Wu d5d80cae2c Upload new file [ci skip] 2016-11-17 22:36:20 +00:00
Victor Wu b14d840b92 Upload new file [ci skip] 2016-11-17 22:35:50 +00:00
Victor Wu 2eb42d7acb Upload new file [ci skip] 2016-11-17 22:35:18 +00:00
Victor Wu 1fb1d5dfa6 Add new directory [ci skip] 2016-11-17 22:32:29 +00:00
Victor Wu 4c519730a2 Add file [ci skip] 2016-11-17 22:30:42 +00:00
Victor Wu a2c397a7a1 Link to object state models [ci skip] 2016-11-17 22:28:44 +00:00
Victor Wu cfabd5b5a9 Update copy.md with issue guideline updates and merge request guidelines
Update examples and labels to use sentence case.

Update copy.md  [ci skip]

Update copy.md [ci skip]

Update copy.md
2016-11-17 13:47:02 -08:00
Jacob Schatz da57eb39cd Merge branch 'google-singletons-are' into 'master'
Decide on and document a convention for singletons

> The singleton pattern is a design pattern that restricts the instantiation of a class to one object. This is useful when exactly one object is needed to coordinate actions across the system. 

The simplest implementation uses an object literal to contain the logic.

```javascript
gl.MyThing = {
  prop1: 'hello',
  method1: () => {}
};
```
A live example of this is [GfmAutoComplete](172aab108b/app/assets/javascripts/gfm_auto_complete.js.es6)

Another approach makes use of ES6 `class` syntax.
```javascript
let singleton;

class MyThing {
  constructor() {
    if (!singleton) {
       singleton = this;
       singleton.init();
     }
      return singleton;
  }

  init() {
    this.prop1 = 'hello';
  }

  method1() {}
}

gl.MyThing = MyThing;
```
A live example of this is [Sidebar](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/assets/javascripts/sidebar.js.es6)

Another functional approach to define Singleton using `Javascript Revealing Module Pattern` is like below
```javascript
/**
  *  1. It instantiates only a single object
  *  2. It is safe – it keeps the reference to the singleton inside a variable, which lives inside a lexical closure, so it is not accessible by the outside world
  *  3. It allows privacy – you can define all private methods of your singleton inside the lexical closure of the first module pattern
  *  4. No this keyword trap (no wrong context referring)
  *  5. No use of new keyword
  *  6. Easy to write test code
  */
//
const Singleton = (function () {
  // Instance stores a reference to the Singleton
  var instance;
  function init() {
    // Singleton
    // Private methods and variables
    function privateMethod(){
        console.log( "I am private" );
    }
    var privateVariable = "Im also private";
    var privateRandomNumber = Math.random();
    return {
      // Public methods and variables
      publicMethod: function () {
        console.log( "The public can see me!" );
      },
      publicProperty: "I am also public",
      getRandomNumber: function() {
        return privateRandomNumber;
      }
    };
  };
  return {
    // Get the Singleton instance if one exists
    // or create one if it doesn't
    getInstance: function () {
      if ( !instance ) {
        instance = init();
      }
      return instance;
    }
  };
})();

const singletonObj = Singleton.getInstance()

```

## Are there points in the code the reviewer needs to double check?

## What does this MR do? 

Creates a space for discussion and contribution for interested devs.

## Why was this MR needed?

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [x] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [x] All builds are passing
(http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

See merge request !6620
2016-11-17 19:48:46 +00:00
Rémy Coutable 3fa5e73400
Fix typos
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-17 18:34:45 +01:00
Rémy Coutable 25c9c8ce73
Document the `rake ee_compat_check` task
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-17 11:13:10 +01:00
Rémy Coutable 95d552b8dd Start to document how to code for CE with EE in mind
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-17 10:30:49 +01:00
Rémy Coutable 6002827996 Add a gotcha about FactoryGirl sequences
Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/24341

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-16 17:55:11 +01:00
Victor Wu f92ea120ba [ci skip] Link to the copy (messaging) page.
Add new file for copy (messaging) guidelines

Update copy guidelines

Fix typo

Add forms to guidelines

Simplify Copy heading

Refine copy page. Add images and table

Fix toc link on Copy page
2016-11-15 15:22:16 -08:00
Achilleas Pipinellis 8b70a89c57 Fix link to index.md in development README.md
[ci skip]
2016-11-12 20:48:41 +01:00
Achilleas Pipinellis 406eda17d4 Remove <br> and replace GFM blockquote with the Markdown general
[ci skip]
2016-11-11 18:20:56 +01:00
Achilleas Pipinellis deef24a27d Rename README.md to index.md 2016-11-11 18:20:41 +01:00
awhildy 11510bf729 [ci skip] Establish basic structure for ux_guide README.md
Block out pages needed for ux_guide

Add resources stub to ux_guide home

Fill out principles and basics

Add TOC to basics

Move all of UI guide to new UX guide structure

Add first level structure on ux-guide pages

Add more details to buttons

Add button images. Update link on development

Renamed surfaces to templates. Add tooltip details

Update typography and icons on Basics page

Add images for color. First draft of voice and tone

Delete findings page

Refine pages. Fill out Surfaces pages

Clean up layout on basics, surfaces, features. Add anchorlinks and counts to components

Fill out components page

Add item title and system info block

Fill out Features page

Switch tooltip placement image
2016-11-10 14:09:35 -08:00
Robert Speicher de4334635e Add more highlighting to Shell Commands doc
[ci skip]
2016-11-09 11:06:49 +00:00
Robert Speicher 57f9ee0b9f Add more highlighting to Instrumentation doc
[ci skip]
2016-11-09 11:05:23 +00:00
Robert Speicher 9a2ad60ffa Add more highlighting to Migration Style Guide doc
[ci skip]
2016-11-09 10:59:15 +00:00
Douwe Maan bad6d29f33 Merge branch '24059-post-facto-fixups' into 'master'
Fixups to "Round-robin repository storage"

## What does this MR do?

* Simplifies a method in application_settings.rb
* Correctly marks a migration as needing downtime
* Documents the requirement for renamed columns to be 

## Are there points in the code the reviewer needs to double check?

Should any of these changes be split out? Ideally we'd get this into the same point release as !7273

## Why was this MR needed?

Post-facto review of !7273

## Screenshots (if relevant)

## Does this MR meet the acceptance criteria?

- [ ] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG.md) entry added
- [X] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [X] API support added
- Tests
  - [X] Added for this feature/bug
  - [x] All builds are passing
- [X] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [X] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [X] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [X] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

Related to #24059

/cc @yorickpeterse @rspeicher

See merge request !7287
2016-11-07 11:27:04 +00:00
Nick Thomas 630eb119cb Renaming columns requires downtime 2016-11-07 10:57:08 +00:00
Sam Rose 0c36b810ab Fix broken link to observatory cli on Frontend Dev Guide 2016-11-06 22:43:16 -05:00
Robert Speicher e4c05de75c Merge branch 'rs-update-rdoc' into 'master'
Update rdoc to `~> 4.2`

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/2814

See merge request !7261
2016-11-04 13:02:51 +00:00
Achilleas Pipinellis e2768498f0 Merge branch 'fix-docs-links' into 'master'
Fix Docs links

This fixes some links in the docs to either be relative or to use HTTPS and docs.gitlab.com.

See merge request !7280
2016-11-04 11:26:14 +00:00
Bryce Johnson 06dcb0776e Add tip for using Chrome to run and debug teaspoon tests. 2016-11-03 22:59:46 -05:00
Connor Shea 8a998b632a Change a bunch of doc links to either relative or https://docs.gitlab.com. 2016-11-03 15:11:51 -06:00
Robert Speicher 492ef142ad Clarify the author field for the changelog documentation
[ci skip]
2016-11-03 18:00:28 +00:00
Robert Speicher 4ba789cd40 Remove unused `gitlab:generate_docs` Rake task
This was the only thing using the `sdoc` gem, which was blocking another
gem from updating.
2016-11-03 17:25:58 +00:00
Robert Speicher 895673733a Add a `--force` option to bin/changelog 2016-11-02 22:15:20 +00:00
Robert Speicher c1ee879c66 Update examples in changelog docs to use single quotes around title
[ci skip]
2016-11-02 15:16:46 +00:00