Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/predictive-layer/full-width-predictive.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
<div class="x-relative x-z-10">
<Empathize
:animation="empathizeAnimation"
:has-content="showEmpathize || showIdentifierResults"
search-and-close-on-no-content
class="x-layout-item x-absolute x-z-[1] x-w-full x-bg-neutral-0"
@empathize-opened="handleEmpathizeEvent('EmpathizeOpened')"
@empathize-closed="handleEmpathizeEvent('EmpathizeClosed')"
>
<MaxDesktopWidthItem>
<DesktopSearchboxAlign>
<div class="x-layout-item">
<div v-if="showEmpathize || showIdentifierResults" class="x-h-full x-py-16 x-pl-[17px]">
<div class="x-h-full x-py-16 x-pl-[17px]">
<div class="x-block">
<BaseKeyboardNavigation
class="x-flex x-items-start x-gap-24"
Expand Down
3 changes: 2 additions & 1 deletion src/components/predictive-layer/predictive-layer.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<template>
<Empathize
:animation="empathizeAnimation"
:has-content="showEmpathize || showIdentifierResults"
search-and-close-on-no-content
class="x-z-40 x-bg-neutral-0 desktop:x-w-full"
:events-to-close-empathize="isDesktopOrGreater ? desktopCloseEvents : mobileCloseEvents"
>
Expand All @@ -10,7 +12,6 @@
:class="{ 'x-bg-neutral-0': showEmpathize }"
>
<div
v-if="showEmpathize || showIdentifierResults"
class="x-layout-item x-pb-16 desktop:x-block desktop:x-pl-16 desktop:x-pt-16"
:class="{ 'x-mb-40 x-border-b x-border-neutral-10': !x.query.search && isTabletOrLess }"
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/search-box.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
ref="searchInputRef"
:autofocus="false"
:placeholder="$t('searchBox.placeholder')"
:instant="true"
:instant="!!isDesktopOrGreater"
class="desktop:!x-pl-24"
/>

Expand Down
1 change: 1 addition & 0 deletions tests/e2e/cucumber/predictive-components.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Feature: Predictive components
Then query suggestions are displayed
When search input is cleared
And a "<query>" is typed
And user presses enter
And focus is set on the search input
Then next queries are displayed
When search input is cleared
Expand Down
4 changes: 4 additions & 0 deletions tests/e2e/cucumber/predictive-components.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,7 @@ When('clear history queries button is clicked', () => {
Then('no history queries are displayed', () => {
cy.getByDataTest('history-queries').should('not.exist')
})

When('user presses enter', () => {
cy.getByDataTest('search-input').type('{enter}')
})
Loading