Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multisearch + dynamic filters V2 #22

Merged
merged 16 commits into from
Sep 3, 2024
Merged

Multisearch + dynamic filters V2 #22

merged 16 commits into from
Sep 3, 2024

Conversation

Zales0123
Copy link
Collaborator

@Zales0123 Zales0123 commented Aug 30, 2024

Replaces #17

In the beginning, I wanted to separate those concepts, as I already wrote to @loevgaard... but as I started the refactor and improvements on #17 it was eventually hard (and potentially time-consuming) to come back to the single search feature. Therefore, I decided to left them coupled to each other, I hope the PR is not too big (spoiler alert: it will be xD 💃)

The main things that were done in this PR:

  • multi-search functionality (added already in Refactor the Search Engine & Filter Builder #17)
  • slight SearchEngine refactoring (see to-dos)
  • dynamic filters - compared to implementation from the previous PR, filters are generated based on the #[Facet] attribute on the documented entity. The type of the filter is generic, based on the type of the property, which does not have to be defined in the attribute (it's taken from the property/method reflection data)
  • dynamic filers form types (that also use the #[Facet] attribute)
  • added a new filter for price + a corresponding filter form type (I don't know if it was required xD but I suppose it does not harm, as we approach facets in a generic way 🚀)

The current functionality is shown in the video below:

Nagranie.z.ekranu.2024-08-30.o.14.30.36.mov

What is left to be done:

  • refactor SearchEngine fully (there are a couple of private methods there, each of them could and should be a separate service)
  • simplify facets forms builders (I have a feeling they're a little bit overcomplicated)
  • improve the price filter UI (it's hideous 🤮)
  • add some test cases to the SearchTest
  • test adding some new facet, if it will be automatically resolved

🖖

{% block setono_sylius_meilisearch_facet_range_row %}
<div class="facet facet-range">
{{ form_label(form) }}
<div class="ui small labeled input" style="margin-bottom: 1rem;">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually didn't use any Semantic CSS markup because I reckon nobody uses it, so by not using it, maybe, just maybe they won't have to override this file :D

You don't have to fix it. I can just fix it in another PR :)

…\MetadataInterface::getFacetableAttributeNames
@loevgaard loevgaard merged commit e505ddf into master Sep 3, 2024
33 of 36 checks passed
@loevgaard loevgaard deleted the multisearch-v2 branch September 3, 2024 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants