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

Implement abstract Block facet feature class #3499

Merged
merged 18 commits into from Aug 7, 2023

Conversation

oscarssanchez
Copy link
Contributor

@oscarssanchez oscarssanchez commented Jun 18, 2023

Description of the Change

This PR implements two abstract classes for the Facets feature. It tries to gather as many commonalities as possible from the facets so in the future, if we need to add subsequent Facet types, we can use the abstract classes as a guide to reduce developing times.

Closes #3472

How to test the Change

Changelog Entry

Changed - Moved methods to abstract facet class

Credits

Props @oscarssanchez, @felipeelia

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@oscarssanchez
Copy link
Contributor Author

As a next step, we could think about get_facet_item_value_html() and make a decision if it makes sense to take out the "is_selected" values and merge them into one array, or if we just want to handle them separately.

Both have implications specially in the original Facet feature block. We'll need to deprecate those parameters accordingly.

@oscarssanchez oscarssanchez changed the title WIP: Implement abstract Block facet feature class Implement abstract Block facet feature class Jun 21, 2023
@felipeelia felipeelia added this to the 4.7.0 milestone Jul 4, 2023
@felipeelia felipeelia assigned felipeelia and unassigned felipeelia Aug 3, 2023
Copy link
Member

@felipeelia felipeelia left a comment

Choose a reason for hiding this comment

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

@oscarssanchez I've pushed a commit changing a few things but it seems we still need to change the check_facets_rest_permission call in other Block.php files. Also, do you mind calling me on slack to explain more about that $is_selected parameter? I remember we talked about it but now that I looked into it, it seems unnecessary.

@felipeelia felipeelia merged commit 93d8ead into develop Aug 7, 2023
9 checks passed
@felipeelia felipeelia deleted the feature/facet-abstract-classes branch August 7, 2023 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhancement: Default methods for Facet Block class
2 participants