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

STRF-3382 display facebook like button when enabled #1530

Merged
merged 1 commit into from
Jul 9, 2019

Conversation

bc-williamkwon
Copy link
Contributor

@bc-williamkwon bc-williamkwon commented Jun 27, 2019

What?

Display like button when it is enabled through control panel. This pull request is to fix a bug where the facebook like button would not display when enabled.

Tickets / Documentation

Add links to any relevant tickets and documentation.

Screenshots (if appropriate)

Attach images or add image links here.

Screen Shot 2019-06-26 at 9 54 27 PM

@bigbot
Copy link

bigbot commented Jun 27, 2019

Autotagging @bigcommerce/storefront-team @davidchin

@bc-williamkwon bc-williamkwon force-pushed the facebookLike branch 3 times, most recently from cc8d5d0 to 357ff96 Compare June 27, 2019 17:59
@@ -230,6 +230,7 @@ <h2 class="productView-brand"{{#if schema}} itemprop="brand" itemscope itemtype=
{{/if}}
</div>
{{> components/common/share}}
{{#if settings.facebook_like_button}}{{{settings.facebook_like_button}}}{{/if}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this go in the common/share component? Do we only want it to show on this page, or anywhere we have the share buttons?

Copy link
Contributor Author

@bc-williamkwon bc-williamkwon Jun 28, 2019

Choose a reason for hiding this comment

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

Facebook like button isn't the same as the other share buttons it's an iframe and not an icon for one. I think it's good to keep them separate also the other share icons are linked to addthisservices but facebook like is not. It also seems to be specifically for the product page.

{{else}}
<amp-social-share class="amp-social-share" data-vars-product-link="{{url}}" data-vars-product-id="{{id}}" data-vars-product-name="{{name}}" data-vars-social-type="{{service}}" type="{{service}}"></amp-social-share>
{{/if}}
<amp-social-share class="amp-social-share" data-vars-product-link="{{url}}" data-vars-product-id="{{id}}" data-vars-product-name="{{name}}" data-vars-social-type="{{service}}" type="{{service}}"></amp-social-share>
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like you are blending this change with #1526. Can you separate them?

Copy link
Contributor

@mattolson mattolson left a comment

Choose a reason for hiding this comment

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

We should put the markup for the facebook like button into the theme to allow for better customization.

@bc-williamkwon bc-williamkwon force-pushed the facebookLike branch 5 times, most recently from 470816f to d2e7008 Compare June 30, 2019 03:37
mattolson
mattolson previously approved these changes Jul 1, 2019
@mattolson mattolson dismissed their stale review July 1, 2019 17:58

forgot something

@bc-williamkwon bc-williamkwon force-pushed the facebookLike branch 3 times, most recently from e0ea153 to d658954 Compare July 1, 2019 20:09
allowTransparency="true">
</iframe>
{{/if}}
{{/if}}
Copy link
Contributor

Choose a reason for hiding this comment

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

EOL is missing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

@@ -230,6 +230,7 @@ <h2 class="productView-brand"{{#if schema}} itemprop="brand" itemscope itemtype=
{{/if}}
</div>
{{> components/common/share}}
{{> components/common/facebook-like-button}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason why we can't pull this component inside {{> components/common/share}}

Copy link
Contributor Author

@bc-williamkwon bc-williamkwon Jul 3, 2019

Choose a reason for hiding this comment

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

I thought it would be better to separate it out since everything else is a svg instead of an iframe and they are about sharing whereas this is about liking but no real reason. Also, the majority of share.html is ShowAddThisServices but facebook like isn't part of that.

Copy link
Contributor

@junedkazi junedkazi Jul 3, 2019

Choose a reason for hiding this comment

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

@bookernath do you have an opinion on this one ? If not this PR is good to go.

Copy link
Contributor

Choose a reason for hiding this comment

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

I like the idea of putting this new component inside the share component.

If I were a theme developer that wanted to move my share icons around on the page, I'd probably expect Facebook to come along for the ride, so I think that would be more convenient.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made the requested changes @bookernath

junedkazi
junedkazi previously approved these changes Jul 3, 2019
mattolson
mattolson previously approved these changes Jul 8, 2019
@bookernath bookernath merged commit 0082ae6 into bigcommerce:master Jul 9, 2019
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.

5 participants