summaryrefslogtreecommitdiff
path: root/doc/development
Commit message (Collapse)AuthorAgeFilesLines
* Remove contents section since it's not necessary [ci skip]object-state-models-docsVictor Wu2016-11-201-7/+0
|
* Remove hyphen [ci skip]Victor Wu2016-11-181-0/+0
|
* Remove hyphen [ci skip]Victor Wu2016-11-181-0/+0
|
* Add spaces to conform to style guide [ci skip]Victor Wu2016-11-181-0/+5
|
* Update object_state_models.md [ci skip]Victor Wu2016-11-171-0/+27
|
* Delete .gitkeep [ci skip]Victor Wu2016-11-171-0/+0
|
* Upload new file [ci skip]Victor Wu2016-11-171-0/+0
|
* Upload new file [ci skip]Victor Wu2016-11-171-0/+0
|
* Upload new file [ci skip]Victor Wu2016-11-171-0/+0
|
* Add new directory [ci skip]Victor Wu2016-11-171-0/+0
|
* Add file [ci skip]Victor Wu2016-11-171-0/+0
|
* Link to object state models [ci skip]Victor Wu2016-11-171-0/+1
|
* Update copy.md with issue guideline updates and merge request guidelinesVictor Wu2016-11-171-26/+47
| | | | | | | | | | Update examples and labels to use sentence case. Update copy.md [ci skip] Update copy.md [ci skip] Update copy.md
* Merge branch 'google-singletons-are' into 'master' Jacob Schatz2016-11-171-0/+51
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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](https://gitlab.com/gitlab-org/gitlab-ce/blob/172aab108b875e8dc9a5f1d3c2d53018eff76ea1/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
| * Fix spacing in code sample.google-singletons-areBryce Johnson2016-11-011-3/+5
| |
| * Document convention for singleton use in front-end code.Bryce Johnson2016-10-311-0/+49
| |
* | Fix typosRémy Coutable2016-11-171-8/+7
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Document the `rake ee_compat_check` task23740-create-a-doc-for-the-ce-ee-development-workflowRémy Coutable2016-11-171-59/+85
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Start to document how to code for CE with EE in mindRémy Coutable2016-11-172-0/+248
| | | | | | | | Signed-off-by: Rémy Coutable <remy@rymai.me>
* | Add a gotcha about FactoryGirl sequencesadd-gotcha-following-24341Rémy Coutable2016-11-162-0/+90
| | | | | | | | | | | | Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/24341 Signed-off-by: Rémy Coutable <remy@rymai.me>
* | [ci skip] Link to the copy (messaging) page.Victor Wu2016-11-156-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Fix link to index.md in development README.mdux-guide-indexAchilleas Pipinellis2016-11-121-1/+1
| | | | | | | | [ci skip]
* | Remove <br> and replace GFM blockquote with the Markdown generalAchilleas Pipinellis2016-11-117-84/+10
| | | | | | | | [ci skip]
* | Rename README.md to index.mdAchilleas Pipinellis2016-11-111-6/+0
| |
* | [ci skip] Establish basic structure for ux_guide README.mdux-guide-restructureawhildy2016-11-1060-1/+676
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Add more highlighting to Shell Commands docrs-doc-highlightingRobert Speicher2016-11-091-4/+4
| | | | | | | | [ci skip]
* | Add more highlighting to Instrumentation docRobert Speicher2016-11-091-5/+5
| | | | | | | | [ci skip]
* | Add more highlighting to Migration Style Guide docRobert Speicher2016-11-091-6/+6
| | | | | | | | [ci skip]
* | Merge branch '24059-post-facto-fixups' into 'master' Douwe Maan2016-11-071-0/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Renaming columns requires downtimeNick Thomas2016-11-071-0/+6
| | |
* | | Fix broken link to observatory cli on Frontend Dev GuideSam Rose2016-11-061-1/+1
| | |
* | | Merge branch 'rs-update-rdoc' into 'master' Robert Speicher2016-11-041-8/+0
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Update rdoc to `~> 4.2` Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/2814 See merge request !7261
| * | Remove unused `gitlab:generate_docs` Rake taskrs-remove-sdocRobert Speicher2016-11-031-8/+0
| | | | | | | | | | | | | | | This was the only thing using the `sdoc` gem, which was blocking another gem from updating.
* | | Merge branch 'fix-docs-links' into 'master' Achilleas Pipinellis2016-11-041-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Change a bunch of doc links to either relative or https://docs.gitlab.com.fix-docs-linksConnor Shea2016-11-031-0/+1
| | | |
* | | | Add tip for using Chrome to run and debug teaspoon tests.Bryce Johnson2016-11-031-0/+6
|/ / /
* | | Clarify the author field for the changelog documentationRobert Speicher2016-11-031-0/+3
|/ / | | | | | | [ci skip]
* | Add a `--force` option to bin/changelogrs-changelog-forceRobert Speicher2016-11-021-1/+19
| |
* | Update examples in changelog docs to use single quotes around titleRobert Speicher2016-11-021-3/+3
| | | | | | | | [ci skip]
* | Merge branch 'rs-bin-changelog' into 'master' Rémy Coutable2016-11-022-0/+165
|\ \ | | | | | | | | | | | | Add a bin/changelog script and changelog documentation See merge request !7098
| * | Add changelog documentationRobert Speicher2016-10-312-0/+165
| |/
* | Merge branch 'create_hooks_rake' into 'master' Rémy Coutable2016-11-021-0/+36
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Rake task to create/repair GitLab Shell hooks symlinks ## What does this MR do? Adds a Rake task wrapper around `gitlab-shell` `bin/create_hooks` script. This makes it easier for an administrator to repair hooks symlinks without worrying about where repository data is located, etc. Just run this task and it takes care of everything based on current configuration. ## Are there points in the code the reviewer needs to double check? No. ## Why was this MR needed? `bin/create_hooks` was not well-documented. It requires parameters specifying where repository data is located. It also needs to be run by the `git` user. Wrapping it in a Rake task allows us to take current configuration in to account and makes it easier on the administrator. See merge request !5634
| * | Add Rake task to create/repair GitLab Shell hooks symlinksDrew Blessing2016-11-011-0/+36
| | |
* | | Merge branch 'background-migrations' into 'master'Robert Speicher2016-11-012-0/+76
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | Support for post deployment migrations Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/22133 See merge request !6572
| * | Support for post deployment migrationsbackground-migrationsYorick Peterse2016-10-312-0/+76
| |/ | | | | | | | | | | | | | | These are regular Rails migrations that are executed by default. A user can opt-out of these migrations by setting an environment variable during the deployment process. Fixes gitlab-org/gitlab-ce#22133
* | Merge branch 'decaffeinate-the-docs' into 'master' Fatih Acet2016-11-012-6/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove leftover references to coffeescript from comments and docs. I was looking at the front-end helper spec and noticed some outdated coffeescript refs in it. So I figured it wouldn't hurt to take a few minutes and remove all the coffeescript references in CE that we don't need anymore. I didn't touch any coffeescript references that could potentially break anything. Just docs and code comments. - [x] All builds are passing See merge request !7151
| * | Remove leftover references to coffeescript from comments and docs.decaffeinate-the-docsBryce Johnson2016-10-312-6/+4
| |/
* | Merge branch 'blacklist-osl' into 'master' Robert Speicher2016-11-011-0/+3
|\ \ | | | | | | | | | | | | Blacklist the OSL 3.0 license See merge request !7171
| * | Add OSL to licensing docblacklist-oslSean McGivern2016-10-311-0/+3
| | |
* | | Merge branch 'patch-8' into 'master' Fatih Acet2016-10-311-3/+8
|\ \ \ | |_|/ |/| | | | | | | | | | | | | | | | | | | | Add ES array methods as cause of Phantom.js errors. ## What does this MR do? Adds another example of something that causes a common error in JavaScript testing to the frontend dev docs. See merge request !7102