-
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 15 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -16,12 +16,28 @@ | |||||
@click="closeModal" | ||||||
data-test="my-history-query" | ||||||
:suggestion="suggestion" | ||||||
suggestionClass="x-suggestion" | ||||||
suggestionClass="x-suggestion x-w-[320px]" | ||||||
> | ||||||
<HistoryIcon class="max-desktop:x-icon-lg" /> | ||||||
|
||||||
<div class="x-flex x-flex-col x-gap-2"> | ||||||
<p>{{ suggestion.query }}</p> | ||||||
<p class="hover:x-underline">{{ suggestion.query }}</p> | ||||||
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. This way you only get the underline when hovering this specific element. This underline should appear when you hover anywhere in the parent. |
||||||
<div | ||||||
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. This is a pretty big chunk that is duplicated here and in the empathize, moving it to it's own component might be a good idea. |
||||||
v-if="suggestion.selectedFilters && suggestion.selectedFilters.length > 0" | ||||||
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
|
||||||
class="x-text1-sm x-flex x-text-lead-50" | ||||||
> | ||||||
<p class="x-line-clamp-1"> | ||||||
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. Using a line clamp of 1 is overkill, this should be done just with The width limit should be here, not in the parent. |
||||||
<span | ||||||
v-for="filter in suggestion.selectedFilters" | ||||||
:key="filter.id" | ||||||
class="x-pr-8" | ||||||
> | ||||||
{{ label(filter) }} | ||||||
</span> | ||||||
</p> | ||||||
<p class="x-pl-8">({{ suggestion.selectedFilters.length }})</p> | ||||||
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're adding extra
Suggested change
|
||||||
</div> | ||||||
|
||||||
<p class="x-text1 x-text1-sm x-text-neutral-75"> | ||||||
{{ formatTime(suggestion.timestamp) }} | ||||||
<template v-if="suggestion.totalResults !== undefined"> | ||||||
|
@@ -62,8 +78,13 @@ | |||||
HistoryQuery | ||||||
}, | ||||||
setup() { | ||||||
const label = (filter: Record<string, string>): string => { | ||||||
return filter.label ?? filter.id; | ||||||
}; | ||||||
|
||||||
return { | ||||||
animation: StaggeredFadeAndSlide | ||||||
animation: StaggeredFadeAndSlide, | ||||||
label | ||||||
}; | ||||||
} | ||||||
}); | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,9 @@ module.exports = { | |
paddingTop: theme('spacing.24'), | ||
paddingBottom: theme('spacing.24') | ||
} | ||
}, | ||
'.history-query.suggestion-group:hover': { | ||
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. This removes the hover decorations to all HQ, including the ones in the empathize. 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. This is still here and it's not needed |
||
textDecoration: 'none' | ||
} | ||
}) | ||
}; |
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.
We already have
320px
as value in the theme's spacing