Add hover and focus to "Attach a file"

This commit is contained in:
Marcel van Remmerden 2019-05-31 19:56:38 +00:00 committed by Annabel Dunstone Gray
parent 9209736a22
commit aa5bfb9187
4 changed files with 31 additions and 17 deletions

View File

@ -33,37 +33,36 @@ export default {
<div class="comment-toolbar clearfix">
<div class="toolbar-text">
<template v-if="!hasQuickActionsDocsPath && markdownDocsPath">
<gl-link :href="markdownDocsPath" target="_blank" tabindex="-1">
Markdown is supported
</gl-link>
<gl-link :href="markdownDocsPath" target="_blank" tabindex="-1"
>Markdown is supported</gl-link
>
</template>
<template v-if="hasQuickActionsDocsPath && markdownDocsPath">
<gl-link :href="markdownDocsPath" target="_blank" tabindex="-1"> Markdown </gl-link>
and
<gl-link :href="quickActionsDocsPath" target="_blank" tabindex="-1">
quick actions
</gl-link>
<gl-link :href="markdownDocsPath" target="_blank" tabindex="-1">Markdown</gl-link> and
<gl-link :href="quickActionsDocsPath" target="_blank" tabindex="-1">quick actions</gl-link>
are supported
</template>
</div>
<span v-if="canAttachFile" class="uploading-container">
<span class="uploading-progress-container hide">
<i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"> </i>
<span class="attaching-file-message"></span> <span class="uploading-progress">0%</span>
<i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"></i>
<span class="attaching-file-message"></span>
<span class="uploading-progress">0%</span>
<span class="uploading-spinner">
<i class="fa fa-spinner fa-spin toolbar-button-icon" aria-hidden="true"> </i>
<i class="fa fa-spinner fa-spin toolbar-button-icon" aria-hidden="true"></i>
</span>
</span>
<span class="uploading-error-container hide">
<span class="uploading-error-icon">
<i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"> </i>
<i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"></i>
</span>
<span class="uploading-error-message"></span>
<button class="retry-uploading-link" type="button">Try again</button> or
<button class="attach-new-file markdown-selector" type="button">attach a new file</button>
</span>
<button class="markdown-selector button-attach-file" tabindex="-1" type="button">
<i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"> </i> Attach a file
<button class="markdown-selector button-attach-file btn-link" tabindex="-1" type="button">
<i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"></i
><span class="text-attach-file">Attach a file</span>
</button>
<button class="btn btn-default btn-sm hide button-cancel-uploading-files" type="button">
Cancel

View File

@ -334,7 +334,7 @@ table {
.toolbar-button-icon {
position: relative;
top: 1px;
margin-right: 3px;
margin-right: $gl-padding-4;
color: inherit;
font-size: 16px;
}
@ -461,6 +461,15 @@ table {
border: 0;
font-size: 14px;
line-height: 16px;
&:hover,
&:focus {
text-decoration: none;
.text-attach-file {
text-decoration: underline;
}
}
}
.markdown-selector {

View File

@ -28,8 +28,9 @@
or
%button.attach-new-file.markdown-selector{ type: 'button' }= _("attach a new file")
%button.markdown-selector.button-attach-file{ type: 'button', tabindex: '-1' }
%button.markdown-selector.button-attach-file.btn-link{ type: 'button', tabindex: '-1' }
= icon('file-image-o', class: 'toolbar-button-icon')
= _("Attach a file")
%span.text-attach-file<>
= _("Attach a file")
%button.btn.btn-default.btn-sm.hide.button-cancel-uploading-files{ type: 'button' }= _("Cancel")

View File

@ -0,0 +1,5 @@
---
title: Add hover and focus to Attach a file
merge_request: 28682
author: Marcel van Remmerden
type: fixed