Skip to content
Snippets Groups Projects

Move search bar to top nav to test usage changes

Merged Tomas Bulva requested to merge 480341-move-search-bar-to-top-nav-to-test-usage-changes into master
1 unresolved thread
Compare and Show latest version
3 files
+ 7
6
Compare changes
  • Side-by-side
  • Inline
Files
3
<script>
import { GlModalDirective, GlTooltipDirective, GlIcon } from '@gitlab/ui';
import { GlModalDirective, GlTooltipDirective, GlIcon, GlButton } from '@gitlab/ui';
import { __, s__, sprintf } from '~/locale';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { InternalEvents } from '~/tracking';
@@ -13,6 +13,7 @@ export default {
components: {
GlIcon,
SearchModal,
GlButton,
},
i18n: {
searchBtnText: __('Search or go to…'),
@@ -48,17 +49,17 @@ export default {
<template>
<div v-if="glFeatures.searchButtonTopRight" ref="buttonRoot">
<button
<gl-button
id="super-sidebar-search"
v-gl-tooltip.bottom.html="searchTooltip"
v-gl-modal="$options.SEARCH_MODAL_ID"
class="user-bar-button gl-bg-gray-20 gl-w-full gl-rounded-base gl-border-none gl-py-3 gl-leading-1 gl-text-gray-900"
data-testid="super-sidebar-search-button"
@click="trackEvent('click_search_button_to_activate_command_palette')"
@click="trackEvent('click_search_button_to_activate_command_palette', { label: 'top_right' })"
>
<gl-icon name="search" />
<span>{{ $options.i18n.searchBtnText }}</span>
</button>
</gl-button>
<search-modal @shown="hideSearchTooltip" @hidden="showSearchTooltip" />
</div>
</template>
Loading