Remove the former search form, filters and SlimSelect (F2)

- materio_sapi: MaterioSapiSearchForm, AjaxSearchForm and the
  /materio_sapi/search_form route removed, with the fieldset legend hook
  they needed. The search block is only the place where the Vue field
  mounts (placement and access unchanged).
- materiotheme: filters removed from the search store and Base.vue (the
  parameter of former URLs is ignored), formhtml removed from main.js and
  SearchBlock.vue, filter styles and SlimSelect import removed.
- slim-select uninstalled, with its postinstall patch step.
- Production build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ShDspHaZGwHoRZCsPBJzsM
This commit is contained in:
2026-11-17 21:11:18 +01:00
co-authored by Claude Opus 5.5
parent b73057f453
commit fca4be3155
29 changed files with 26 additions and 406 deletions
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -381,12 +381,9 @@ export let _v_sitebranding_block, _v_user_block, _v_header_menu, _v_language_swi
// console.log('router beforeEach to ', to)
const id = 'block-materiosapisearchblock'
let $search_block = document.getElementById(id)
let formhtml = null
if ($search_block) {
// get the search form html to pass it as template to the vue
// we gain display speed vs async downloaded data
formhtml = $search_block.innerHTML
} else {
// The block is only a place in the page: the search form is the Vue
// component SearchForm (F1).
if (!$search_block) {
// else create the empty block to fill it later with async data
$search_block = document.createElement('div')
$search_block.setAttribute('id', id)
@@ -399,7 +396,7 @@ export let _v_sitebranding_block, _v_user_block, _v_header_menu, _v_language_swi
_v_search_block = new Vue({
store,
i18n,
render: h => h(VSearchBlock, { props: { blockid: id, formhtml: formhtml } })
render: h => h(VSearchBlock, { props: { blockid: id } })
}).$mount('#' + id)
}
function initVLeftContent () {
@@ -1,10 +1,6 @@
@use "sass:math";
@use "sass:color";
// @import '~slim-select/scss';
@import 'slim-select/styles';
$mdi-font-path: './mdi/fonts/';
@import './mdi/css/materialdesignicons.css';
@import './mdi/scss/variables';
@@ -641,72 +637,6 @@ header[role="banner"]{
}
}
fieldset#edit-filters{
grid-row: 2 / 2;
grid-column: 1 / span 2;
border: none;
padding: 0;
>legend{
line-height: 0.6;
padding-bottom: 0.2em;
width: 100%;
text-align: right;
span{
cursor: pointer;
font-size: 0.756em;
color: #8f8f8f;
}
}
> div.fieldset-wrapper{
height: 0;
overflow: hidden;
}
&.open >div.fieldset-wrapper{
height: auto;
overflow: visible;
}
.ss-main{
font-size: 0.756em;
.ss-single-selected{
border-radius: 0.7em;
&.ss-open-below{
border-radius: 0.7em 0.7em 0 0.7em;
}
height:1.5em;
border: none;
padding: 0 0.5em;
background-color: #eeeaea;
span.placeholder{
color: $color-main-text;
line-height: 1;
span.ss-disabled{
color: #8f8f8f;
}
}
span.ss-arrow span{
border-color: #b1adad;
}
}
.ss-content{
width:auto;
border: none;
border-radius: 0.7em 0 0.7em 0.7em;
&.ss-open{
box-shadow: 0 0 10px #ccc;
}
right: 0;
.ss-list{
max-height: none;
.ss-option{
white-space: nowrap;
text-align: right;
}
}
}
}
}
.button.form-submit{
grid-row: 1 / 1;
grid-column: 2 / 2;
@@ -9,9 +9,7 @@ import SearchForm from 'vuejs/components/Form/SearchForm'
import { mapState } from 'vuex'
export default {
// formhtml: HTML of the former Drupal form, still passed by main.js, no
// longer used: the form is a Vue component (F1).
props: ['blockid', 'formhtml'],
props: ['blockid'],
computed: {
...mapState({
canSearch: state => state.User.canSearch
@@ -60,7 +60,7 @@ export default {
// Hide the keyboard on mobile devices.
this.$refs.input.blur()
// Base.vue reacts to the route change and runs the search.
// Only the phrase: no more terms (F7) nor filters (F2).
// Only the phrase: no more terms (F7) nor filters.
this.$router.push({ name: 'base', query: phrase ? { keys: phrase } : {} })
.catch(() => {})
}
@@ -92,11 +92,7 @@ export default {
this.$store.commit('Search/reSetTerms')
}
if (params.has('filters')) {
this.$store.commit('Search/setFilters', params.get('filters').split(','))
} else {
this.$store.commit('Search/reSetFilters')
}
// The filters parameter of former URLs is ignored (F2).
this.newSearch()
},
@@ -113,11 +109,6 @@ export default {
}else{
this.$store.commit('Search/reSetTerms')
}
if (to.query.hasOwnProperty('filters')) {
this.$store.commit('Search/setFilters', to.query.filters)
}else{
this.$store.commit('Search/reSetFilters')
}
if (to.query.hasOwnProperty('keys')) {
const r = /,\s?$/
let keys = to.query.keys.replace(r,'').split(', ')
@@ -17,7 +17,6 @@ export default {
state: {
keys: [],
terms: [],
filters: [],
uuids: [],
items: [],
offset: 0,
@@ -92,13 +91,6 @@ export default {
reSetTerms (state) {
state.terms = []
},
setFilters (state, filters) {
console.log('store search setFilters', filters)
state.filters = typeof filters === 'string' ? filters.split(',') : filters
},
reSetFilters (state) {
state.filters = []
},
setInfos (state, infos) {
state.infos = infos
},
@@ -169,10 +161,6 @@ export default {
limit: state.limit
}
console.log('search store getResults, params', params)
if (state.filters) {
console.log('getResults filters', state.filters)
params.filters = state.filters.join(',')
}
// console.log('Search getResults params', params)
const q = qs.stringify(params)
// * Qs.Stringify () Arrayformat: 'Repeat' : https://programmerall.com/article/31901061156/