Skip to content

Commit

Permalink
Fix/issue 1186 collection in ngram (#1199)
Browse files Browse the repository at this point in the history
* see #1061 wording

* add collection and simplify queries

fix 1186

* fix dropdown css(use margin-top instead of top)

* remove message for ingoredFilter when there is no filters :)

fix #1063

* add unigram in URL when adding/changing filters
  • Loading branch information
danieleguido committed Mar 27, 2024
1 parent e01e8b6 commit a2eef12
Show file tree
Hide file tree
Showing 4 changed files with 307 additions and 228 deletions.
3 changes: 2 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,8 @@ input[type='range']:active::-ms-thumb {
.dropdown-menu {
min-width: 100px;
padding: 0;
top: -0.5px !important;
// top: -0.5px !important;
margin-top: -1px;
}
// change button color when bg-dark
Expand Down
63 changes: 33 additions & 30 deletions src/components/modules/SearchSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@
<!-- header -->
<div slot="header" class="border-bottom bg-light">
<slot name="tabs">
<search-tabs/>
<search-tabs />
</slot>
<div class="my-3 mx-3" :class="{ focus: hasFocus }">
<search-pills
:filters="filters"
@changed="handleFiltersChanged"
/>
<span v-if="ignoredFilters.length">
<em class="small" v-html="$tc('numbers.ignoredFilters', ignoredFilters.length, {
n: ignoredFilters.length,
})"/>
&nbsp;
<search-pills :filters="filters" @changed="handleFiltersChanged" />
<span v-if="filters.length && ignoredFilters.length">
<i
class="small"
v-html="
$tc('numbers.ignoredFilters', ignoredFilters.length, {
n: ignoredFilters.length,
})
"
/>

<info-button :name="infoButtonName" />
</span>
<slot name="header" :focusHandler="focusHandler">
Expand All @@ -32,7 +34,8 @@
:filters="filters"
:start-year="startYear"
:end-year="endYear"
@changed="handleFiltersChanged"/>
@changed="handleFiltersChanged"
/>
</div>
</i-layout-section>
</template>
Expand Down Expand Up @@ -81,11 +84,11 @@ export default {
/** @param {Filter[]} filters */
handleFiltersChanged(filters) {
// propagate filters changed
this.$emit('changed', filters);
this.$emit('changed', filters)
},
focusHandler(value) {
this.hasFocus = !!value;
}
this.hasFocus = !!value
},
},
computed: {
/** @return {boolean} */
Expand All @@ -94,10 +97,10 @@ export default {
return `how-${this.contextTag}-work-with-search-filters`
},
startYear() {
return window.impressoDocumentsYearSpan.firstYear;
return window.impressoDocumentsYearSpan.firstYear
},
endYear() {
return window.impressoDocumentsYearSpan.lastYear;
return window.impressoDocumentsYearSpan.lastYear
},
},
components: {
Expand All @@ -106,22 +109,22 @@ export default {
SearchTabs,
SearchFacets,
},
};
}
</script>
<style lang="scss">
@import "@/styles/variables.sass";
.search-box{
border: 1px solid #777;
}
.search-box.focus{
@import '@/styles/variables.sass';
.search-box {
border: 1px solid #777;
}
.search-box.focus {
box-shadow: 0 0 0 0.2rem rgba(17, 17, 17, 0.5);
border-color: black;
border-radius: 2px;
}
.bg-dark {
.search-box.focus {
box-shadow: 0 0 0 0.2rem rgba(17, 17, 17, 0.5);
border-color: black;
border-radius: 2px;
}
.bg-dark{
.search-box.focus {
box-shadow: 0 0 0 0.2rem rgba(17, 17, 17, 0.5);
border-color: white;
}
border-color: white;
}
}
</style>
2 changes: 1 addition & 1 deletion src/pages/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ export default {
"label_order": "Order By",
"label_group": "Group By",
"label_isFront": "Frontpage",
"label_embeddings": "find similar words",
"label_embeddings": "add similar words",
"label_hasTextContents": "Contains Text",
"display_button_list": "List",
"display_button_tiles": "Tiles",
Expand Down

0 comments on commit a2eef12

Please sign in to comment.