Resolve "Performance bar Gitaly modal is hard to read"

This commit is contained in:
Annabel Gray 2018-06-14 16:34:58 +00:00 committed by Clement Ho
parent b3969ed23c
commit 4d098451c3
7 changed files with 20 additions and 12 deletions

View file

@ -56,7 +56,7 @@ export default {
<gl-modal
:id="`modal-peek-${metric}-details`"
:header-title-text="header"
modal-size="lg"
modal-size="xl"
class="performance-bar-modal"
>
<table
@ -71,7 +71,7 @@ export default {
<td
v-for="key in keys"
:key="key"
class="break-word all-words"
class="break-word"
>
{{ item[key] }}
</td>

View file

@ -1,6 +1,6 @@
<script>
const buttonVariants = ['danger', 'primary', 'success', 'warning'];
const sizeVariants = ['sm', 'md', 'lg'];
const sizeVariants = ['sm', 'md', 'lg', 'xl'];
export default {
name: 'GlModal',

View file

@ -440,10 +440,6 @@ img.emoji {
.break-word {
word-wrap: break-word;
&.all-words {
word-break: break-word;
}
}
/** COMMON CLASSES **/

View file

@ -1,3 +1,7 @@
.modal-xl {
max-width: 98%;
}
.modal-header {
background-color: $modal-body-bg;

View file

@ -107,12 +107,12 @@
}
.performance-bar-modal {
.modal-footer {
display: none;
.modal-body {
padding: 0;
}
.modal-dialog {
width: 860px;
.modal-footer {
display: none;
}
}
}

View file

@ -41,7 +41,7 @@ module Peek
]
end.sort_by{ |a,b,c,d,e,f| -f }
output = "<div class='modal-dialog modal-lg'><div class='modal-content'>"
output = "<div class='modal-dialog modal-xl'><div class='modal-content'>"
output << "<div class='modal-header'>"
output << "<h4>Line profiling: #{human_description(params[:lineprofiler])}</h4>"
output << "<button class='close' type='button' data-dismiss='modal' aria-label='close'><span aria-hidden='true'>&times;</span></button>"

View file

@ -208,6 +208,14 @@ describe('GlModal', () => {
expect(vm.$el.querySelector('.modal-dialog').classList.contains('modal-lg')).toEqual(true);
});
it('should render modal-xl', () => {
vm = mountComponent(modalComponent, {
modalSize: 'xl',
});
expect(vm.$el.querySelector('.modal-dialog').classList.contains('modal-xl')).toEqual(true);
});
it('should not add modal size classes when md size is passed', () => {
vm = mountComponent(modalComponent, {
modalSize: 'md',