Fix slash commands dropdown description

This commit is contained in:
Maurizio De Santis 2018-01-08 09:27:50 +00:00 committed by Phil Hughes
parent 82e2d90b51
commit f07727d92e
3 changed files with 20 additions and 3 deletions

View file

@ -57,12 +57,12 @@ class GfmAutoComplete {
displayTpl(value) { displayTpl(value) {
if (GfmAutoComplete.isLoading(value)) return GfmAutoComplete.Loading.template; if (GfmAutoComplete.isLoading(value)) return GfmAutoComplete.Loading.template;
// eslint-disable-next-line no-template-curly-in-string // eslint-disable-next-line no-template-curly-in-string
let tpl = '<li>/${name}'; let tpl = '<li><span class="name">/${name}</span>';
if (value.aliases.length > 0) { if (value.aliases.length > 0) {
tpl += ' <small>(or /<%- aliases.join(", /") %>)</small>'; tpl += ' <small class="aliases">(or /<%- aliases.join(", /") %>)</small>';
} }
if (value.params.length > 0) { if (value.params.length > 0) {
tpl += ' <small><%- params.join(" ") %></small>'; tpl += ' <small class="params"><%- params.join(" ") %></small>';
} }
if (value.description !== '') { if (value.description !== '') {
tpl += '<small class="description"><i><%- description %></i></small>'; tpl += '<small class="description"><i><%- description %></i></small>';

View file

@ -192,6 +192,17 @@
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
.name,
small.aliases,
small.params {
float: left;
}
small.aliases,
small.params {
padding: 2px 5px;
}
small.description { small.description {
float: right; float: right;
padding: 3px 5px; padding: 3px 5px;
@ -209,6 +220,7 @@
} }
ul > li { ul > li {
@include clearfix;
white-space: nowrap; white-space: nowrap;
} }

View file

@ -0,0 +1,5 @@
---
title: "Fix slash commands dropdown description mis-alignment on Firefox"
merge_request: 16125
author: Maurizio De Santis
type: fixed