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
+ 69
3
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -40,10 +40,10 @@ export default {
},
mounted() {
this.isNarrowScreen = isNarrowScreen(this.$refs.buttonRoot);
isNarrowScreenAddListener(this.$refs.buttonRoot, this.hideSearchTooltip);
isNarrowScreenAddListener(this.$refs.buttonRoot, this.handleNarrowScreenChange);
},
beforeDestroy() {
isNarrowScreenRemoveListener(this.$refs.buttonRoot, this.hideSearchTooltip);
isNarrowScreenRemoveListener(this.$refs.buttonRoot, this.handleNarrowScreenChange);
},
methods: {
handleNarrowScreenChange({ matches }) {
@@ -66,6 +66,8 @@ export default {
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"
:class="isNarrowScreen ? 'gl-bg-transparent' : 'gl-bg-gray-20'"
:aria-label="isNarrowScreen ? $options.i18n.searchBtnText : ''"
data-testid="super-sidebar-search-button"
@click="trackEvent('click_search_button_to_activate_command_palette')"
>
Loading