| Comment | File | Size | Author |
|---|---|---|---|
| #27 | interdiff_3047910_21-27.txt | 8.89 KB | Denis Degtyarev |
| #27 | facets-3047910-27.patch | 20.05 KB | Denis Degtyarev |
| #25 | Peek 05-04-2022 10-14.gif | 6.07 MB | grimreaper |
| #21 | 3047910_21.patch | 19.6 KB | mkalkbrenner |
| #21 | 18-21-interdiff.txt | 10.25 KB | mkalkbrenner |
Issue fork facets-3047910
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
niko- commentedComment #3
niko- commentedComment #4
niko- commentedComment #6
kienan commentedThe patch worked for me and seems good. I think the tests just need to be updated or something since they complain about unknown property operator: as if the object saved didn't have the data on it. Haven't looked how the facets are added in the test suite, so I'm not sure if my guess is tending in the right direction.
Comment #7
mhavelant commentedI tested the patch, and I have the following notes:
plugin.plugin_configuration.facets_processor.dependent_processoras the processor settings,operator: booleandoes not conform to that. The schema needs to be updated to a mapping with operator (boolean) and facets (plugin.plugin_configuration.facets_processor.[%parent.processor_id]). This also requires an update hook for migrating the configs to the new schema.Comment #9
grimreaperHi,
I will try to update the patch and switch to MR workflow.
Comment #11
grimreaperRegarding comment 7.
- Config schema fixed with hook_update_N to update it.
- Existing tests fixed.
- Currently adding new ones.
I am not sure about the performance optimization, focusing on tests so this kind of refactoring will be covered.
Also realizing that tests/src/Unit/Plugin/processor/DependentFacetProcessorTest.php does not cover all the existing cases ('values').
Comment #12
grimreaperNew test added.
Comment #13
grimreaperComment #14
mkalkbrennerThe patch looks good to me, but it would good to have someone confirming that it works in their setup. Especially the update hook!
Comment #15
anybody@mhavelant, @kienan, @niko- could you perhaps test and review the patch (https://git.drupalcode.org/project/facets/-/merge_requests/57.diff) to push things forward here, as you reported the error or added useful information?
It would help a lot to get feedback if it's working in your setup! (And might fix your issues)
Thanks a lot in advance :)
Comment #16
grimreaperComment #17
mkalkbrennerUnfortunatley this patch needs to be adjusted to the changes introduced by #2908937: Dependend Facets don't reset after Conditions are not met anymore..
Comment #18
grimreaper@mkalkbrenner: I am not sure how to solve the last failing test as it may be an edge case of #2908937: Dependend Facets don't reset after Conditions are not met anymore..
I attached the results of locally runned tests.
In the HTML we can see "Displaying 3 search results"
The URL is /search-api-test-fulltext?f%5B0%5D=dependingfacet%3Agrape so the depending facet is not reset.
Comment #19
mkalkbrennerComment #21
mkalkbrennerComment #22
mkalkbrennerIt is not an edge case, you broke the feature entirely ;-)
You changed the structure of the of the conditions but you didn't adjust it in the DefaultFacetManager accordingly:
Comment #23
mkalkbrennerRTBC?
Comment #24
grimreaperHi,
Thanks for the updated patch.
I didn't thought to look outside the plugin!
Way cleaner code by the way!
Testing locally quickly.
Comment #25
grimreaperHum, I have reinstalled facets after applying the patch from comment 21.
I have recorded my test as a Gif.
Two problems.
With AND: if I select a value in the depending facet and unselect a dependent facet you can see that the value is not removed in the URL and still applied.
With OR: Facet "ID" is displayed when both other facets have a value whereas it should be when one has a value.
I don't know then if tests coverage is enough.
Comment #26
grimreaperComment #27
Denis Degtyarev commentedRerolled patch from comment #21 against version 2.0.6. Didn't test comment #25.