You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| `TRANSFER_METER_FREQUENCY` | Specify how often to print the meter's transfer rate. It can be set to a duration (for example, `1s` or `1m30s`). A duration of `0` disables the meter (default). When a value is set, the pipeline shows a progress meter for artifact and cache uploads and downloads. |
847
-
| `ARTIFACT_COMPRESSION_LEVEL` | To adjust compression ratio, set to `fastest`, `fast`, `default`, `slow`, or `slowest`. This setting works with the fastzip archiver only, so the GitLab Runner feature flag [`FF_USE_FASTZIP`](https://docs.gitlab.com/runner/configuration/feature-flags.html#available-feature-flags) must also be enabled. |
848
-
| `CACHE_COMPRESSION_LEVEL` | To adjust compression ratio, set to `fastest`, `fast`, `default`, `slow`, or `slowest`. This setting works with the fastzip archiver only, so the GitLab Runner feature flag [`FF_USE_FASTZIP`](https://docs.gitlab.com/runner/configuration/feature-flags.html#available-feature-flags) must also be enabled. |
847
+
| `ARTIFACT_COMPRESSION_LEVEL` | To adjust compression ratio, set to `fastest`, `fast`, `default`, `slow`, or `slowest`. This setting works with the Fastzip archiver only, so the GitLab Runner feature flag [`FF_USE_FASTZIP`](https://docs.gitlab.com/runner/configuration/feature-flags.html#available-feature-flags) must also be enabled. |
848
+
| `CACHE_COMPRESSION_LEVEL` | To adjust compression ratio, set to `fastest`, `fast`, `default`, `slow`, or `slowest`. This setting works with the Fastzip archiver only, so the GitLab Runner feature flag [`FF_USE_FASTZIP`](https://docs.gitlab.com/runner/configuration/feature-flags.html#available-feature-flags) must also be enabled. |
Copy file name to clipboardExpand all lines: doc/development/fe_guide/design_anti_patterns.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ info: To determine the technical writer assigned to the Stage/Group associated w
9
9
Anti-patterns may seem like good approaches at first, but it has been shown that they bring more ills than benefits. These should
10
10
generally be avoided.
11
11
12
-
Throughout the GitLab codebase, there may be historic uses of these anti-patterns. Please [use descretion](https://about.gitlab.com/handbook/engineering/#balance-refactoring-and-velocity)
12
+
Throughout the GitLab codebase, there may be historic uses of these anti-patterns. Please [use discretion](https://about.gitlab.com/handbook/engineering/#balance-refactoring-and-velocity)
13
13
when figuring out whether or not to refactor, when touching code that uses one of these legacy patterns.
14
14
15
15
**Please note:** For new features, anti-patterns are not necessarily prohibited, but it is **strongly suggested** to find another approach.
@@ -45,7 +45,7 @@ the convenience does not always outweigh their heavy cost:
45
45
-**No access control.** When Shared Global Objects manage some state, this can create some very buggy and difficult
46
46
coupling situations because there is no access control to this object.
47
47
-**Possible circular references.** Shared Global Objects can also create some circular referencing situations since submodules
48
-
of the Shared Global Object can reference modules that reference itself (see
48
+
of the Shared Global Object can reference modules that reference itself (see
49
49
[this MR for an example](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/33366)).
50
50
51
51
Here are some historic examples where this pattern was identified to be problematic:
@@ -72,7 +72,7 @@ To read more on this topic, check out the following references:
72
72
73
73
## Singleton (Anti-pattern)
74
74
75
-
The classic [Singleton pattern](https://en.wikipedia.org/wiki/Singleton_pattern) is an approach to ensure that only one
75
+
The classic [Singleton pattern](https://en.wikipedia.org/wiki/Singleton_pattern) is an approach to ensure that only one
76
76
instance of a thing exists.
77
77
78
78
Here's an example of this pattern:
@@ -114,7 +114,7 @@ Here are some ills that Singletons often produce:
114
114
115
115
1.**Non-deterministic tests.** Singletons encourage non-deterministic tests because the single instance is shared across
116
116
individual tests, often causing the state of one test to bleed into another.
117
-
1.**High coupling.** Under the hood, clients of a singleton class all share a single specific
117
+
1.**High coupling.** Under the hood, clients of a singleton class all share a single specific
118
118
instance of an object, which means this pattern inherits all the [problems of Shared Global Object](#what-problems-do-shared-global-objects-cause)
119
119
such as no clear ownership and no access control. These leads to high coupling situations that can
[Dependency Injection](https://en.wikipedia.org/wiki/Dependency_injection) is an approach which breaks
177
-
coupling by declaring a module's dependencies to be injected from outside the module (e.g., through constructor parameters, a bon-a-fide Dependency Injection framework, and even Vue's `provide/inject`).
177
+
coupling by declaring a module's dependencies to be injected from outside the module (e.g., through constructor parameters, a bona-fide Dependency Injection framework, and even Vue's `provide/inject`).
178
178
179
179
```javascript
180
180
// bad - Vue component coupled to Singleton
181
181
exportdefault {
182
182
created() {
183
-
this.mediator=MyFooMediator.getInstance();
183
+
this.mediator=MyFooMediator.getInstance();
184
184
},
185
185
};
186
186
@@ -194,7 +194,7 @@ export default {
194
194
// bad - We're not sure where the singleton is in it's lifecycle so we init it here.
Copy file name to clipboardExpand all lines: doc/development/fe_guide/index.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,10 @@ across the GitLab frontend team.
12
12
## Overview
13
13
14
14
GitLab is built on top of [Ruby on Rails](https://rubyonrails.org). It uses [Haml](https://haml.info/) and a JavaScript0based frontend with [Vue.js](https://vuejs.org).
15
-
Be wary of [the limitations that come with using Hamlit](https://github.com/k0kubun/hamlit/blob/master/REFERENCE.md#limitations). We also use [SCSS](https://sass-lang.com) and plain JavaScript with
15
+
<!-- vale gitlab.Spelling = NO -->
16
+
Be wary of [the limitations that come with using Hamlit](https://github.com/k0kubun/hamlit/blob/master/REFERENCE.md#limitations).
17
+
<!-- vale gitlab.Spelling = YES -->
18
+
We also use [SCSS](https://sass-lang.com) and plain JavaScript with
16
19
modern ECMAScript standards supported through [Babel](https://babeljs.io/) and ES module support through [webpack](https://webpack.js.org/).
17
20
18
21
Working with our frontend assets requires Node (v10.13.0 or greater) and Yarn
Copy file name to clipboardExpand all lines: doc/development/fe_guide/performance.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -219,7 +219,7 @@ Use the following rules when creating real-time solutions.
219
219
1. A response with HTTP status different from 2XX should disable polling as well.
220
220
1. Use a common library for polling.
221
221
1. Poll on active tabs only. Please use [Visibility](https://github.com/ai/visibilityjs).
222
-
1. Use regular polling intervals, do not use backoff polling, or jitter, as the interval is
222
+
1. Use regular polling intervals, do not use <!-- vale gitlab.Spelling = NO --> backoff polling <!-- vale gitlab.Spelling = YES --> or jitter, as the interval is
223
223
controlled by the server.
224
224
1. The backend code is likely to be using ETags. You do not and should not check for status
225
225
`304 Not Modified`. The browser transforms it for you.
Copy file name to clipboardExpand all lines: doc/development/fe_guide/style/scss.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ easy to maintain, and performant for the end-user.
12
12
13
13
## Rules
14
14
15
-
Our CSS is a mixture of current and legacy approaches. That means sometimes it may be difficult to follow this guide to the letter; it means you are likely to run into exceptions, where following the guide is difficult to impossible without outsized effort. In those cases, you may work with your reviewers and maintainers to identify an approach that does not fit these rules. Please endeavor to limit these cases.
15
+
Our CSS is a mixture of current and legacy approaches. That means sometimes it may be difficult to follow this guide to the letter; it means you are likely to run into exceptions, where following the guide is difficult to impossible without major effort. In those cases, you may work with your reviewers and maintainers to identify an approach that does not fit these rules. Please endeavor to limit these cases.
16
16
17
17
### Utility Classes
18
18
@@ -21,10 +21,12 @@ In order to reduce the generation of more CSS as our site grows, prefer the use
21
21
#### Where are utility classes defined?
22
22
23
23
Prefer the use of [utility classes defined in GitLab UI](https://gitlab.com/gitlab-org/gitlab-ui/-/blob/main/doc/css.md#utilities).
24
+
<!-- vale gitlab.Spelling = NO -->
24
25
An easy list of classes can also be [seen on Unpkg](https://unpkg.com/browse/@gitlab/ui/src/scss/utilities.scss).
26
+
<!-- vale gitlab.Spelling = YES -->
25
27
26
28
Classes in [`utilities.scss`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/stylesheets/utilities.scss) and [`common.scss`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/stylesheets/framework/common.scss) are being deprecated.
27
-
Classes in [`common.scss`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/stylesheets/framework/common.scss) that use non-designsystem values should be avoided in favor of conformant values.
29
+
Classes in [`common.scss`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/app/assets/stylesheets/framework/common.scss) that use non-design-system values should be avoided. Use classes with conforming values instead.
@@ -49,7 +51,7 @@ We recommend a "utility-first" approach.
49
51
1. Start with utility classes.
50
52
1. If composing utility classes into a component class removes code duplication and encapsulates a clear responsibility, do it.
51
53
52
-
This encourages an organic growth of component classes and prevents the creation of one-off unreusable classes. Also, the kind of classes that emerge from "utility-first" tend to be design-centered (e.g. `.button`, `.alert`, `.card`) rather than domain-centered (e.g. `.security-report-widget`, `.commit-header-icon`).
54
+
This encourages an organic growth of component classes and prevents the creation of one-off non-reusable classes. Also, the kind of classes that emerge from "utility-first" tend to be design-centered (e.g. `.button`, `.alert`, `.card`) rather than domain-centered (e.g. `.security-report-widget`, `.commit-header-icon`).
Vue documentation recommends using the [mitt](https://github.com/developit/mitt) library. It's relatively small (200 bytes gzipped) and has a clear API:
29
+
Vue documentation recommends using the [mitt](https://github.com/developit/mitt) library. It's relatively small (200 bytes, compressed) and has a clear API:
0 commit comments