-
Notifications
You must be signed in to change notification settings - Fork 20
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
Add share links component #308
Conversation
1a84577
to
51f81f1
Compare
51f81f1
to
c4baca4
Compare
c4baca4
to
5cfcd46
Compare
twitter_href ||= false | ||
%> | ||
<% if facebook_href || twitter_href %> | ||
<div class="gem-c-share-links dont-print" data-module="track-share-button-clicks"> |
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.
The corresponding Javascript needs to be copied over for this tracking to work
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.
Ah, thanks, good spot. Is there a reason this isn't just using the standard tracking?
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'm not sure, it looks like it was copied over when the links were moved from Whitehall alphagov/government-frontend#207
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.
Okay, I'll see if I can reproduce it using the standard module. Also if we pass the tracking, that makes it more flexible for the changes I'm planning.
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.
On second thought, I'll do that when I iterate the component, as it's a fairly major change and it'll block this PR. Have added the necessary JS - happy to approve?
5cfcd46
to
b7b3ec7
Compare
Adds the share links component from government-frontend. A separate PR will be raised to remove it from that app.
Only change in this component is the namespace, in CSS from
app-c
togem-c
and in JS toGemTrackShareButtonClicks
.Component guide link: https://govuk-publishing-compon-pr-308.herokuapp.com/component-guide/share_links
Trello card: https://trello.com/c/NZwDW9xV/89-modify-component-share-links