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

fix(catalog): BCTHEME-40 Cornerstone - Product Reviews Not Showing If… #1699

Merged
merged 1 commit into from
Jul 2, 2020

Conversation

BC-tymurbiedukhin
Copy link
Contributor

@BC-tymurbiedukhin BC-tymurbiedukhin commented Jun 23, 2020

… 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)

Screenshot 2020-06-23 at 20 58 28

Screenshot 2020-06-23 at 20 58 43

Screenshot 2020-06-23 at 20 59 01

Screenshot 2020-06-23 at 20 59 15

ping @junedkazi @yurytut1993

@bigbot
Copy link

bigbot commented Jun 23, 2020

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,
Copy link
Contributor

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 to true ? Is this a product decision cc @bc-as ?

Copy link
Contributor Author

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

Copy link
Contributor

Choose a reason for hiding this comment

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

@junedkazi @BC-tymurbiedukhin

  • 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)}}
Copy link
Contributor

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 ?

Copy link
Contributor Author

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

@junedkazi
Copy link
Contributor

@BC-tymurbiedukhin I will wait for a confirmation if this is tested and good to merge.

@junedkazi junedkazi merged commit 20e6f5b into bigcommerce:master Jul 2, 2020
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.

4 participants