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

feat(facets): Unify __unknown__ and __unknown-facet__ in a constant #1351

Merged
merged 5 commits into from
Nov 16, 2023

Conversation

annacv
Copy link
Contributor

@annacv annacv commented Nov 7, 2023

Pull request template

Create UNKNOWN_FACET_KEY constant to identify filters without facetId (RawFilter).

BREAKING CHANGES:

  • The '__unknown-facet__' value for a facetId is deprecated: it has been replaced by the UNKNOWN_FACET_KEY constant, whose value is '__unknown__'.

Motivation and context

Right now we’re identifying unknown facets giving them either __unknown__ or __unknown-facet__ as id.
We should unify this and use a constant instead of a plain string.

  • Dependencies. If any, specify:
  • Open issue. If applicable, link: EMP-2674

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that causes existing functionality to not work as expected)
  • Change requires a documentation update

What is the destination branch of this PR?

  • Main
  • Other. Specify:

How has this been tested?

Tests performed according to testing guidelines:

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review on my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@annacv annacv requested a review from a team as a code owner November 7, 2023 16:00
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the file for the constants that we're injecting in several places of the app, we're not injecting the new constant anywhere so it shouldn't be here.
A better place would be in the facets module. See the history queries module for an example.

@annacv annacv requested a review from CachedaCodes November 9, 2023 15:13
@diegopf diegopf merged commit 30585f2 into main Nov 16, 2023
4 checks passed
@diegopf diegopf deleted the feature/EMP-2674-Unify-unknown-in-a-constant branch November 16, 2023 12:03
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.

3 participants