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
2 files
+ 59
21
Compare changes
  • Side-by-side
  • Inline
Files
2
<script>
import SearchModal from './global_search/components/global_search.vue';
import { SEARCH_MODAL_ID } from './global_search/constants';
// import { GlModalDirective, GlTooltipDirective, GlIcon } from '@gitlab/ui';
// import { __, s__, sprintf } from '~/locale';
// import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
// import { InternalEvents } from '~/tracking';
// import SearchModal from './global_search.vue';
// import { SEARCH_MODAL_ID } from '../constants';
export default {
SEARCH_MODAL_ID,
};
</script>
// const trackingMixin = InternalEvents.mixin();
<template>
<div v-if="!glFeatures.searchButtonTopRight">
<button
id="super-sidebar-search"
v-gl-tooltip.bottom.html="searchTooltip"
v-gl-modal="$options.SEARCH_MODAL_ID"
class="user-bar-button gl-block gl-w-full gl-rounded-base gl-border-none gl-bg-gray-10 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')"
>
// export default {
// SEARCH_MODAL_ID,
// components: {
// GlIcon,
// SearchModal,
// },
// i18n: {
// searchBtnText: __('Search or go to…'),
// searchKbdHelp: sprintf(
// s__('GlobalSearch|Type %{kbdOpen}/%{kbdClose} to search'),
// { kbdOpen: '<kbd>', kbdClose: '</kbd>' },
// false,
// ),
// },
// directives: {
// GlTooltip: GlTooltipDirective,
// GlModal: GlModalDirective,
// },
// mixins: [glFeatureFlagsMixin(), trackingMixin],
// data() {
// return {
// searchTooltip: this.$options.i18n.searchKbdHelp,
// };
// },
// methods: {
// hideSearchTooltip() {
// this.searchTooltip = '';
// },
// showSearchTooltip() {
// this.searchTooltip = this.$options.i18n.searchKbdHelp;
// },
// },
// };
// // v-if="glFeatures.searchButtonTopRight"
//
{
/* <button
id="super-sidebar-search"
v-gl-tooltip.bottom.html="searchTooltip"
v-gl-modal="$options.SEARCH_MODAL_ID"
class="user-bar-button gl-block gl-w-full gl-rounded-base gl-border-none gl-bg-gray-10 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')"
>
<gl-icon name="search" />
{{ $options.i18n.searchBtnText }}
</button>
<search-modal @shown="hideSearchTooltip" @hidden="showSearchTooltip" />
</div>
</template>
<search-modal @shown="hideSearchTooltip" @hidden="showSearchTooltip" /> */
}
</script>
<template>sdfasdfsd</template>
Loading