@gitlab/ui 62.4.0 → 62.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +0 -19
- package/dist/components/base/avatar/avatar.js +2 -2
- package/dist/components/base/avatar_labeled/avatar_labeled.js +20 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/utils/utils.js +28 -11
- package/package.json +26 -25
- package/src/components/base/avatar/avatar.vue +2 -0
- package/src/components/base/avatar_labeled/avatar_labeled.scss +1 -0
- package/src/components/base/avatar_labeled/avatar_labeled.spec.js +18 -5
- package/src/components/base/avatar_labeled/avatar_labeled.stories.js +35 -0
- package/src/components/base/avatar_labeled/avatar_labeled.vue +22 -2
- package/src/components/base/badge/badge.md +0 -2
- package/src/components/base/button/button.md +0 -2
- package/src/components/base/filtered_search/filtered_search.md +0 -2
- package/src/components/base/keyset_pagination/keyset_pagination.md +0 -4
- package/src/components/base/markdown/markdown.md +0 -2
- package/src/components/base/new_dropdowns/disclosure/disclosure_dropdown.md +0 -2
- package/src/components/utilities/friendly_wrap/friendly_wrap.md +0 -8
- package/src/components/utilities/intersperse/intersperse.md +0 -8
- package/src/components/utilities/sprintf/sprintf.md +0 -2
- package/src/components/utilities/truncate/truncate.md +0 -2
- package/src/directives/safe_html/safe_html.md +0 -2
- package/src/utils/utils.js +32 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [62.5.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v62.5.0...v62.5.1) (2023-04-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **utils:** Change color util to use relative luminance ([6245128](https://gitlab.com/gitlab-org/gitlab-ui/commit/6245128c7256e3d8db164b92e9580c79d47e9183))
|
|
7
|
+
|
|
8
|
+
# [62.5.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v62.4.0...v62.5.0) (2023-04-25)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **GlAvatarLabeled:** link avatar to avatar label link ([35bf39d](https://gitlab.com/gitlab-org/gitlab-ui/commit/35bf39d3baec4f3d84b4fa2c0bc8148f37194a3c))
|
|
14
|
+
|
|
1
15
|
# [62.4.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v62.3.0...v62.4.0) (2023-04-24)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -121,25 +121,6 @@ should conform with the design system specs, and they should look correct in the
|
|
|
121
121
|
the GitLab product. Please see [Debugging GitLab UI issues with GitLab product CSS](doc/debugging-gitlab-ui-with-gitlab-css.md)
|
|
122
122
|
for information on how to debug issues with GitLab product CSS in GitLab UI.
|
|
123
123
|
|
|
124
|
-
#### Running visual regression tests locally
|
|
125
|
-
|
|
126
|
-
Visual difference tests form part of the test suite. Rendered output can vary
|
|
127
|
-
from host to host (e.g., due to available fonts and how each platform renders
|
|
128
|
-
them), so these can fail when run locally. The easiest way to work around this
|
|
129
|
-
is to run a percent-based diff, and to increase the failure threshold with the
|
|
130
|
-
`FAILURE_THRESHOLD_TYPE` and `FAILURE_THRESHOLD` environment variables:
|
|
131
|
-
|
|
132
|
-
```sh
|
|
133
|
-
# Sets a 2% threshold
|
|
134
|
-
FAILURE_THRESHOLD_TYPE='percent' FAILURE_THRESHOLD=.02 yarn test:visual
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
`FAILURE_THRESHOLD_TYPE` defaults to `'pixel'` and `FAILURE_THRESHOLD` defaults to `1`. In the CI
|
|
138
|
-
environment, we consider a 1 pixel difference as a false negative that should not fail the test.
|
|
139
|
-
|
|
140
|
-
Under the hood, those variables are passed to
|
|
141
|
-
[`jest-image-snapshot`](https://github.com/americanexpress/jest-image-snapshot)'s config
|
|
142
|
-
|
|
143
124
|
### End to end tests
|
|
144
125
|
|
|
145
126
|
Components’ end to end tests live in the `cypress/e2e` folder. See our
|
|
@@ -121,11 +121,11 @@ var script = {
|
|
|
121
121
|
const __vue_script__ = script;
|
|
122
122
|
|
|
123
123
|
/* template */
|
|
124
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.showImage)?_c('img',{class:['gl-avatar', { 'gl-avatar-circle': _vm.isCircle }, _vm.sizeClasses],attrs:{"src":_vm.src,"alt":_vm.alt},on:{"error":_vm.handleLoadError}}):_c('div',{class:[
|
|
124
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.showImage)?_c('img',_vm._g({class:['gl-avatar', { 'gl-avatar-circle': _vm.isCircle }, _vm.sizeClasses],attrs:{"src":_vm.src,"alt":_vm.alt},on:{"error":_vm.handleLoadError}},_vm.$listeners)):_c('div',_vm._g({class:[
|
|
125
125
|
'gl-avatar gl-avatar-identicon',
|
|
126
126
|
{ 'gl-avatar-circle': _vm.isCircle },
|
|
127
127
|
_vm.sizeClasses,
|
|
128
|
-
_vm.identiconBackgroundClass ]},[_vm._v("\n "+_vm._s(_vm.identiconText)+"\n")])};
|
|
128
|
+
_vm.identiconBackgroundClass ]},_vm.$listeners),[_vm._v("\n "+_vm._s(_vm.identiconText)+"\n")])};
|
|
129
129
|
var __vue_staticRenderFns__ = [];
|
|
130
130
|
|
|
131
131
|
/* style */
|
|
@@ -35,6 +35,25 @@ var script = {
|
|
|
35
35
|
},
|
|
36
36
|
hasSubLabelLink() {
|
|
37
37
|
return Boolean(this.subLabelLink);
|
|
38
|
+
},
|
|
39
|
+
avatarListeners() {
|
|
40
|
+
if (this.hasLabelLink) {
|
|
41
|
+
return {
|
|
42
|
+
...this.$listeners,
|
|
43
|
+
click: this.onAvatarClick
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
return this.$listeners;
|
|
47
|
+
},
|
|
48
|
+
avatarCssClasses() {
|
|
49
|
+
return {
|
|
50
|
+
'gl-cursor-pointer': this.hasLabelLink
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
methods: {
|
|
55
|
+
onAvatarClick() {
|
|
56
|
+
this.$refs.labelLink.$el.click();
|
|
38
57
|
}
|
|
39
58
|
}
|
|
40
59
|
};
|
|
@@ -43,7 +62,7 @@ var script = {
|
|
|
43
62
|
const __vue_script__ = script;
|
|
44
63
|
|
|
45
64
|
/* template */
|
|
46
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-avatar-labeled"},[_c('gl-avatar',_vm._g(_vm._b({attrs:{"alt":""}},'gl-avatar',_vm.$attrs,false),_vm
|
|
65
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"gl-avatar-labeled"},[_c('gl-avatar',_vm._g(_vm._b({class:_vm.avatarCssClasses,attrs:{"alt":""}},'gl-avatar',_vm.$attrs,false),_vm.avatarListeners)),_vm._v(" "),_c('div',{staticClass:"gl-avatar-labeled-labels gl-text-left!"},[_c('div',{staticClass:"gl-display-flex gl-flex-wrap gl-align-items-center gl-text-left! gl-mx-n1 gl-my-n1"},[(_vm.hasLabelLink)?_c('gl-link',{ref:"labelLink",staticClass:"gl-avatar-link",attrs:{"href":_vm.labelLink}},[_c('span',{staticClass:"gl-avatar-labeled-label"},[_vm._v(_vm._s(_vm.label))])]):_c('span',{staticClass:"gl-avatar-labeled-label"},[_vm._v(_vm._s(_vm.label))]),_vm._v(" "),_vm._t("meta")],2),_vm._v(" "),(_vm.hasSubLabelLink)?_c('gl-link',{staticClass:"gl-avatar-link",attrs:{"href":_vm.subLabelLink}},[_c('span',{staticClass:"gl-avatar-labeled-sublabel"},[_vm._v(_vm._s(_vm.subLabel))])]):_c('span',{staticClass:"gl-avatar-labeled-sublabel"},[_vm._v(_vm._s(_vm.subLabel))]),_vm._v(" "),_vm._t("default")],2)],1)};
|
|
47
66
|
var __vue_staticRenderFns__ = [];
|
|
48
67
|
|
|
49
68
|
/* style */
|