Skip to content

Commit

Permalink
feat(my-history): fix pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lauramargar committed Nov 2, 2023
1 parent 6dfe40f commit b78ef52
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
10 changes: 4 additions & 6 deletions src/components/history-query-filters.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,16 @@
</div>
</template>

<script>
import { defineComponent } from 'vue';
import { HistoryQuery } from '@empathyco/x-components/history-queries';
<script lang="ts">
import { HistoryQuery } from '@empathyco/x-types';
import { defineComponent, PropType } from 'vue';
export default defineComponent({
props: {
suggestion: {
type: HistoryQuery,
type: Object as PropType<HistoryQuery>,
required: true
}
}
});
</script>

<style scoped></style>
2 changes: 1 addition & 1 deletion src/components/my-history/custom-my-history.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<div class="x-group x-flex x-flex-col x-gap-2">
<p class="group-hover:x-underline">{{ suggestion.query }}</p>

<HistoryQueryFilters class="x-w-192" :suggestion="suggestion"></HistoryQueryFilters>
<HistoryQueryFilters class="x-w-224 desktop:x-w-320" :suggestion="suggestion" />

<p class="x-text1 x-text1-sm x-text-neutral-75">
{{ formatTime(suggestion.timestamp) }}
Expand Down
5 changes: 1 addition & 4 deletions src/components/predictive-layer/full-width-predictive.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@
:highlight="query"
class="group-hover:x-underline"
/>
<HistoryQueryFilters
class="x-w-128"
:suggestion="suggestion"
></HistoryQueryFilters>
<HistoryQueryFilters class="x-w-128" :suggestion="suggestion" />
</div>
</template>

Expand Down
10 changes: 9 additions & 1 deletion src/components/predictive-layer/predictive-layer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,13 @@
>
<template #default="{ query }">
<HistoryIcon class="x-icon-lg desktop:x-icon-md" />
<Highlight :text="suggestion.query" :highlight="query" />
<div class="x-group x-flex x-flex-col x-gap-2">
<Highlight :text="suggestion.query" :highlight="query" />
<HistoryQueryFilters
class="x-w-192 desktop:x-w-128"
:suggestion="suggestion"
/>
</div>
</template>

<template #remove-button-content>
Expand Down Expand Up @@ -129,6 +135,7 @@
import { defineComponent } from 'vue';
import { useDevice } from '../../composables/use-device.composable';
import { usePredictiveHelpers } from '../../composables/use-predictive-helpers.composable';
import HistoryQueryFilters from '../history-query-filters.vue';
import SlidingRecommendations from './sliding-recommendations.vue';
import PredictiveIdentifierResults from './predictive-identifier-results.vue';
import PredictiveQuerySuggestions from './predictive-query-suggestions.vue';
Expand All @@ -137,6 +144,7 @@
export default defineComponent({
components: {
HistoryQueryFilters,
BaseScroll,
PredictivePopularSearches,
PredictiveNextQueries,
Expand Down

0 comments on commit b78ef52

Please sign in to comment.