Skip to content

Commit

Permalink
fix(ui): spacing in articles and category
Browse files Browse the repository at this point in the history
  • Loading branch information
RitvikSardana committed Jan 20, 2025
1 parent 7ede882 commit d7f8d8b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
5 changes: 1 addition & 4 deletions desk/src/components/SearchArticles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
<span class="text-xs underline">(View All)</span>
</RouterLink>
</div>
<span class="text-p-sm pl-2">
<span class="font-medium">Search Results</span>
</span>
<dl
class="mx-auto w-full flex flex-col gap-2"
v-if="articles.data.length > 0"
Expand All @@ -41,7 +38,7 @@
<dt class="font-base">{{ a.subject }} - {{ a.headings }}</dt>
<!-- eslint-disable-next-line vue/no-v-html -->
<dd
class="font-base text-p-sm text-gray-600 line-clamp-2"
class="font-base text-p-sm text-gray-600 line-clamp-1"
v-html="a.description"
></dd>
</RouterLink>
Expand Down
9 changes: 6 additions & 3 deletions desk/src/pages/knowledge-base/Articles.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<template>
<div class="p-5 pb-10 px-10 w-full overflow-scroll items-center">
<div class="p-5 pb-5 md:pb-10 px-10 w-full overflow-scroll items-center">
<LayoutHeader>
<template #left-header>
<Breadcrumbs :items="breadcrumbs" />
</template>
</LayoutHeader>
<div
class="pt-4 sm:px-5 w-full flex flex-col gap-2 max-w-4xl 2xl:max-w-5xl"
class="pt-0 md:pt-3 sm:px-5 w-full flex flex-col gap-2 max-w-4xl 2xl:max-w-5xl"
>
<div v-if="articles.data" class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div
v-if="articles.data"
class="grid grid-cols-1 md:grid-cols-2 gap-3 md:gap-6"
>
<ArticleCard2
v-for="article in articles.data"
:article="article"
Expand Down
4 changes: 3 additions & 1 deletion desk/src/pages/knowledge-base/KnowledgeBaseCustomer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
class="w-full focus:outline-none outline-none border-inherit shadow-none"
placeholder="Ask a question..."
size="md"
autofocus
autocomplete="off"
v-model="query"
@update:model-value="
(e:string) => {
Expand All @@ -43,7 +45,7 @@
<SearchArticles
:query="query"
:hideViewAll="true"
class="rounded border p-3"
class="rounded border p-3 py-2"
/>
</div>
</template>
Expand Down
4 changes: 1 addition & 3 deletions helpdesk/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,7 @@ def search(
query = self.clean_query(query)
query = Query(query).paging(start, page_length)
if highlight:
query = query.highlight(
tags=["<mark style='background: #FFFF8F!important'>", "</mark>"]
)
query = query.highlight()

query.summarize(fields=["description"])
query.scorer("DISMAX")
Expand Down

0 comments on commit d7f8d8b

Please sign in to comment.