Commit f38f9843 authored by Jarek Ostrowski's avatar Jarek Ostrowski Committed by Natalia Tepluhina

Adjust image notes formatting

Add h-100 to image notes
Give right margin to pagination buttons
Run jest
parent 0649b71b
---
title: Smaller width for design comments layout, truncate image title
merge_request: 17547
author:
type: fixed
...@@ -87,22 +87,22 @@ export default { ...@@ -87,22 +87,22 @@ export default {
</script> </script>
<template> <template>
<header class="d-flex w-100 p-2 bg-white align-items-center js-design-header"> <header class="d-flex p-2 bg-white align-items-center js-design-header">
<router-link <router-link
:to="{ :to="{
name: 'designs', name: 'designs',
query: $route.query, query: $route.query,
}" }"
:aria-label="s__('DesignManagement|Go back to designs')" :aria-label="s__('DesignManagement|Go back to designs')"
class="mr-3 text-plain" class="mr-3 text-plain d-flex justify-content-center align-items-center"
> >
<icon :size="18" name="close" /> <icon :size="18" name="close" />
</router-link> </router-link>
<div> <div class="overflow-hidden d-flex align-items-center">
<h2 class="m-0">{{ name }}</h2> <h2 class="m-0 str-truncated-100">{{ name }}</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" /> <pagination :id="id" class="ml-auto flex-shrink-0" />
<delete-button <delete-button
v-if="isLatestVersion && canDeleteDesign" v-if="isLatestVersion && canDeleteDesign"
:is-deleting="isDeleting" :is-deleting="isDeleting"
......
...@@ -46,7 +46,7 @@ export default { ...@@ -46,7 +46,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"> <div class="btn-group ml-3 mr-3">
<pagination-button <pagination-button
:design="previousDesign" :design="previousDesign"
:title="s__('DesignManagement|Go to previous design')" :title="s__('DesignManagement|Go to previous design')"
......
...@@ -192,10 +192,12 @@ export default { ...@@ -192,10 +192,12 @@ export default {
</script> </script>
<template> <template>
<div class="design-detail fixed-top w-100 position-bottom-0 d-sm-flex justify-content-center"> <div
class="design-detail fixed-top w-100 position-bottom-0 d-flex justify-content-center flex-column flex-lg-row"
>
<gl-loading-icon v-if="isLoading" size="xl" class="align-self-center" /> <gl-loading-icon v-if="isLoading" size="xl" class="align-self-center" />
<template v-else> <template v-else>
<div class="d-flex flex-column w-100"> <div class="d-flex overflow-hidden flex-lg-grow-1 flex-column">
<design-destroyer <design-destroyer
:filenames="[design.filename]" :filenames="[design.filename]"
:project-path="projectPath" :project-path="projectPath"
...@@ -215,7 +217,7 @@ export default { ...@@ -215,7 +217,7 @@ export default {
/> />
</template> </template>
</design-destroyer> </design-destroyer>
<div class="d-flex flex-column w-100 h-100 mh-100 position-relative"> <div class="d-flex flex-column h-100 mh-100 position-relative">
<design-image <design-image
:image="design.image" :image="design.image"
:name="design.filename" :name="design.filename"
......
...@@ -2,10 +2,6 @@ ...@@ -2,10 +2,6 @@
object-fit: contain; object-fit: contain;
} }
.design-detail {
overflow-y: scroll;
}
.design-list-item .design-event { .design-list-item .design-event {
top: $gl-padding; top: $gl-padding;
right: $gl-padding; right: $gl-padding;
...@@ -22,7 +18,9 @@ ...@@ -22,7 +18,9 @@
padding: 0 $gl-padding; padding: 0 $gl-padding;
padding-top: 50px; padding-top: 50px;
background-color: $white-light; background-color: $white-light;
flex-shrink: 0;
min-width: 400px; min-width: 400px;
flex-basis: 28%;
li { li {
list-style: none; list-style: none;
...@@ -74,7 +72,7 @@ ...@@ -74,7 +72,7 @@
} }
} }
@media (max-width: map-get($grid-breakpoints, sm)) { @media (max-width: map-get($grid-breakpoints, lg)) {
.design-detail { .design-detail {
overflow-y: scroll; overflow-y: scroll;
} }
...@@ -82,5 +80,7 @@ ...@@ -82,5 +80,7 @@
.image-notes { .image-notes {
overflow-y: auto; overflow-y: auto;
min-width: 100%; min-width: 100%;
flex-grow: 1;
flex-basis: auto;
} }
} }
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
h2 { h2 {
font-size: 14px; font-size: 14px;
line-height: 1;
} }
} }
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
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 w-100 p-2 bg-white align-items-center js-design-header" class="d-flex p-2 bg-white align-items-center js-design-header"
> >
<a <a
aria-label="Go back to designs" aria-label="Go back to designs"
class="mr-3 text-plain" class="mr-3 text-plain d-flex justify-content-center align-items-center"
> >
<icon-stub <icon-stub
name="close" name="close"
...@@ -14,9 +14,11 @@ exports[`Design management toolbar component renders design and updated data 1`] ...@@ -14,9 +14,11 @@ exports[`Design management toolbar component renders design and updated data 1`]
/> />
</a> </a>
<div> <div
class="overflow-hidden d-flex align-items-center"
>
<h2 <h2
class="m-0" class="m-0 str-truncated-100"
> >
test.jpg test.jpg
</h2> </h2>
...@@ -29,7 +31,7 @@ exports[`Design management toolbar component renders design and updated data 1`] ...@@ -29,7 +31,7 @@ exports[`Design management toolbar component renders design and updated data 1`]
</div> </div>
<pagination-stub <pagination-stub
class="ml-auto" class="ml-auto flex-shrink-0"
id="1" id="1"
/> />
......
...@@ -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" class="btn-group ml-3 mr-3"
> >
<paginationbutton-stub <paginationbutton-stub
class="js-previous-design" class="js-previous-design"
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
exports[`Design management design index page renders design index 1`] = ` exports[`Design management design index page renders design index 1`] = `
<div <div
class="design-detail fixed-top w-100 position-bottom-0 d-sm-flex justify-content-center" class="design-detail fixed-top w-100 position-bottom-0 d-flex justify-content-center flex-column flex-lg-row"
> >
<glloadingicon-stub <glloadingicon-stub
class="align-self-center" class="align-self-center"
...@@ -15,7 +15,7 @@ exports[`Design management design index page renders design index 1`] = ` ...@@ -15,7 +15,7 @@ exports[`Design management design index page renders design index 1`] = `
exports[`Design management design index page sets loading state 1`] = ` exports[`Design management design index page sets loading state 1`] = `
<div <div
class="design-detail fixed-top w-100 position-bottom-0 d-sm-flex justify-content-center" class="design-detail fixed-top w-100 position-bottom-0 d-flex justify-content-center flex-column flex-lg-row"
> >
<glloadingicon-stub <glloadingicon-stub
class="align-self-center" class="align-self-center"
......
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