Skip to content

Commit dd2d3f4

Browse files
committed
feat: Review the quests title and description display in search results - MEED-9403 - Meeds-io/MIPs#200 (#1918)
1 parent ebf9fb1 commit dd2d3f4

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

portlets/src/main/webapp/vue-app/rules-search/components/RuleSearchCard.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<v-list-item-content>
3333
<v-list-item-title class="d-flex flex-row full-width align-center">
3434
<h1
35-
class="flex-grow-1 title pt-1 mb-0 ps-0 my-auto align-center text-start text-truncate"
35+
class="flex-grow-1 title font-weight-bold primary--text pt-1 mb-0 ps-0 my-auto align-center text-start text-truncate"
3636
v-sanitized-html="ruleTitle"></h1>
3737
<div v-show="hover || isMobile" class="ml-2 pt-1">
3838
<span class="d-flex d-inline-flex">
@@ -99,7 +99,7 @@
9999
</v-tooltip>
100100
</span>
101101
<div
102-
class="pt-2 text-wrap text-body text-break"
102+
class="pt-2 text-wrap text-body-2 text-color text-break"
103103
:class="{
104104
'text-truncate-2': isMobile,
105105
'text-truncate-3': !isMobile,
@@ -141,7 +141,7 @@ export default {
141141
return this.result || {};
142142
},
143143
ruleTitle() {
144-
return this.rule.titleExcerpt || this.rule.title || '';
144+
return this.rule?.title || '';
145145
},
146146
ruleDescription() {
147147
return this.rule.descriptionExcerpt || this.rule.description || '';

portlets/src/main/webapp/vue-app/rules-search/main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export function fetchSearchResult(uri, options) {
77
export function formatSearchResult(result, term) {
88
if (result?.rules?.length) {
99
return result.rules.map(rule => {
10-
rule.titleExcerpt = !term && rule.title || rule.title.replace(new RegExp(`(${term})`, 'ig'), '<span class="searchMatchExcerpt">$1</span>');
1110
rule.descriptionExcerpt = !term && rule.description || rule.description.replace(new RegExp(`(${term})`, 'ig'), '<span class="searchMatchExcerpt">$1</span>');
1211
return rule;
1312
});

0 commit comments

Comments
 (0)