#3470540: "Create some front end"
Merge request reports
Activity
added 1 commit
- f1ff38da - Rename FilterGroup to BooleanFilter and some refactoring
added 1 commit
- 09a061b7 - change the code related to rendering of sourcefilters
added 1 commit
- e71b5831 - change getFilterDefinitions() in remaining places
added 1 commit
- c35d3d59 - change getFilterDefinitions() in remaining place
added 7 commits
-
6cb4b7d7 - 1 commit from branch
project:2.0.x
- dd2fabcd - Rename FilterGroup to BooleanFilter and some refactoring
- a91d569d - use prettier
- 739db589 - refactoring in progress
- 81701b02 - change the code related to rendering of sourcefilters
- 571cdd7a - change getFilterDefinitions() in remaining places
- 7d176c4b - change getFilterDefinitions() in remaining place
Toggle commit list-
6cb4b7d7 - 1 commit from branch
9 9 */ 10 10 final class BooleanFilter extends FilterBase { 11 11 12 public function __construct(public bool $value, mixed ...$arguments) { 12 public function __construct(public bool $value, public readonly array $options, mixed ...$arguments) { BooleanFilter should not behave like a set of options. If anything, this should simply allow for a distinct "on label" and "off label", like this:That said, the intention of BooleanFilter was to display as a single checkbox, so I'm not sure you even need to do this. On the frontend, you could render it like this (pseudo-code):
<input type="radio" value="1" />${filter_name} <input type="radio" value="0" />${Drupal.t('Show all')}
But having BooleanFilter accept an array of options like this is a misunderstanding of what BooleanFilter is intended to do, so I think we need to correct that before this can proceed.
Edited by Adam G-Hchanged this line in version 11 of the diff
252 filterType="developmentStatus" 253 changeHandler={onAdvancedFilter} 254 let:id 255 let:label 256 > 257 <label 258 slot="label" 259 class="search__checkbox-label" 260 for={`developmentStatus${id}`} 261 > 262 {label} 263 </label> 264 </FilterGroup> 265 {/if} 214 {#each Object.entries($sourceFilters) as [type, filter]} 215 {#if filter._type === 'boolean'} 256 > 257 <label 258 slot="label" 259 class="search__checkbox-label" 260 for={`developmentStatus${id}`} 261 > 262 {label} 263 </label> 264 </FilterGroup> 265 {/if} 214 {#each Object.entries($sourceFilters) as [type, filter]} 215 {#if filter._type === 'boolean'} 216 <BooleanFilter 217 filterTitle={filter.name} 218 filterData={filter.options} 219 filterType={type} - Comment on lines +217 to +219
changed this line in version 18 of the diff
added 10 commits
-
f7049e1c...50e70d15 - 3 commits from branch
project:2.0.x
- e299bd3d - Rename FilterGroup to BooleanFilter and some refactoring
- 4a5cbba0 - use prettier
- d9b62ed4 - refactoring in progress
- 6fd5306d - change the code related to rendering of sourcefilters
- 7bde48fc - change getFilterDefinitions() in remaining places
- b8f1a476 - change getFilterDefinitions() in remaining place
- 4b89c1f6 - Rename Filter to MultipleChoiceFilter
Toggle commit list-
f7049e1c...50e70d15 - 3 commits from branch
added 15 commits
-
f77aba29...0f408503 - 3 commits from branch
project:2.0.x
- 0f408503...c0506d85 - 2 earlier commits
- a4c62796 - refactoring in progress
- 1ac7cd4f - change the code related to rendering of sourcefilters
- c342c055 - change getFilterDefinitions() in remaining places
- 7cb87186 - change getFilterDefinitions() in remaining place
- b022eca8 - Rename Filter to MultipleChoiceFilter
- 3583fce5 - remove $options from BooleanFilter
- e66f51ba - phpcs and cspell fixes
- cf4ac353 - eslint error fix
- 9045b009 - remove comment
- 46842875 - fix tests
Toggle commit list-
f77aba29...0f408503 - 3 commits from branch
added 13 commits
-
d7ac4d3d - 1 commit from branch
project:2.0.x
- d7ac4d3d...dcd21b99 - 2 earlier commits
- 72bdfbbd - refactoring in progress
- 559acb67 - change the code related to rendering of sourcefilters
- 4a491154 - change getFilterDefinitions() in remaining places
- 068ee625 - change getFilterDefinitions() in remaining place
- e4171fde - Rename Filter to MultipleChoiceFilter
- fe3022c3 - remove $options from BooleanFilter
- 10de1f3a - phpcs and cspell fixes
- c646ba7f - eslint error fix
- 177162f9 - remove comment
- 1dfa18da - fix tests
Toggle commit list-
d7ac4d3d - 1 commit from branch
Please register or sign in to reply