Skip to content
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

Fix/responses suggestions filter fine tune #4356

Merged
merged 3 commits into from
Nov 29, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
class="pagination__button"
ref="nextButton"
@click="onClickNext"
:disabled="isLastPage"
:title="
$platform.isMac
? $t('shortcuts.pagination.go_to_next_record_mac')
Expand Down Expand Up @@ -52,10 +53,13 @@ export default {
},
},
computed: {
// TODO: Move to PageCriteria to support those computed
isFirstPage() {
return this.currentPage === 1;
},
// TODO: Do PageCriteria to support this
isLastPage() {
return this.currentPage === this.items;
},
totalPages() {
return Math.ceil(this.items / this.itemsPerPage);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<BaseButton
@on-click="selectCategory(category)"
class="category__item"
:class="category.isAnswered ? 'category__item--selected' : null"
:disabled="!category.canFilter"
>
<span v-if="!!category.title" v-text="category.title" />
Expand Down Expand Up @@ -77,6 +78,9 @@ export default {
justify-content: space-between;
border-radius: $border-radius;
font-weight: 400;
&--selected {
font-weight: 600;
}
span {
overflow: hidden;
text-overflow: ellipsis;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<li
v-for="category in getCategoriesByGroup(group)"
:key="category.name"
:title="category.tooltip"
>
<BaseButton
:disabled="!category.canSort"
Expand Down
8 changes: 8 additions & 0 deletions frontend/v1/domain/entities/sort/SortList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ abstract class Sort {
get canSort(): boolean {
return true;
}

get tooltip() {
return this.title;
}
}

class MetadataSort extends Sort {
Expand Down Expand Up @@ -66,6 +70,10 @@ class SuggestionScoreSort extends Sort {
get title() {
return this.question.name;
}

get tooltip() {
return this.question.title;
}
}

class RecordSort extends Sort {
Expand Down