Commit 2c962c89 authored by Martin Wortschack's avatar Martin Wortschack

Merge branch...

Merge branch '222822-analytics-dropdowns-text-should-be-left-aligned-arrow-right-aligned' into 'master'

Fix analytics dropdown alignment

Closes #222822

See merge request gitlab-org/gitlab!34721
parents 8f9e6abb edbf8fb1
...@@ -222,7 +222,6 @@ export default { ...@@ -222,7 +222,6 @@ export default {
}, },
maxDateRange: DATE_RANGE_LIMIT, maxDateRange: DATE_RANGE_LIMIT,
STAGE_ACTIONS, STAGE_ACTIONS,
commonFilterClasses: ['gl-display-flex gl-flex-direction-column gl-md-flex-direction-row'],
}; };
</script> </script>
<template> <template>
...@@ -242,36 +241,34 @@ export default { ...@@ -242,36 +241,34 @@ export default {
/> />
</div> </div>
<div <div
:class="$options.commonFilterClasses" class="gl-display-flex gl-flex-direction-column gl-lg-flex-direction-row gl-justify-content-space-between"
class="gl-justify-content-space-between gl-align-items-center"
> >
<groups-dropdown-filter <div class="dropdown-container d-flex flex-column flex-lg-row">
v-if="!hideGroupDropDown" <groups-dropdown-filter
class="js-groups-dropdown-filter" v-if="!hideGroupDropDown"
:query-params="$options.groupsQueryParams" class="js-groups-dropdown-filter"
:default-group="selectedGroup" :class="{ 'mr-lg-3': shouldDisplayFilters }"
@selected="onGroupSelect" :query-params="$options.groupsQueryParams"
/> :default-group="selectedGroup"
<projects-dropdown-filter @selected="onGroupSelect"
v-if="shouldDisplayFilters" />
:key="selectedGroup.id" <projects-dropdown-filter
class="js-projects-dropdown-filter gl-ml-0" v-if="shouldDisplayFilters"
:group-id="selectedGroup.id" :key="selectedGroup.id"
:query-params="$options.projectsQueryParams" class="js-projects-dropdown-filter project-select"
:multi-select="$options.multiProjectSelect" :group-id="selectedGroup.id"
:default-projects="selectedProjects" :query-params="$options.projectsQueryParams"
@selected="onProjectsSelect" :multi-select="$options.multiProjectSelect"
/> :default-projects="selectedProjects"
@selected="onProjectsSelect"
/>
</div>
<filter-bar <filter-bar
v-if="featureFlags.hasFilterBar" v-if="featureFlags.hasFilterBar"
class="js-filter-bar filtered-search-box gl-display-flex gl-mt-3 mt-md-0 mx-2" class="js-filter-bar filtered-search-box gl-display-flex gl-mt-3 mt-md-0 gl-mr-3"
:disabled="!hasProject" :disabled="!hasProject"
/> />
<div <div v-if="shouldDisplayFilters" class="gl-justify-content-end gl-white-space-nowrap">
v-if="shouldDisplayFilters"
:class="$options.commonFilterClasses"
class="gl-justify-content-end gl-white-space-nowrap"
>
<date-range <date-range
:start-date="startDate" :start-date="startDate"
:end-date="endDate" :end-date="endDate"
......
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
<template> <template>
<div <div
v-if="show" v-if="show"
class="daterange-container d-flex flex-column flex-lg-row align-items-lg-center justify-content-lg-end" class="gl-display-flex gl-flex-direction-column gl-lg-flex-direction-row align-items-lg-center justify-content-lg-end"
> >
<gl-daterange-picker <gl-daterange-picker
v-model="dateRange" v-model="dateRange"
......
...@@ -116,7 +116,7 @@ export default { ...@@ -116,7 +116,7 @@ export default {
<template> <template>
<gl-dropdown ref="groupsDropdown" class="dropdown dropdown-groups" toggle-class="gl-shadow-none"> <gl-dropdown ref="groupsDropdown" class="dropdown dropdown-groups" toggle-class="gl-shadow-none">
<template #button-content> <template #button-content>
<div class="gl-display-flex"> <div class="gl-display-flex gl-flex-fill-1">
<gl-avatar <gl-avatar
v-if="selectedGroup.name" v-if="selectedGroup.name"
:src="selectedGroup.avatar_url" :src="selectedGroup.avatar_url"
...@@ -128,8 +128,8 @@ export default { ...@@ -128,8 +128,8 @@ export default {
class="gl-display-inline-flex gl-vertical-align-middle gl-mr-2" class="gl-display-inline-flex gl-vertical-align-middle gl-mr-2"
/> />
{{ selectedGroupName }} {{ selectedGroupName }}
<gl-icon class="gl-ml-2" name="chevron-down" />
</div> </div>
<gl-icon class="gl-ml-2" name="chevron-down" />
</template> </template>
<gl-dropdown-header>{{ __('Groups') }}</gl-dropdown-header> <gl-dropdown-header>{{ __('Groups') }}</gl-dropdown-header>
<gl-search-box-by-type v-model.trim="searchTerm" class="gl-m-3" /> <gl-search-box-by-type v-model.trim="searchTerm" class="gl-m-3" />
......
...@@ -140,7 +140,7 @@ export default { ...@@ -140,7 +140,7 @@ export default {
toggle-class="gl-shadow-none" toggle-class="gl-shadow-none"
> >
<template #button-content> <template #button-content>
<div class="gl-display-flex"> <div class="gl-display-flex gl-flex-fill-1">
<gl-avatar <gl-avatar
v-if="isOnlyOneProjectSelected" v-if="isOnlyOneProjectSelected"
:src="selectedProjects[0].avatar_url" :src="selectedProjects[0].avatar_url"
...@@ -152,8 +152,8 @@ export default { ...@@ -152,8 +152,8 @@ export default {
class="gl-display-inline-flex gl-vertical-align-middle gl-mr-2" class="gl-display-inline-flex gl-vertical-align-middle gl-mr-2"
/> />
{{ selectedProjectsLabel }} {{ selectedProjectsLabel }}
<gl-icon class="gl-ml-2" name="chevron-down" />
</div> </div>
<gl-icon class="gl-ml-2" name="chevron-down" />
</template> </template>
<gl-dropdown-header>{{ __('Projects') }}</gl-dropdown-header> <gl-dropdown-header>{{ __('Projects') }}</gl-dropdown-header>
<gl-search-box-by-type v-model.trim="searchTerm" class="gl-m-3" /> <gl-search-box-by-type v-model.trim="searchTerm" class="gl-m-3" />
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
= _('Productivity Analytics') = _('Productivity Analytics')
.row-content-block.second-block.d-flex.flex-column.flex-lg-row.mt-3.py-2.px-3 .row-content-block.second-block.d-flex.flex-column.flex-lg-row.mt-3.py-2.px-3
.js-group-project-select-container .js-group-project-select-container
.js-search-bar.filter-container.hide .js-search-bar.filter-container.hide.gl-mr-0.mr-lg-3
= render 'shared/issuable/search_bar', type: :productivity_analytics, placeholder: _('Filter results...') = render 'shared/issuable/search_bar', type: :productivity_analytics, placeholder: _('Filter results...')
.js-timeframe-container{ data: { start_date: ProductivityAnalytics.start_date } } .js-timeframe-container{ data: { start_date: ProductivityAnalytics.start_date } }
.js-productivity-analytics-app-container{ data: { endpoint: group_analytics_productivity_analytics_path(@group), empty_state_svg_path: image_path('illustrations/productivity-analytics-empty-state.svg'), no_access_svg_path: image_path('illustrations/analytics/no-access.svg') } } .js-productivity-analytics-app-container{ data: { endpoint: group_analytics_productivity_analytics_path(@group), empty_state_svg_path: image_path('illustrations/productivity-analytics-empty-state.svg'), no_access_svg_path: image_path('illustrations/analytics/no-access.svg') } }
---
title: Fix alignment of analytics dropdowns
merge_request: 34721
author:
type: fixed
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