Skip to content

Commit 4a9e905

Browse files
authored
Merge Search in space Meeds-io/MIPs#200 (#1920)
This MIP provides an option for users to filter the search by a specific space. Resolves Meeds-io/MIPs#200
2 parents 4424dcd + dd2d3f4 commit 4a9e905

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

portlets/src/main/webapp/WEB-INF/conf/gamification/search-configuration.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@
6565
<field name="icon">
6666
<string>fas fa-trophy</string>
6767
</field>
68+
<field name="spaceFilterEnabled">
69+
<boolean>true</boolean>
70+
</field>
6871
</object>
6972
</object-param>
7073
</init-params>

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)