Commit ed15779a authored by Paul Slaughter's avatar Paul Slaughter

Merge branch 'andr3-design-management-avoid-distorted-images' into 'master'

Make thumbnails in design lists not distorted

See merge request gitlab-org/gitlab-ee!14670
parents 60d6eb18 e4f2f561
...@@ -16,7 +16,7 @@ export default { ...@@ -16,7 +16,7 @@ export default {
<template> <template>
<ol class="list-unstyled row"> <ol class="list-unstyled row">
<li v-for="design in designs" :key="design.id" class="col-md-6 col-lg-4"> <li v-for="design in designs" :key="design.id" class="col-md-6 col-lg-4 mb-3">
<design <design
:id="design.id" :id="design.id"
:comments-count="design.commentsCount" :comments-count="design.commentsCount"
......
...@@ -45,8 +45,8 @@ export default { ...@@ -45,8 +45,8 @@ export default {
:to="{ name: 'design', params: { id: name } }" :to="{ name: 'design', params: { id: name } }"
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"
> >
<div class="card-body p-0"> <div class="card-body p-0 d-flex align-items-center overflow-hidden">
<img :src="image" :alt="name" class="block ml-auto mr-auto mw-100 design-img" height="230" /> <img :src="image" :alt="name" class="block ml-auto mr-auto mw-100 mh-100 design-img" />
</div> </div>
<div class="card-footer d-flex w-100"> <div class="card-footer d-flex w-100">
<div class="d-flex flex-column str-truncated-100"> <div class="d-flex flex-column str-truncated-100">
......
...@@ -10,3 +10,9 @@ ...@@ -10,3 +10,9 @@
line-height: 1; line-height: 1;
} }
} }
.design-list-item {
.card-body {
height: 230px;
}
}
---
title: Avoid Design Management thumbnails from being distorted/stretched
merge_request: 14670
author:
type: fixed
...@@ -5,7 +5,7 @@ exports[`Design management list component renders list 1`] = ` ...@@ -5,7 +5,7 @@ exports[`Design management list component renders list 1`] = `
class="list-unstyled row" class="list-unstyled row"
> >
<li <li
class="col-md-6 col-lg-4" class="col-md-6 col-lg-4 mb-3"
> >
<design-stub <design-stub
commentscount="2" commentscount="2"
...@@ -16,7 +16,7 @@ exports[`Design management list component renders list 1`] = ` ...@@ -16,7 +16,7 @@ exports[`Design management list component renders list 1`] = `
/> />
</li> </li>
<li <li
class="col-md-6 col-lg-4" class="col-md-6 col-lg-4 mb-3"
> >
<design-stub <design-stub
commentscount="2" commentscount="2"
......
...@@ -6,12 +6,11 @@ exports[`Design management list item component hides comment count 1`] = ` ...@@ -6,12 +6,11 @@ exports[`Design management list item component hides comment count 1`] = `
to="[object Object]" to="[object Object]"
> >
<div <div
class="card-body p-0" class="card-body p-0 d-flex align-items-center overflow-hidden"
> >
<img <img
alt="test" alt="test"
class="block ml-auto mr-auto mw-100 design-img" class="block ml-auto mr-auto mw-100 mh-100 design-img"
height="230"
src="http://via.placeholder.com/300" src="http://via.placeholder.com/300"
/> />
</div> </div>
...@@ -52,12 +51,11 @@ exports[`Design management list item component renders item with multiple commen ...@@ -52,12 +51,11 @@ exports[`Design management list item component renders item with multiple commen
to="[object Object]" to="[object Object]"
> >
<div <div
class="card-body p-0" class="card-body p-0 d-flex align-items-center overflow-hidden"
> >
<img <img
alt="test" alt="test"
class="block ml-auto mr-auto mw-100 design-img" class="block ml-auto mr-auto mw-100 mh-100 design-img"
height="230"
src="http://via.placeholder.com/300" src="http://via.placeholder.com/300"
/> />
</div> </div>
...@@ -116,12 +114,11 @@ exports[`Design management list item component renders item with single comment ...@@ -116,12 +114,11 @@ exports[`Design management list item component renders item with single comment
to="[object Object]" to="[object Object]"
> >
<div <div
class="card-body p-0" class="card-body p-0 d-flex align-items-center overflow-hidden"
> >
<img <img
alt="test" alt="test"
class="block ml-auto mr-auto mw-100 design-img" class="block ml-auto mr-auto mw-100 mh-100 design-img"
height="230"
src="http://via.placeholder.com/300" src="http://via.placeholder.com/300"
/> />
</div> </div>
......
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