Commit c72dbb06 authored by Nicolò Maria Mezzopera's avatar Nicolò Maria Mezzopera

Merge branch 'ntepluhina-refactor-design-management-to-gitlab-ui' into 'master'

Update design list item component to use GitLab UI classes

See merge request gitlab-org/gitlab!42441
parents bdbb6a8b 0ac6df46
...@@ -125,10 +125,12 @@ export default { ...@@ -125,10 +125,12 @@ export default {
params: { id: filename }, params: { id: filename },
query: $route.query, query: $route.query,
}" }"
class="card cursor-pointer text-plain js-design-list-item design-list-item design-list-item-new" class="card gl-cursor-pointer text-plain js-design-list-item design-list-item design-list-item-new"
> >
<div class="card-body p-0 d-flex-center overflow-hidden position-relative"> <div
<div v-if="icon.name" data-testid="designEvent" class="design-event position-absolute"> class="card-body gl-p-0 gl-display-flex gl-align-items-center gl-justify-content-center gl-overflow-hidden gl-relative"
>
<div v-if="icon.name" data-testid="designEvent" class="design-event gl-absolute">
<span :title="icon.tooltip" :aria-label="icon.tooltip"> <span :title="icon.tooltip" :aria-label="icon.tooltip">
<gl-icon :name="icon.name" :size="18" :class="icon.classes" /> <gl-icon :name="icon.name" :size="18" :class="icon.classes" />
</span> </span>
...@@ -145,25 +147,28 @@ export default { ...@@ -145,25 +147,28 @@ export default {
v-show="showImage" v-show="showImage"
:src="imageLink" :src="imageLink"
:alt="filename" :alt="filename"
class="block mx-auto mw-100 mh-100 design-img" class="gl-display-block gl-mx-auto gl-max-w-full mh-100 design-img"
data-qa-selector="design_image" data-qa-selector="design_image"
@load="onImageLoad" @load="onImageLoad"
@error="onImageError" @error="onImageError"
/> />
</gl-intersection-observer> </gl-intersection-observer>
</div> </div>
<div class="card-footer d-flex w-100"> <div class="card-footer gl-display-flex gl-w-full">
<div class="d-flex flex-column str-truncated-100"> <div class="gl-display-flex gl-flex-direction-column str-truncated-100">
<span class="bold str-truncated-100" data-qa-selector="design_file_name">{{ <span class="gl-font-weight-bold str-truncated-100" data-qa-selector="design_file_name">{{
filename filename
}}</span> }}</span>
<span v-if="updatedAt" class="str-truncated-100"> <span v-if="updatedAt" class="str-truncated-100">
{{ __('Updated') }} <timeago :time="updatedAt" tooltip-placement="bottom" /> {{ __('Updated') }} <timeago :time="updatedAt" tooltip-placement="bottom" />
</span> </span>
</div> </div>
<div v-if="notesCount" class="ml-auto d-flex align-items-center text-secondary"> <div
<gl-icon name="comments" class="ml-1" /> v-if="notesCount"
<span :aria-label="notesLabel" class="ml-1"> class="gl-ml-auto gl-display-flex gl-align-items-center gl-text-gray-500"
>
<gl-icon name="comments" class="gl-ml-2" />
<span :aria-label="notesLabel" class="gl-ml-2">
{{ notesCount }} {{ notesCount }}
</span> </span>
</div> </div>
......
...@@ -10,11 +10,11 @@ exports[`Design management list item component when item appears in view after i ...@@ -10,11 +10,11 @@ exports[`Design management list item component when item appears in view after i
exports[`Design management list item component with notes renders item with multiple comments 1`] = ` exports[`Design management list item component with notes renders item with multiple comments 1`] = `
<router-link-stub <router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item design-list-item-new" class="card gl-cursor-pointer text-plain js-design-list-item design-list-item design-list-item-new"
to="[object Object]" to="[object Object]"
> >
<div <div
class="card-body p-0 d-flex-center overflow-hidden position-relative" class="card-body gl-p-0 gl-display-flex gl-align-items-center gl-justify-content-center gl-overflow-hidden gl-relative"
> >
<!----> <!---->
...@@ -23,7 +23,7 @@ exports[`Design management list item component with notes renders item with mult ...@@ -23,7 +23,7 @@ exports[`Design management list item component with notes renders item with mult
<img <img
alt="test" alt="test"
class="block mx-auto mw-100 mh-100 design-img" class="gl-display-block gl-mx-auto gl-max-w-full mh-100 design-img"
data-qa-selector="design_image" data-qa-selector="design_image"
src="" src=""
/> />
...@@ -31,13 +31,13 @@ exports[`Design management list item component with notes renders item with mult ...@@ -31,13 +31,13 @@ exports[`Design management list item component with notes renders item with mult
</div> </div>
<div <div
class="card-footer d-flex w-100" class="card-footer gl-display-flex gl-w-full"
> >
<div <div
class="d-flex flex-column str-truncated-100" class="gl-display-flex gl-flex-direction-column str-truncated-100"
> >
<span <span
class="bold str-truncated-100" class="gl-font-weight-bold str-truncated-100"
data-qa-selector="design_file_name" data-qa-selector="design_file_name"
> >
test test
...@@ -57,17 +57,17 @@ exports[`Design management list item component with notes renders item with mult ...@@ -57,17 +57,17 @@ exports[`Design management list item component with notes renders item with mult
</div> </div>
<div <div
class="ml-auto d-flex align-items-center text-secondary" class="gl-ml-auto gl-display-flex gl-align-items-center gl-text-gray-500"
> >
<gl-icon-stub <gl-icon-stub
class="ml-1" class="gl-ml-2"
name="comments" name="comments"
size="16" size="16"
/> />
<span <span
aria-label="2 comments" aria-label="2 comments"
class="ml-1" class="gl-ml-2"
> >
2 2
...@@ -80,11 +80,11 @@ exports[`Design management list item component with notes renders item with mult ...@@ -80,11 +80,11 @@ exports[`Design management list item component with notes renders item with mult
exports[`Design management list item component with notes renders item with single comment 1`] = ` exports[`Design management list item component with notes renders item with single comment 1`] = `
<router-link-stub <router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item design-list-item-new" class="card gl-cursor-pointer text-plain js-design-list-item design-list-item design-list-item-new"
to="[object Object]" to="[object Object]"
> >
<div <div
class="card-body p-0 d-flex-center overflow-hidden position-relative" class="card-body gl-p-0 gl-display-flex gl-align-items-center gl-justify-content-center gl-overflow-hidden gl-relative"
> >
<!----> <!---->
...@@ -93,7 +93,7 @@ exports[`Design management list item component with notes renders item with sing ...@@ -93,7 +93,7 @@ exports[`Design management list item component with notes renders item with sing
<img <img
alt="test" alt="test"
class="block mx-auto mw-100 mh-100 design-img" class="gl-display-block gl-mx-auto gl-max-w-full mh-100 design-img"
data-qa-selector="design_image" data-qa-selector="design_image"
src="" src=""
/> />
...@@ -101,13 +101,13 @@ exports[`Design management list item component with notes renders item with sing ...@@ -101,13 +101,13 @@ exports[`Design management list item component with notes renders item with sing
</div> </div>
<div <div
class="card-footer d-flex w-100" class="card-footer gl-display-flex gl-w-full"
> >
<div <div
class="d-flex flex-column str-truncated-100" class="gl-display-flex gl-flex-direction-column str-truncated-100"
> >
<span <span
class="bold str-truncated-100" class="gl-font-weight-bold str-truncated-100"
data-qa-selector="design_file_name" data-qa-selector="design_file_name"
> >
test test
...@@ -127,17 +127,17 @@ exports[`Design management list item component with notes renders item with sing ...@@ -127,17 +127,17 @@ exports[`Design management list item component with notes renders item with sing
</div> </div>
<div <div
class="ml-auto d-flex align-items-center text-secondary" class="gl-ml-auto gl-display-flex gl-align-items-center gl-text-gray-500"
> >
<gl-icon-stub <gl-icon-stub
class="ml-1" class="gl-ml-2"
name="comments" name="comments"
size="16" size="16"
/> />
<span <span
aria-label="1 comment" aria-label="1 comment"
class="ml-1" class="gl-ml-2"
> >
1 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment