-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(atomic): fix facet and product list loading state (#4080)
* Set the `loadingFlag` in `atomic-commerce-interface`: We need this to be set, otherwise components wrongly assume that "everything is loaded and ready to go". For end user, this fixes an issue with `atomic-product-list` removing placeholders too quickly without anything to render except a big blank empty state. * Use a property `numberOfPlaceholders` to decide the number of placeholder to display for the product list: using the number of products in headless state means its always 0, because the products are still being loaded/not yet returned from the backend yet. Making the placeholder useless otherwise. * Add a `<FacetPlaceholder />` display in `atomic-commerce-facets` while the app is being loaded (ie: while the product list is still rendering a placeholder). This reduces the (annoying) layout shifts. * Remove `random()` usage from `<FacetPlaceholder />`: This causes weird flicker issue with the placeholder `width` changing on every render loop. https://coveord.atlassian.net/browse/KIT-3311
- Loading branch information
Showing
5 changed files
with
31 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters