-
Notifications
You must be signed in to change notification settings - Fork 0
Remove featured product list section from product list page - frontend changes #1488
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📦 Next.js Bundle AnalysisThis analysis was generated by the next.js bundle analysis action 🤖 🎉 Global Bundle Size Decreased
DetailsThe global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster. Any third party scripts you have added directly to your app using the If you want further insight into what is behind the changes, give @next/bundle-analyzer a try! Seven Pages Changed SizeThe following pages changed size from the code in this PR compared to its base branch:
DetailsOnly the gzipped size is provided here based on an expert tip. First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If Any third party scripts you have added directly to your app using the Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this. |
e77178e
to
03be51e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR ✌🏻 with some non-blocking comments. Nice job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR ✌🏻 Thanks!
QA 🎬
|
closes #1483
This PR removes the featured-product-list section since the new mockups do not include that component anymore.
Since the featured-product-list section was relying on Algolia, this forced us to put in place a "multi-index" Algolia configuration for the page, and this seems to bring some unwanted side effects. So this is also an opportunity to get rid of that.
In this PR we remove all the frontend code linked to the featured-product-list component.
Another PR will follow for the Strapi cleanup.
Detailed explanation
Having multiple indexes on the page means that the internal Algolia state needs to take into account both a facet-filtered search (the one associated to the main content) and a search without any facet (the one associated to a featured-product-list section).
So we effectively perform two queries towards Algolia.
By inspecting how the Algolia state updates, there is a short time window in which the internal Algolia state clears the list of facets. This is what causes the flicker described in #1483.
This was present also before we chose to hide the facets panel if empty: it was only less visible because the panel remained in place but the facets were briefly removed and then re-added.
Please note that this is not a transition from the previous facets to the new facets since the new facets were already visible before the facets were temporarily emptied.
You can see the two queries, the old behaviour of facets and all the details described above in the following video:
Screen.Recording.2023-03-21.at.12.31.31.mov
QA