Commit 8483ccd0 authored by Phil Hughes's avatar Phil Hughes

Fixes icon and collapse button not aligning correctly

Fixes the icon and collapse button not aligning correctly in the MR
widget extensions.
parent ba527d74
...@@ -30,6 +30,7 @@ export default { ...@@ -30,6 +30,7 @@ export default {
<template> <template>
<div> <div>
<gl-dropdown <gl-dropdown
v-if="tertiaryButtons"
:text="dropdownLabel" :text="dropdownLabel"
icon="ellipsis_v" icon="ellipsis_v"
no-caret no-caret
...@@ -38,6 +39,7 @@ export default { ...@@ -38,6 +39,7 @@ export default {
lazy lazy
text-sr-only text-sr-only
size="small" size="small"
toggle-class="gl-p-2!"
class="gl-display-block gl-md-display-none!" class="gl-display-block gl-md-display-none!"
> >
<gl-dropdown-item <gl-dropdown-item
......
...@@ -138,18 +138,21 @@ export default { ...@@ -138,18 +138,21 @@ export default {
<template> <template>
<section class="media-section" data-testid="widget-extension"> <section class="media-section" data-testid="widget-extension">
<div class="media gl-p-5"> <div class="media gl-p-5">
<status-icon :name="widgetLabel" :is-loading="isLoadingSummary" :icon-name="statusIconName" /> <status-icon
<div :name="$options.label || $options.name"
class="media-body gl-display-flex gl-align-self-center gl-align-items-center gl-flex-direction-row!" :is-loading="isLoadingSummary"
> :icon-name="statusIconName"
/>
<div class="media-body gl-display-flex gl-flex-direction-row!">
<div class="gl-flex-grow-1"> <div class="gl-flex-grow-1">
<template v-if="isLoadingSummary">{{ widgetLoadingText }}</template> <template v-if="isLoadingSummary">{{ widgetLoadingText }}</template>
<div v-else v-safe-html="summary(collapsedData)"></div> <div v-else v-safe-html="summary(collapsedData)"></div>
</div> </div>
<actions :widget="widgetLabel" :tertiary-buttons="tertiaryActionsButtons" /> <actions
<div :widget="$options.label || $options.name"
class="gl-float-right gl-align-self-center gl-border-l-1 gl-border-l-solid gl-border-gray-100 gl-ml-3 gl-pl-3" :tertiary-buttons="tertiaryActionsButtons"
> />
<div class="gl-border-l-1 gl-border-l-solid gl-border-gray-100 gl-ml-3 gl-pl-3 gl-h-6">
<gl-button <gl-button
v-if="isCollapsible" v-if="isCollapsible"
v-gl-tooltip v-gl-tooltip
......
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
{ 'mr-widget-extension-icon': !isLoading && size === 16 }, { 'mr-widget-extension-icon': !isLoading && size === 16 },
{ 'gl-p-2': isLoading || size === 16 }, { 'gl-p-2': isLoading || size === 16 },
]" ]"
class="align-self-center gl-rounded-full gl-mr-3 gl-relative" class="gl-rounded-full gl-mr-3 gl-relative gl-p-2"
> >
<gl-loading-icon v-if="isLoading" size="md" inline class="gl-display-block" /> <gl-loading-icon v-if="isLoading" size="md" inline class="gl-display-block" />
<gl-icon <gl-icon
......
...@@ -19,7 +19,7 @@ export default { ...@@ -19,7 +19,7 @@ export default {
// Small summary text to be displayed in the collapsed state // Small summary text to be displayed in the collapsed state
// Receives the collapsed data as an argument // Receives the collapsed data as an argument
summary(count) { summary(count) {
return 'Summary text'; return 'Summary text<br/>Second line';
}, },
// Status icon to be used next to the summary text // Status icon to be used next to the summary text
// Receives the collapsed data as an argument // Receives the collapsed data as an argument
......
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