Commit c106a612 authored by Valentin's avatar Valentin Committed by Roman Kuba

Update "delete" to "archive": design mgmt

- updates relevant 'design_management/' components to
use "archive" instead of "delete"
- update snapshots
- updates gitlab.pot
- Update error message to use "archived"
- update tooltip of design card to "archived"
- Remove scoping from designs "Archive" text
- Add button category and loading to design delete
- Use warning variant for design delete
- Also, clean up a bunch of spacing in
design toolbars
- Remove changes to design_management_legacy
- Update modal text
- Fix design toolbar loading bug
parent 41964d9c
<script> <script>
import { GlButton, GlModal, GlModalDirective } from '@gitlab/ui'; import { GlButton, GlModal, GlModalDirective } from '@gitlab/ui';
import { uniqueId } from 'lodash'; import { uniqueId } from 'lodash';
import { s__ } from '~/locale'; import { s__, __ } from '~/locale';
export default { export default {
name: 'DeleteButton', name: 'DeleteButton',
...@@ -28,6 +28,16 @@ export default { ...@@ -28,6 +28,16 @@ export default {
required: false, required: false,
default: 'info', default: 'info',
}, },
buttonCategory: {
type: String,
required: false,
default: 'primary',
},
buttonIcon: {
type: String,
required: false,
default: undefined,
},
buttonSize: { buttonSize: {
type: String, type: String,
required: false, required: false,
...@@ -38,6 +48,11 @@ export default { ...@@ -38,6 +48,11 @@ export default {
required: false, required: false,
default: true, default: true,
}, },
loading: {
type: Boolean,
required: false,
default: false,
},
}, },
data() { data() {
return { return {
...@@ -45,13 +60,13 @@ export default { ...@@ -45,13 +60,13 @@ export default {
}; };
}, },
modal: { modal: {
title: s__('DesignManagement|Delete designs confirmation'), title: s__('DesignManagement|Are you sure you want to archive the selected designs?'),
actionPrimary: { actionPrimary: {
text: s__('Delete'), text: s__('DesignManagement|Archive designs'),
attributes: { variant: 'danger' }, attributes: { variant: 'warning' },
}, },
actionCancel: { actionCancel: {
text: s__('Cancel'), text: __('Cancel'),
}, },
}, },
}; };
...@@ -66,14 +81,23 @@ export default { ...@@ -66,14 +81,23 @@ export default {
:action-cancel="$options.modal.actionCancel" :action-cancel="$options.modal.actionCancel"
@ok="$emit('deleteSelectedDesigns')" @ok="$emit('deleteSelectedDesigns')"
> >
<p>{{ s__('DesignManagement|Are you sure you want to delete the selected designs?') }}</p> <p>
{{
s__(
'DesignManagement|Archived designs will still be available in previous versions of the design collection.',
)
}}
</p>
</gl-modal> </gl-modal>
<gl-button <gl-button
v-gl-modal-directive="modalId" v-gl-modal-directive="modalId"
:variant="buttonVariant" :variant="buttonVariant"
:category="buttonCategory"
:size="buttonSize" :size="buttonSize"
:class="buttonClass" :class="buttonClass"
:disabled="isDeleting || !hasSelectedDesigns" :disabled="isDeleting || !hasSelectedDesigns"
:loading="loading"
:icon="buttonIcon"
> >
<slot></slot> <slot></slot>
</gl-button> </gl-button>
......
...@@ -74,7 +74,7 @@ export default { ...@@ -74,7 +74,7 @@ export default {
deletion: { deletion: {
name: 'file-deletion-solid', name: 'file-deletion-solid',
classes: 'text-danger-500', classes: 'text-danger-500',
tooltip: __('Deleted in this version'), tooltip: __('Archived in this version'),
}, },
}; };
......
<script> <script>
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlButton, GlIcon } from '@gitlab/ui';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
import timeagoMixin from '~/vue_shared/mixins/timeago'; import timeagoMixin from '~/vue_shared/mixins/timeago';
import Pagination from './pagination.vue'; import Pagination from './pagination.vue';
import DeleteButton from '../delete_button.vue'; import DeleteButton from '../delete_button.vue';
...@@ -10,10 +9,10 @@ import { DESIGNS_ROUTE_NAME } from '../../router/constants'; ...@@ -10,10 +9,10 @@ import { DESIGNS_ROUTE_NAME } from '../../router/constants';
export default { export default {
components: { components: {
Icon, GlIcon,
Pagination, Pagination,
DeleteButton, DeleteButton,
GlDeprecatedButton, GlButton,
}, },
mixins: [timeagoMixin], mixins: [timeagoMixin],
props: { props: {
...@@ -92,7 +91,10 @@ export default { ...@@ -92,7 +91,10 @@ export default {
</script> </script>
<template> <template>
<header class="d-flex p-2 bg-white align-items-center js-design-header"> <header
class="gl-display-flex gl-align-items-center gl-justify-content-space-between gl-bg-white gl-py-4 gl-pl-4 js-design-header"
>
<div class="gl-display-flex gl-align-items-center">
<router-link <router-link
:to="{ :to="{
name: $options.DESIGNS_ROUTE_NAME, name: $options.DESIGNS_ROUTE_NAME,
...@@ -100,25 +102,28 @@ export default { ...@@ -100,25 +102,28 @@ export default {
}" }"
:aria-label="s__('DesignManagement|Go back to designs')" :aria-label="s__('DesignManagement|Go back to designs')"
data-testid="close-design" data-testid="close-design"
class="mr-3 text-plain d-flex justify-content-center align-items-center" class="gl-mr-5 gl-display-flex gl-align-items-center gl-justify-content-center text-plain"
> >
<icon :size="18" name="close" /> <gl-icon name="close" />
</router-link> </router-link>
<div class="overflow-hidden d-flex align-items-center"> <div class="overflow-hidden d-flex align-items-center">
<h2 class="m-0 str-truncated-100 gl-font-base">{{ filename }}</h2> <h2 class="m-0 str-truncated-100 gl-font-base">{{ filename }}</h2>
<small v-if="updatedAt" class="text-secondary">{{ updatedText }}</small> <small v-if="updatedAt" class="text-secondary">{{ updatedText }}</small>
</div> </div>
<pagination :id="id" class="ml-auto flex-shrink-0" /> </div>
<gl-deprecated-button :href="image" class="mr-2">
<icon :size="18" name="download" /> <div class="gl-display-flex gl-align-items-center">
</gl-deprecated-button> <pagination :id="id" class="gl-mr-3 gl-flex-shrink-0" />
<gl-button :href="image" icon="download" />
<delete-button <delete-button
v-if="isLatestVersion && canDeleteDesign" v-if="isLatestVersion && canDeleteDesign"
class="gl-ml-3"
:is-deleting="isDeleting" :is-deleting="isDeleting"
button-variant="danger" button-variant="warning"
button-icon="archive"
button-category="secondary"
@deleteSelectedDesigns="$emit('delete')" @deleteSelectedDesigns="$emit('delete')"
> />
<icon :size="18" name="remove" /> </div>
</delete-button>
</header> </header>
</template> </template>
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
<template> <template>
<div v-if="designsCount" class="d-flex align-items-center"> <div v-if="designsCount" class="d-flex align-items-center">
{{ paginationText }} {{ paginationText }}
<div class="btn-group ml-3 mr-3"> <div class="btn-group gl-ml-3">
<pagination-button <pagination-button
:design="previousDesign" :design="previousDesign"
:title="s__('DesignManagement|Go to previous design')" :title="s__('DesignManagement|Go to previous design')"
......
...@@ -327,7 +327,7 @@ export default { ...@@ -327,7 +327,7 @@ export default {
v-if="isLatestVersion" v-if="isLatestVersion"
variant="link" variant="link"
size="small" size="small"
class="gl-mr-2 js-select-all" class="gl-mr-3 js-select-all"
@click="toggleDesignsSelection" @click="toggleDesignsSelection"
>{{ selectAllButtonText }} >{{ selectAllButtonText }}
</gl-button> </gl-button>
...@@ -340,14 +340,15 @@ export default { ...@@ -340,14 +340,15 @@ export default {
<delete-button <delete-button
v-if="isLatestVersion" v-if="isLatestVersion"
:is-deleting="loading" :is-deleting="loading"
button-variant="danger" button-variant="warning"
button-class="gl-mr-4" button-category="secondary"
button-class="gl-mr-3"
button-size="small" button-size="small"
:loading="loading"
:has-selected-designs="hasSelectedDesigns" :has-selected-designs="hasSelectedDesigns"
@deleteSelectedDesigns="mutate()" @deleteSelectedDesigns="mutate()"
> >
{{ s__('DesignManagement|Delete selected') }} {{ s__('DesignManagement|Archive selected') }}
<gl-loading-icon v-if="loading" inline class="ml-1" />
</delete-button> </delete-button>
</design-destroyer> </design-destroyer>
<upload-button v-if="canCreateDesign" :is-saving="isSaving" @upload="onUploadDesign" /> <upload-button v-if="canCreateDesign" :is-saving="isSaving" @upload="onUploadDesign" />
......
...@@ -73,7 +73,7 @@ const someDesignsSkippedMessage = skippedFiles => { ...@@ -73,7 +73,7 @@ const someDesignsSkippedMessage = skippedFiles => {
export const designDeletionError = ({ singular = true } = {}) => { export const designDeletionError = ({ singular = true } = {}) => {
const design = singular ? __('a design') : __('designs'); const design = singular ? __('a design') : __('designs');
return sprintf(s__('Could not delete %{design}. Please try again.'), { return sprintf(s__('Could not archive %{design}. Please try again.'), {
design, design,
}); });
}; };
......
---
title: "Re-name \"Delete\" button to \"Archive\" in Design Management"
merge_request: 38446
author: Getulio Valentin Sánchez @gvso
type: changed
...@@ -3133,6 +3133,9 @@ msgstr "" ...@@ -3133,6 +3133,9 @@ msgstr ""
msgid "Archived" msgid "Archived"
msgstr "" msgstr ""
msgid "Archived in this version"
msgstr ""
msgid "Archived project! Repository and other project resources are read only" msgid "Archived project! Repository and other project resources are read only"
msgstr "" msgstr ""
...@@ -6895,6 +6898,9 @@ msgstr "" ...@@ -6895,6 +6898,9 @@ msgstr ""
msgid "Could not add admins as members" msgid "Could not add admins as members"
msgstr "" msgstr ""
msgid "Could not archive %{design}. Please try again."
msgstr ""
msgid "Could not authorize chat nickname. Try again!" msgid "Could not authorize chat nickname. Try again!"
msgstr "" msgstr ""
...@@ -7893,6 +7899,8 @@ msgstr "" ...@@ -7893,6 +7899,8 @@ msgstr ""
msgid "Deleted chat nickname: %{chat_name}!" msgid "Deleted chat nickname: %{chat_name}!"
msgstr "" msgstr ""
<<<<<<< HEAD
<<<<<<< HEAD
msgid "Deleted in this version" msgid "Deleted in this version"
msgstr "" msgstr ""
...@@ -7902,6 +7910,13 @@ msgstr "" ...@@ -7902,6 +7910,13 @@ msgstr ""
msgid "Deleted projects cannot be restored!" msgid "Deleted projects cannot be restored!"
msgstr "" msgstr ""
=======
>>>>>>> 086fa509029... Use "archive" in design management
=======
msgid "Deleted in this version"
msgstr ""
>>>>>>> 5918a4550f2... Update modal text
msgid "Deleting" msgid "Deleting"
msgstr "" msgstr ""
...@@ -8316,6 +8331,18 @@ msgstr "" ...@@ -8316,6 +8331,18 @@ msgstr ""
msgid "DesignManagement|Adding a design with the same filename replaces the file in a new version." msgid "DesignManagement|Adding a design with the same filename replaces the file in a new version."
msgstr "" msgstr ""
msgid "DesignManagement|Archive designs"
msgstr ""
msgid "DesignManagement|Archive selected"
msgstr ""
msgid "DesignManagement|Archived designs will still be available in previous versions of the design collection."
msgstr ""
msgid "DesignManagement|Are you sure you want to archive the selected designs?"
msgstr ""
msgid "DesignManagement|Are you sure you want to cancel changes to this comment?" msgid "DesignManagement|Are you sure you want to cancel changes to this comment?"
msgstr "" msgstr ""
......
...@@ -8,6 +8,318 @@ exports[`Design management list item component when item appears in view after i ...@@ -8,6 +8,318 @@ exports[`Design management list item component when item appears in view after i
/> />
`; `;
<<<<<<< HEAD
=======
exports[`Design management list item component with no notes renders item with correct status icon for creation event 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item design-list-item-new"
to="[object Object]"
>
<div
class="card-body p-0 d-flex-center overflow-hidden position-relative"
>
<div
class="design-event position-absolute"
>
<span
aria-label="Added in this version"
title="Added in this version"
>
<icon-stub
class="text-success-500"
name="file-addition-solid"
size="18"
/>
</span>
</div>
<gl-intersection-observer-stub>
<!---->
<img
alt="test"
class="block mx-auto mw-100 mh-100 design-img"
data-qa-selector="design_image"
src=""
/>
</gl-intersection-observer-stub>
</div>
<div
class="card-footer d-flex w-100"
>
<div
class="d-flex flex-column str-truncated-100"
>
<span
class="bold str-truncated-100"
data-qa-selector="design_file_name"
>
test
</span>
<span
class="str-truncated-100"
>
Updated
<timeago-stub
cssclass=""
time="01-01-2019"
tooltipplacement="bottom"
/>
</span>
</div>
<!---->
</div>
</router-link-stub>
`;
exports[`Design management list item component with no notes renders item with correct status icon for deletion event 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item design-list-item-new"
to="[object Object]"
>
<div
class="card-body p-0 d-flex-center overflow-hidden position-relative"
>
<div
class="design-event position-absolute"
>
<span
aria-label="Archived in this version"
title="Archived in this version"
>
<icon-stub
class="text-danger-500"
name="file-deletion-solid"
size="18"
/>
</span>
</div>
<gl-intersection-observer-stub>
<!---->
<img
alt="test"
class="block mx-auto mw-100 mh-100 design-img"
data-qa-selector="design_image"
src=""
/>
</gl-intersection-observer-stub>
</div>
<div
class="card-footer d-flex w-100"
>
<div
class="d-flex flex-column str-truncated-100"
>
<span
class="bold str-truncated-100"
data-qa-selector="design_file_name"
>
test
</span>
<span
class="str-truncated-100"
>
Updated
<timeago-stub
cssclass=""
time="01-01-2019"
tooltipplacement="bottom"
/>
</span>
</div>
<!---->
</div>
</router-link-stub>
`;
exports[`Design management list item component with no notes renders item with correct status icon for modification event 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item design-list-item-new"
to="[object Object]"
>
<div
class="card-body p-0 d-flex-center overflow-hidden position-relative"
>
<div
class="design-event position-absolute"
>
<span
aria-label="Modified in this version"
title="Modified in this version"
>
<icon-stub
class="text-primary-500"
name="file-modified-solid"
size="18"
/>
</span>
</div>
<gl-intersection-observer-stub>
<!---->
<img
alt="test"
class="block mx-auto mw-100 mh-100 design-img"
data-qa-selector="design_image"
src=""
/>
</gl-intersection-observer-stub>
</div>
<div
class="card-footer d-flex w-100"
>
<div
class="d-flex flex-column str-truncated-100"
>
<span
class="bold str-truncated-100"
data-qa-selector="design_file_name"
>
test
</span>
<span
class="str-truncated-100"
>
Updated
<timeago-stub
cssclass=""
time="01-01-2019"
tooltipplacement="bottom"
/>
</span>
</div>
<!---->
</div>
</router-link-stub>
`;
exports[`Design management list item component with no notes renders item with no status icon for none event 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item design-list-item-new"
to="[object Object]"
>
<div
class="card-body p-0 d-flex-center overflow-hidden position-relative"
>
<!---->
<gl-intersection-observer-stub>
<!---->
<img
alt="test"
class="block mx-auto mw-100 mh-100 design-img"
data-qa-selector="design_image"
src=""
/>
</gl-intersection-observer-stub>
</div>
<div
class="card-footer d-flex w-100"
>
<div
class="d-flex flex-column str-truncated-100"
>
<span
class="bold str-truncated-100"
data-qa-selector="design_file_name"
>
test
</span>
<span
class="str-truncated-100"
>
Updated
<timeago-stub
cssclass=""
time="01-01-2019"
tooltipplacement="bottom"
/>
</span>
</div>
<!---->
</div>
</router-link-stub>
`;
exports[`Design management list item component with no notes renders loading spinner when isUploading is true 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item design-list-item-new"
to="[object Object]"
>
<div
class="card-body p-0 d-flex-center overflow-hidden position-relative"
>
<!---->
<gl-intersection-observer-stub>
<gl-loading-icon-stub
color="orange"
label="Loading"
size="md"
/>
<img
alt="test"
class="block mx-auto mw-100 mh-100 design-img"
data-qa-selector="design_image"
src=""
style="display: none;"
/>
</gl-intersection-observer-stub>
</div>
<div
class="card-footer d-flex w-100"
>
<div
class="d-flex flex-column str-truncated-100"
>
<span
class="bold str-truncated-100"
data-qa-selector="design_file_name"
>
test
</span>
<span
class="str-truncated-100"
>
Updated
<timeago-stub
cssclass=""
time="01-01-2019"
tooltipplacement="bottom"
/>
</span>
</div>
<!---->
</div>
</router-link-stub>
`;
>>>>>>> 086fa509029... Use "archive" in design management
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 cursor-pointer text-plain js-design-list-item design-list-item design-list-item-new"
......
...@@ -2,16 +2,19 @@ ...@@ -2,16 +2,19 @@
exports[`Design management toolbar component renders design and updated data 1`] = ` exports[`Design management toolbar component renders design and updated data 1`] = `
<header <header
class="d-flex p-2 bg-white align-items-center js-design-header" class="gl-display-flex gl-align-items-center gl-justify-content-space-between gl-bg-white gl-py-4 gl-pl-4 js-design-header"
> >
<div
class="gl-display-flex gl-align-items-center"
>
<a <a
aria-label="Go back to designs" aria-label="Go back to designs"
class="mr-3 text-plain d-flex justify-content-center align-items-center" class="gl-mr-5 gl-display-flex gl-align-items-center gl-justify-content-center text-plain"
data-testid="close-design" data-testid="close-design"
> >
<icon-stub <gl-icon-stub
name="close" name="close"
size="18" size="16"
/> />
</a> </a>
...@@ -30,34 +33,33 @@ exports[`Design management toolbar component renders design and updated data 1`] ...@@ -30,34 +33,33 @@ exports[`Design management toolbar component renders design and updated data 1`]
Updated 1 hour ago by Test Name Updated 1 hour ago by Test Name
</small> </small>
</div> </div>
</div>
<div
class="gl-display-flex gl-align-items-center"
>
<pagination-stub <pagination-stub
class="ml-auto flex-shrink-0" class="gl-mr-3 gl-flex-shrink-0"
id="1" id="1"
/> />
<gl-deprecated-button-stub <gl-button-stub
class="mr-2" category="tertiary"
href="/-/designs/306/7f747adcd4693afadbe968d7ba7d983349b9012d" href="/-/designs/306/7f747adcd4693afadbe968d7ba7d983349b9012d"
size="md" icon="download"
variant="secondary" size="medium"
> variant="default"
<icon-stub
name="download"
size="18"
/> />
</gl-deprecated-button-stub>
<delete-button-stub <delete-button-stub
buttoncategory="secondary"
buttonclass="" buttonclass=""
buttonicon="archive"
buttonsize="medium" buttonsize="medium"
buttonvariant="danger" buttonvariant="warning"
class="gl-ml-3"
hasselecteddesigns="true" hasselecteddesigns="true"
>
<icon-stub
name="remove"
size="18"
/> />
</delete-button-stub> </div>
</header> </header>
`; `;
...@@ -10,7 +10,7 @@ exports[`Design management pagination component renders pagination buttons 1`] = ...@@ -10,7 +10,7 @@ exports[`Design management pagination component renders pagination buttons 1`] =
0 of 2 0 of 2
<div <div
class="btn-group ml-3 mr-3" class="btn-group gl-ml-3"
> >
<pagination-button-stub <pagination-button-stub
class="js-previous-design" class="js-previous-design"
......
...@@ -3,7 +3,7 @@ import VueRouter from 'vue-router'; ...@@ -3,7 +3,7 @@ import VueRouter from 'vue-router';
import Toolbar from '~/design_management/components/toolbar/index.vue'; import Toolbar from '~/design_management/components/toolbar/index.vue';
import DeleteButton from '~/design_management/components/delete_button.vue'; import DeleteButton from '~/design_management/components/delete_button.vue';
import { DESIGNS_ROUTE_NAME } from '~/design_management/router/constants'; import { DESIGNS_ROUTE_NAME } from '~/design_management/router/constants';
import { GlDeprecatedButton } from '@gitlab/ui'; import { GlButton } from '@gitlab/ui';
const localVue = createLocalVue(); const localVue = createLocalVue();
localVue.use(VueRouter); localVue.use(VueRouter);
...@@ -116,7 +116,7 @@ describe('Design management toolbar component', () => { ...@@ -116,7 +116,7 @@ describe('Design management toolbar component', () => {
}); });
it('renders download button with correct link', () => { it('renders download button with correct link', () => {
expect(wrapper.find(GlDeprecatedButton).attributes('href')).toBe( expect(wrapper.find(GlButton).attributes('href')).toBe(
'/-/designs/306/7f747adcd4693afadbe968d7ba7d983349b9012d', '/-/designs/306/7f747adcd4693afadbe968d7ba7d983349b9012d',
); );
}); });
......
...@@ -111,7 +111,7 @@ exports[`Design management index page designs renders designs list and header wi ...@@ -111,7 +111,7 @@ exports[`Design management index page designs renders designs list and header wi
> >
<gl-button-stub <gl-button-stub
category="tertiary" category="tertiary"
class="gl-mr-2 js-select-all" class="gl-mr-3 js-select-all"
icon="" icon=""
size="small" size="small"
variant="link" variant="link"
...@@ -122,14 +122,14 @@ exports[`Design management index page designs renders designs list and header wi ...@@ -122,14 +122,14 @@ exports[`Design management index page designs renders designs list and header wi
<div> <div>
<delete-button-stub <delete-button-stub
buttonclass="gl-mr-4" buttoncategory="secondary"
buttonclass="gl-mr-3"
buttonsize="small" buttonsize="small"
buttonvariant="danger" buttonvariant="warning"
> >
Delete selected Archive selected
<!---->
</delete-button-stub> </delete-button-stub>
</div> </div>
......
...@@ -10,8 +10,8 @@ const mockFilenames = n => ...@@ -10,8 +10,8 @@ const mockFilenames = n =>
describe('Error message', () => { describe('Error message', () => {
describe('designDeletionError', () => { describe('designDeletionError', () => {
const singularMsg = 'Could not delete a design. Please try again.'; const singularMsg = 'Could not archive a design. Please try again.';
const pluralMsg = 'Could not delete designs. Please try again.'; const pluralMsg = 'Could not archive designs. Please try again.';
describe('when [singular=true]', () => { describe('when [singular=true]', () => {
it.each([[undefined], [true]])('uses singular grammar', singularOption => { it.each([[undefined], [true]])('uses singular grammar', singularOption => {
......
...@@ -8,6 +8,318 @@ exports[`Design management list item component when item appears in view after i ...@@ -8,6 +8,318 @@ exports[`Design management list item component when item appears in view after i
/> />
`; `;
<<<<<<< HEAD
=======
exports[`Design management list item component with no notes renders item with correct status icon for creation event 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item"
to="[object Object]"
>
<div
class="card-body p-0 d-flex-center overflow-hidden position-relative"
>
<div
class="design-event position-absolute"
>
<span
aria-label="Added in this version"
title="Added in this version"
>
<icon-stub
class="text-success-500"
name="file-addition-solid"
size="18"
/>
</span>
</div>
<gl-intersection-observer-stub>
<!---->
<img
alt="test"
class="block mx-auto mw-100 mh-100 design-img"
data-qa-selector="design_image"
src=""
/>
</gl-intersection-observer-stub>
</div>
<div
class="card-footer d-flex w-100"
>
<div
class="d-flex flex-column str-truncated-100"
>
<span
class="bold str-truncated-100"
data-qa-selector="design_file_name"
>
test
</span>
<span
class="str-truncated-100"
>
Updated
<timeago-stub
cssclass=""
time="01-01-2019"
tooltipplacement="bottom"
/>
</span>
</div>
<!---->
</div>
</router-link-stub>
`;
exports[`Design management list item component with no notes renders item with correct status icon for deletion event 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item"
to="[object Object]"
>
<div
class="card-body p-0 d-flex-center overflow-hidden position-relative"
>
<div
class="design-event position-absolute"
>
<span
aria-label="Deleted in this version"
title="Deleted in this version"
>
<icon-stub
class="text-danger-500"
name="file-deletion-solid"
size="18"
/>
</span>
</div>
<gl-intersection-observer-stub>
<!---->
<img
alt="test"
class="block mx-auto mw-100 mh-100 design-img"
data-qa-selector="design_image"
src=""
/>
</gl-intersection-observer-stub>
</div>
<div
class="card-footer d-flex w-100"
>
<div
class="d-flex flex-column str-truncated-100"
>
<span
class="bold str-truncated-100"
data-qa-selector="design_file_name"
>
test
</span>
<span
class="str-truncated-100"
>
Updated
<timeago-stub
cssclass=""
time="01-01-2019"
tooltipplacement="bottom"
/>
</span>
</div>
<!---->
</div>
</router-link-stub>
`;
exports[`Design management list item component with no notes renders item with correct status icon for modification event 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item"
to="[object Object]"
>
<div
class="card-body p-0 d-flex-center overflow-hidden position-relative"
>
<div
class="design-event position-absolute"
>
<span
aria-label="Modified in this version"
title="Modified in this version"
>
<icon-stub
class="text-primary-500"
name="file-modified-solid"
size="18"
/>
</span>
</div>
<gl-intersection-observer-stub>
<!---->
<img
alt="test"
class="block mx-auto mw-100 mh-100 design-img"
data-qa-selector="design_image"
src=""
/>
</gl-intersection-observer-stub>
</div>
<div
class="card-footer d-flex w-100"
>
<div
class="d-flex flex-column str-truncated-100"
>
<span
class="bold str-truncated-100"
data-qa-selector="design_file_name"
>
test
</span>
<span
class="str-truncated-100"
>
Updated
<timeago-stub
cssclass=""
time="01-01-2019"
tooltipplacement="bottom"
/>
</span>
</div>
<!---->
</div>
</router-link-stub>
`;
exports[`Design management list item component with no notes renders item with no status icon for none event 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item"
to="[object Object]"
>
<div
class="card-body p-0 d-flex-center overflow-hidden position-relative"
>
<!---->
<gl-intersection-observer-stub>
<!---->
<img
alt="test"
class="block mx-auto mw-100 mh-100 design-img"
data-qa-selector="design_image"
src=""
/>
</gl-intersection-observer-stub>
</div>
<div
class="card-footer d-flex w-100"
>
<div
class="d-flex flex-column str-truncated-100"
>
<span
class="bold str-truncated-100"
data-qa-selector="design_file_name"
>
test
</span>
<span
class="str-truncated-100"
>
Updated
<timeago-stub
cssclass=""
time="01-01-2019"
tooltipplacement="bottom"
/>
</span>
</div>
<!---->
</div>
</router-link-stub>
`;
exports[`Design management list item component with no notes renders loading spinner when isUploading is true 1`] = `
<router-link-stub
class="card cursor-pointer text-plain js-design-list-item design-list-item"
to="[object Object]"
>
<div
class="card-body p-0 d-flex-center overflow-hidden position-relative"
>
<!---->
<gl-intersection-observer-stub>
<gl-loading-icon-stub
color="orange"
label="Loading"
size="md"
/>
<img
alt="test"
class="block mx-auto mw-100 mh-100 design-img"
data-qa-selector="design_image"
src=""
style="display: none;"
/>
</gl-intersection-observer-stub>
</div>
<div
class="card-footer d-flex w-100"
>
<div
class="d-flex flex-column str-truncated-100"
>
<span
class="bold str-truncated-100"
data-qa-selector="design_file_name"
>
test
</span>
<span
class="str-truncated-100"
>
Updated
<timeago-stub
cssclass=""
time="01-01-2019"
tooltipplacement="bottom"
/>
</span>
</div>
<!---->
</div>
</router-link-stub>
`;
>>>>>>> 086fa509029... Use "archive" in design management
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" class="card cursor-pointer text-plain js-design-list-item design-list-item"
......
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