-
Notifications
You must be signed in to change notification settings - Fork 609
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
fix(catalog): BCTHEME-40 Cornerstone - Product Reviews Not Showing If… #1699
Conversation
Autotagging @bigcommerce/storefront-team @davidchin |
@@ -81,7 +81,7 @@ | |||
"show_accept_googlepay": false, | |||
"show_accept_klarna": false, | |||
"show_product_details_tabs": true, | |||
"show_product_reviews_tabs": false, | |||
"show_product_reviews": true, |
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.
I have a couple of questions here;
- Is there a reason to change the key name here specially when for product desc we still use
show_product_details_tabs
? I like the old name was explicit and clear. - Why are we changing the default from
false
totrue
? Is this a product decision cc @bc-as ?
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.
- in theme builder we have checkbox with name "Show product reviews" but previous logic was depending on show_products_reviews_tab. Now logic have been changed and "Show product reviews" checkbox is responsible for product reviews display. So, for better code semantic I decided to change its name to current
- In case of false we won't see any product reviews, so in case of testing we need to set it to true anyway. It's not a decision of @bc-as
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.
- We should keep the same key here for consistency and to ensure that merchants don't have an issue when they update their theme. That being said, the option in page builder/theme editor is "Show product reviews" and not "Show product reviews tab".
- Product reviews should be turned on by default unless the merchant wants to opt out
@@ -27,7 +27,7 @@ | |||
{{> components/products/videos product.videos}} | |||
{{/if}} | |||
|
|||
{{#all settings.show_product_reviews (if theme_settings.show_product_reviews_tabs '!==' true)}} | |||
{{#all settings.show_product_reviews theme_settings.show_product_reviews (if theme_settings.show_product_details_tabs '!==' true)}} |
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.
Can we also remove the '!==' true
here for the show_product_details_tabs
?
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.
Are there any more elegant way to check if the flag is falsy? If not, it will break a condition logic
@BC-tymurbiedukhin I will wait for a confirmation if this is tested and good to merge. |
… Tabs Disabled
What?
On the most recent version of Cornerstone, 3.2.2, if you have tabs disabled and reviews set to show in the theme editor, the product reviews will not be displayed.
In theme setting we have two checkboxes "Show descriptions tabs"(let it be D) and "Show product reviews"(let it be R). And we have to handle any combinations of these checkbox enabling ('+' means turned on, '-' means turned off)
Previous logic:
+D+R = both description and reviews tabs
+D-R = description tab and expandable review section
-D-R = text description and expandable review section
-D+R = only text description (that is an issue because when R checkbox is enabled we can’t see any reviews)
Current logic:
+D+R = both description and review tabs,
+D-R = description tab,
-D-R = text description,
-D+R = text description + expandable review section
Tickets / Documentation
https://jira.bigcommerce.com/browse/BCTHEME-40
Screenshots (if appropriate)
ping @junedkazi @yurytut1993