Commit e4e69acb authored by Kushal Pandya's avatar Kushal Pandya

Merge branch '208936' into 'master'

Update table layout for mobile - tablet view-ports

See merge request gitlab-org/gitlab!26479
parents 039c93ab fb2e069a
...@@ -20,7 +20,7 @@ import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue'; ...@@ -20,7 +20,7 @@ import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue';
import { __ } from '~/locale'; import { __ } from '~/locale';
import { isEmpty } from 'lodash'; import { isEmpty } from 'lodash';
export const tableDataClass = 'table-col d-flex d-sm-table-cell align-items-center'; export const tableDataClass = 'table-col d-flex d-md-table-cell align-items-center';
export default { export default {
FIRST_PAGE: 1, FIRST_PAGE: 1,
...@@ -35,7 +35,7 @@ export default { ...@@ -35,7 +35,7 @@ export default {
key: 'error', key: 'error',
label: __('Error'), label: __('Error'),
thClass: 'w-60p', thClass: 'w-60p',
tdClass: `${tableDataClass} px-3`, tdClass: `${tableDataClass} px-3 rounded-top`,
}, },
{ {
key: 'events', key: 'events',
...@@ -58,11 +58,11 @@ export default { ...@@ -58,11 +58,11 @@ export default {
{ {
key: 'status', key: 'status',
label: '', label: '',
tdClass: `${tableDataClass} text-center`, tdClass: `table-col d-none d-md-table-cell align-items-center pl-md-0`,
}, },
{ {
key: 'details', key: 'details',
tdClass: 'table-col d-sm-none d-flex align-items-center', tdClass: 'table-col d-md-none d-flex align-items-center rounded-bottom bg-secondary',
thClass: 'invisible w-0', thClass: 'invisible w-0',
}, },
], ],
...@@ -221,7 +221,7 @@ export default { ...@@ -221,7 +221,7 @@ export default {
<div class="error-list"> <div class="error-list">
<div v-if="errorTrackingEnabled"> <div v-if="errorTrackingEnabled">
<div class="row flex-column flex-sm-row align-items-sm-center row-top m-0 mt-sm-2 p-0 p-sm-3"> <div class="row flex-column flex-sm-row align-items-sm-center row-top m-0 mt-sm-2 p-0 p-sm-3">
<div class="search-box flex-fill mr-sm-2 my-3 m-sm-0 p-3 p-sm-0"> <div class="search-box flex-fill mr-sm-2 my-3 m-sm-0 p-3 p-sm-0 bg-secondary">
<div class="filtered-search-box mb-0"> <div class="filtered-search-box mb-0">
<gl-dropdown <gl-dropdown
:text="__('Recent searches')" :text="__('Recent searches')"
...@@ -321,25 +321,25 @@ export default { ...@@ -321,25 +321,25 @@ export default {
</div> </div>
<template v-else> <template v-else>
<h4 class="d-block d-sm-none my-3">{{ __('Open errors') }}</h4> <h4 class="d-block d-md-none my-3">{{ __('Open errors') }}</h4>
<gl-table <gl-table
class="mt-3" class="error-list-table mt-3"
:items="errors" :items="errors"
:fields="$options.fields" :fields="$options.fields"
:show-empty="true" :show-empty="true"
fixed fixed
stacked="sm" stacked="md"
tbody-tr-class="table-row mb-4" tbody-tr-class="table-row mb-4"
> >
<template #head(error)> <template #head(error)>
<div class="d-none d-sm-block">{{ __('Open errors') }}</div> <div class="d-none d-md-block">{{ __('Open errors') }}</div>
</template> </template>
<template #head(events)="data"> <template #head(events)="data">
<div class="text-sm-right">{{ data.label }}</div> <div class="text-md-right">{{ data.label }}</div>
</template> </template>
<template #head(users)="data"> <template #head(users)="data">
<div class="text-sm-right">{{ data.label }}</div> <div class="text-md-right">{{ data.label }}</div>
</template> </template>
<template #cell(error)="errors"> <template #cell(error)="errors">
...@@ -361,7 +361,7 @@ export default { ...@@ -361,7 +361,7 @@ export default {
</template> </template>
<template #cell(lastSeen)="errors"> <template #cell(lastSeen)="errors">
<div class="text-md-left text-right"> <div class="text-lg-left text-right">
<time-ago :time="errors.item.lastSeen" class="text-secondary" /> <time-ago :time="errors.item.lastSeen" class="text-secondary" />
</div> </div>
</template> </template>
...@@ -380,10 +380,29 @@ export default { ...@@ -380,10 +380,29 @@ export default {
</gl-button-group> </gl-button-group>
</template> </template>
<template #cell(details)="errors"> <template #cell(details)="errors">
<gl-button
category="primary"
variant="info"
block
class="mb-1 mt-2"
@click="updateIssueStatus(errors.item.id, 'resolved')"
>
{{ __('Resolve') }}
</gl-button>
<gl-button
category="secondary"
variant="default"
block
class="mb-2"
@click="updateIssueStatus(errors.item.id, 'ignored')"
>
{{ __('Ignore') }}
</gl-button>
<gl-button <gl-button
:href="getDetailsLink(errors.item.id)" :href="getDetailsLink(errors.item.id)"
variant="outline-info" category="secondary"
class="d-block" variant="info"
class="d-block mb-2"
> >
{{ __('More details') }} {{ __('More details') }}
</gl-button> </gl-button>
......
...@@ -20,47 +20,19 @@ $gray-border: 1px solid $border-color; ...@@ -20,47 +20,19 @@ $gray-border: 1px solid $border-color;
} }
} }
@include media-breakpoint-down(xs) { @include media-breakpoint-down(md) {
.table-row { .error-list-table {
border: $gray-border; .table-col {
border-radius: 4px; min-height: 68px;
}
&:last-child {
.search-box { &::before {
border-top: $gray-border; content: none !important;
border-bottom: $gray-border; }
background-color: $gray-50;
}
.table-col {
min-height: 68px;
&::before {
text-align: left !important;
}
&:first-child {
div {
padding: 0 !important;
align-items: flex-end;
}
}
&:last-child {
height: 64px;
background-color: $gray-normal;
&::before {
content: none !important;
}
div {
width: 100% !important;
padding: 0 !important;
a { div {
color: $blue-500; width: 100% !important;
border-color: $blue-500; padding: 0 !important;
} }
} }
} }
......
---
title: update table layout for error tracking list on medium view ports
merge_request: 26479
author:
type: other
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