-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Selected Filters in myHistory #332
Changes from 20 commits
292bb01
beb1b80
b2691a9
31011fb
4015125
c43179b
b583f93
7a5e686
a2e2555
e401ad2
81c1cd4
cceca35
0afd27a
59a7de0
ed69591
d029328
cc1700f
856c819
9627342
6dfe40f
b78ef52
ffc4441
94aec1e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,29 @@ | ||||||||||||||
<template> | ||||||||||||||
<div | ||||||||||||||
v-if="suggestion.selectedFilters && suggestion.selectedFilters.length" | ||||||||||||||
class="x-text1-sm x-flex x-gap-8 x-text-lead-50" | ||||||||||||||
> | ||||||||||||||
<div class="x-truncate"> | ||||||||||||||
<span v-for="filter in suggestion.selectedFilters" :key="filter.id" class="x-pr-8"> | ||||||||||||||
{{ filter.label }} | ||||||||||||||
</span> | ||||||||||||||
</div> | ||||||||||||||
<span>({{ suggestion.selectedFilters.length }})</span> | ||||||||||||||
</div> | ||||||||||||||
</template> | ||||||||||||||
|
||||||||||||||
<script> | ||||||||||||||
import { defineComponent } from 'vue'; | ||||||||||||||
import { HistoryQuery } from '@empathyco/x-components/history-queries'; | ||||||||||||||
|
||||||||||||||
export default defineComponent({ | ||||||||||||||
props: { | ||||||||||||||
suggestion: { | ||||||||||||||
type: HistoryQuery, | ||||||||||||||
required: true | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't need the whole suggestion
Suggested change
|
||||||||||||||
} | ||||||||||||||
} | ||||||||||||||
}); | ||||||||||||||
</script> | ||||||||||||||
|
||||||||||||||
<style scoped></style> | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -17,11 +17,15 @@ | |||||
data-test="my-history-query" | ||||||
:suggestion="suggestion" | ||||||
suggestionClass="x-suggestion" | ||||||
class="hover:x-no-underline" | ||||||
> | ||||||
<HistoryIcon class="max-desktop:x-icon-lg" /> | ||||||
|
||||||
<div class="x-flex x-flex-col x-gap-2"> | ||||||
<p>{{ suggestion.query }}</p> | ||||||
<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> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Also, the list of filters could be have more width here, bump it to something around 250-320 |
||||||
|
||||||
<p class="x-text1 x-text1-sm x-text-neutral-75"> | ||||||
{{ formatTime(suggestion.timestamp) }} | ||||||
<template v-if="suggestion.totalResults !== undefined"> | ||||||
|
@@ -52,14 +56,16 @@ | |||||
} from '@empathyco/x-components'; | ||||||
import { MyHistory, HistoryQuery } from '@empathyco/x-components/history-queries'; | ||||||
import { defineComponent } from 'vue'; | ||||||
import HistoryQueryFilters from '../history-query-filters.vue'; | ||||||
|
||||||
export default defineComponent({ | ||||||
components: { | ||||||
BaseIdModalClose, | ||||||
CrossTinyIcon, | ||||||
HistoryIcon, | ||||||
MyHistory, | ||||||
HistoryQuery | ||||||
HistoryQuery, | ||||||
HistoryQueryFilters | ||||||
}, | ||||||
setup() { | ||||||
return { | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're importing the component instead of the type.