Commit c647d1ab authored by Jeremy Elder's avatar Jeremy Elder Committed by Kushal Pandya

Audit and update buttons on Projects::JobsController#show

parent 3c0902c7
<script> <script>
/* eslint-disable vue/no-v-html */
import { GlTooltipDirective, GlLink, GlButton } from '@gitlab/ui'; import { GlTooltipDirective, GlLink, GlButton } from '@gitlab/ui';
import { numberToHumanSize } from '~/lib/utils/number_utils'; import { numberToHumanSize } from '~/lib/utils/number_utils';
import { __, sprintf } from '~/locale'; import { __, sprintf } from '~/locale';
import scrollDown from '../svg/scroll_down.svg';
export default { export default {
components: { components: {
...@@ -13,7 +11,6 @@ export default { ...@@ -13,7 +11,6 @@ export default {
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
}, },
scrollDown,
props: { props: {
erasePath: { erasePath: {
type: String, type: String,
...@@ -87,7 +84,6 @@ export default { ...@@ -87,7 +84,6 @@ export default {
v-gl-tooltip.body v-gl-tooltip.body
:title="s__('Job|Show complete raw')" :title="s__('Job|Show complete raw')"
:href="rawPath" :href="rawPath"
class="controllers-buttons"
data-testid="job-raw-link-controller" data-testid="job-raw-link-controller"
icon="doc-text" icon="doc-text"
/> />
...@@ -98,7 +94,7 @@ export default { ...@@ -98,7 +94,7 @@ export default {
:title="s__('Job|Erase job log')" :title="s__('Job|Erase job log')"
:href="erasePath" :href="erasePath"
:data-confirm="__('Are you sure you want to erase this build?')" :data-confirm="__('Are you sure you want to erase this build?')"
class="controllers-buttons" class="gl-ml-3"
data-testid="job-log-erase-link" data-testid="job-log-erase-link"
data-method="post" data-method="post"
icon="remove" icon="remove"
...@@ -106,25 +102,24 @@ export default { ...@@ -106,25 +102,24 @@ export default {
<!-- eo links --> <!-- eo links -->
<!-- scroll buttons --> <!-- scroll buttons -->
<div v-gl-tooltip :title="s__('Job|Scroll to top')" class="controllers-buttons"> <div v-gl-tooltip :title="s__('Job|Scroll to top')" class="gl-ml-3">
<gl-button <gl-button
:disabled="isScrollTopDisabled" :disabled="isScrollTopDisabled"
class="btn-scroll btn-transparent btn-blank" class="btn-scroll"
data-testid="job-controller-scroll-top" data-testid="job-controller-scroll-top"
icon="scroll_up" icon="scroll_up"
@click="handleScrollToTop" @click="handleScrollToTop"
/> />
</div> </div>
<div v-gl-tooltip :title="s__('Job|Scroll to bottom')" class="controllers-buttons"> <div v-gl-tooltip :title="s__('Job|Scroll to bottom')" class="gl-ml-3">
<gl-button <gl-button
:disabled="isScrollBottomDisabled" :disabled="isScrollBottomDisabled"
class="js-scroll-bottom btn-scroll btn-transparent btn-blank" class="js-scroll-bottom btn-scroll"
data-testid="job-controller-scroll-bottom" data-testid="job-controller-scroll-bottom"
icon="scroll_down" icon="scroll_down"
:class="{ animate: isScrollingDown }" :class="{ animate: isScrollingDown }"
@click="handleScrollToBottom" @click="handleScrollToBottom"
v-html="$options.scrollDown"
/> />
</div> </div>
<!-- eo scroll buttons --> <!-- eo scroll buttons -->
......
...@@ -36,10 +36,10 @@ export default { ...@@ -36,10 +36,10 @@ export default {
v-gl-modal="modalId" v-gl-modal="modalId"
:aria-label="$options.i18n.retryLabel" :aria-label="$options.i18n.retryLabel"
category="primary" category="primary"
variant="info" variant="confirm"
>{{ $options.i18n.retryLabel }}</gl-button >{{ $options.i18n.retryLabel }}</gl-button
> >
<gl-link v-else :href="href" data-method="post" rel="nofollow" <gl-link v-else :href="href" class="btn gl-button btn-confirm" data-method="post" rel="nofollow"
>{{ $options.i18n.retryLabel }} >{{ $options.i18n.retryLabel }}
</gl-link> </gl-link>
</template> </template>
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path class="scroll-arrow" d="M8 10.4142L4.29289 6.70711C3.90237 6.31658 3.90237 5.68342 4.29289 5.2929C4.68342 4.90237 5.31658 4.90237 5.70711 5.2929L7 6.58579L7 1C7 0.447715 7.44772 0 8 0C8.55229 0 9 0.447715 9 1L9 6.58579L10.2929 5.2929C10.6834 4.90237 11.3166 4.90237 11.7071 5.2929C12.0976 5.68342 12.0976 6.31658 11.7071 6.70711L8 10.4142Z"/>
<path class="scroll-dot" d="M8 16C9.10457 16 10 15.1046 10 14C10 12.8954 9.10457 12 8 12C6.89543 12 6 12.8954 6 14C6 15.1046 6.89543 16 8 16Z"/>
</svg>
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
data-qa-selector="pipeline_header" data-qa-selector="pipeline_header"
data-testid="ci-header-content" data-testid="ci-header-content"
> >
<section class="header-main-content"> <section class="header-main-content gl-mr-3">
<ci-icon-badge :status="status" /> <ci-icon-badge :status="status" />
<strong data-testid="ci-header-item-text"> {{ itemName }} #{{ itemId }} </strong> <strong data-testid="ci-header-item-text"> {{ itemName }} #{{ itemId }} </strong>
...@@ -142,12 +142,16 @@ export default { ...@@ -142,12 +142,16 @@ export default {
</template> </template>
</section> </section>
<section v-if="$slots.default" data-testid="ci-header-action-buttons" class="gl-display-flex"> <section
v-if="$slots.default"
data-testid="ci-header-action-buttons"
class="gl-display-flex gl-mr-3"
>
<slot></slot> <slot></slot>
</section> </section>
<gl-button <gl-button
v-if="hasSidebarButton" v-if="hasSidebarButton"
class="d-sm-none js-sidebar-build-toggle gl-ml-auto" class="gl-md-display-none gl-ml-auto gl-align-self-start js-sidebar-build-toggle"
icon="chevron-double-lg-left" icon="chevron-double-lg-left"
:aria-label="__('Toggle sidebar')" :aria-label="__('Toggle sidebar')"
@click="onClickSidebarButton" @click="onClickSidebarButton"
......
---
title: Update buttons on a job page to conform to the Pajamas design system
merge_request: 55858
author:
type: other
...@@ -54,7 +54,7 @@ describe('Job Sidebar Retry Button', () => { ...@@ -54,7 +54,7 @@ describe('Job Sidebar Retry Button', () => {
expect(findRetryButton().attributes()).toMatchObject({ expect(findRetryButton().attributes()).toMatchObject({
category: 'primary', category: 'primary',
variant: 'info', variant: 'confirm',
}); });
}); });
}); });
......
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