Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Filter data count mismatch > Ensure a single request is made to return the correct attributes count #8604

Closed
nefeline opened this issue Mar 2, 2023 · 1 comment · Fixed by #8599
Assignees
Labels
block: filter by attribute Issues related to the Filter by Attribute block. type: bug The issue/PR concerns a confirmed bug.

Comments

@nefeline
Copy link
Contributor

nefeline commented Mar 2, 2023

While working on #8599 it was possible to verify that 3 API requests are made to return the attribute count data, but only the third one contains the term slug variable required to correctly calculate the results. As a consequence, in addition to fixing the queries, we also need to ensure the request is triggered once and only when needed.

@nefeline nefeline self-assigned this Mar 2, 2023
@nefeline nefeline added block: filter by attribute Issues related to the Filter by Attribute block. type: bug The issue/PR concerns a confirmed bug. labels Mar 2, 2023
@nefeline
Copy link
Contributor Author

nefeline commented Mar 15, 2023

Hey @roykho! This issue is one of the last still pending for wrapping up our Filter data count mismatch project, and since I'll be AFK for the rest of this week, it would be nice if you could continue the investigation here: we can re-group and discuss next week!

Initial Setup:

Current Scenario:

Without any changes on the JS side, this is what currently happens on the FE:

Screen.Recording.2023-03-14.at.22.36.27.mov
  • Notice how the attribute counts don't change at all when any of the filter attributes are selected.
  • Notice how the attribute counts are correctly updated when the price changes.

Now apply the changes done on #8724 , you should see the following:

Screen.Recording.2023-03-14.at.22.49.01.mov
  • Notice how the attribute counts are updated correctly when the color attribute is filtered, but the Filter block for the attributes size disappears from the screen.
  • Notice how the attribute counts are updated correctly when the price changes.

So while with the changes made on #8724 we are fixing the problem when an individual filter by attribute block is displayed on a page, that's not the case when we have multiple filter blocks. In this example, we still need to figure out why the second attribute filter block is not rendered when filtering attributes on the first.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: filter by attribute Issues related to the Filter by Attribute block. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
1 participant