Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-03-22Creates Frontend Style guideFilipa Lacerda
2017-03-17Updates realtime documentation for the FrontendFilipa Lacerda
2017-03-16Fix spelling and grammatical errors.Jacob Schatz
2017-03-16Add Server issues 429 Too Many Requests disable polling.Jacob Schatz
2017-03-16Fix up suggestions on content changes.Jacob Schatz
2017-03-16Add docs for realtime polling for the frontend.Jacob Schatz
2017-03-13Fix bad code exampleFilipa Lacerda
2017-03-11Fix code examples and add code highligthFilipa Lacerda
2017-03-10Adds best practices regarding context and vue to documentationFilipa Lacerda
2017-03-10Adds information about architecture step.Filipa Lacerda
2017-02-28Add newline to end of frontend.md.Bryce Johnson
2017-02-28Document use of AirBnb js styleguide and eslint.Bryce Johnson
2017-02-10Merge branch 'replace-teaspoon-references' into 'master' Clement Ho
Replace teaspoon references with Karma Closes gitlab-com/gitlab-docs#68 See merge request !9011
2017-02-10Replace teaspoon references with KarmaClement Ho
2017-02-10moved hyperlink reference section at the end of the contentNur Rony
2017-02-10fixes frontend doc broken linkNur Rony
2017-01-30First draft of "how to use vue.js in gitlab" documentationFilipa Lacerda
Puts back trailing whitespace Changes after review Changes after review Adds Changelog entry Follow documentation styleguide
2016-12-21Fix markdown errors.Bryce Johnson
2016-12-21Add documentation for possible causes of JS-related test failures.Bryce Johnson
2016-11-17Merge branch 'google-singletons-are' into 'master' Jacob Schatz
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
2016-11-07Fix broken link to observatory cli on Frontend Dev GuideSam Rose
2016-11-04Add tip for using Chrome to run and debug teaspoon tests.Bryce Johnson
2016-11-01Fix spacing in code sample.Bryce Johnson
2016-11-01Merge branch 'patch-8' into 'master' Fatih Acet
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
2016-10-31Document convention for singleton use in front-end code.Bryce Johnson
2016-10-28Document how to run frontend testsWinnie
2016-10-26Add ES array methods as cause of Phantom.js errors.Bryce Johnson
2016-10-12Document Capybara errors from es6 in es5 file.Bryce Johnson
2016-09-22Update Frontend Docs based on feedback.Connor Shea
2016-09-22Add a section on vue and one on supported browsers.Connor Shea
2016-09-22Add Overview section detailing our frontend stack. [ci skip]Connor Shea
2016-09-22Add short Testing section, minor fixes.Connor Shea
2016-09-22Add CSP and SRI information [ci skip]Connor Shea
2016-09-22Further revisions/additions [ci skip]Connor Shea
2016-09-22Add more information on page-specific JS.Connor Shea
[ci skip]
2016-09-22Initial incomplete draft of the Frontend Development Guidelines.Connor Shea
[ci skip]