Commit 60d1d770 authored by Tom Quirk's avatar Tom Quirk

Use smaller design image for design list item

parent 99842868
...@@ -43,6 +43,11 @@ export default { ...@@ -43,6 +43,11 @@ export default {
required: false, required: false,
default: true, default: true,
}, },
imageV432x230: {
type: String,
required: false,
default: null,
},
}, },
data() { data() {
return { return {
...@@ -80,7 +85,7 @@ export default { ...@@ -80,7 +85,7 @@ export default {
return this.imageLoading || this.isUploading; return this.imageLoading || this.isUploading;
}, },
imageLink() { imageLink() {
return this.isInView ? this.image : ''; return this.isInView ? this.imageV432x230 || this.image : '';
}, },
}, },
methods: { methods: {
......
...@@ -4,4 +4,5 @@ fragment DesignListItem on Design { ...@@ -4,4 +4,5 @@ fragment DesignListItem on Design {
event event
filename filename
notesCount notesCount
imageV432x230
} }
...@@ -53,6 +53,7 @@ export const designUploadOptimisticResponse = files => { ...@@ -53,6 +53,7 @@ export const designUploadOptimisticResponse = files => {
__typename: 'Design', __typename: 'Design',
id: -uniqueId(), id: -uniqueId(),
image: '', image: '',
imageV432x230: '',
filename: file.name, filename: file.name,
fullPath: '', fullPath: '',
notesCount: 0, notesCount: 0,
......
---
title: "Prefer smaller image size for design cards in Design Management"
merge_request: 24828
author:
type: added
...@@ -197,6 +197,7 @@ describe('Design management index page', () => { ...@@ -197,6 +197,7 @@ describe('Design management index page', () => {
__typename: 'Design', __typename: 'Design',
id: expect.anything(), id: expect.anything(),
image: '', image: '',
imageV432x230: '',
filename: 'test', filename: 'test',
fullPath: '', fullPath: '',
event: 'NONE', event: 'NONE',
......
...@@ -85,6 +85,7 @@ describe('optimistic responses', () => { ...@@ -85,6 +85,7 @@ describe('optimistic responses', () => {
__typename: 'Design', __typename: 'Design',
id: -1, id: -1,
image: '', image: '',
imageV432x230: '',
filename: 'test', filename: 'test',
fullPath: '', fullPath: '',
notesCount: 0, notesCount: 0,
......
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