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

Add share links component #308

Merged
merged 1 commit into from
May 15, 2018
Merged

Add share links component #308

merged 1 commit into from
May 15, 2018

Conversation

andysellick
Copy link
Contributor

@andysellick andysellick commented May 14, 2018

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 to gem-c and in JS to GemTrackShareButtonClicks.

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

@tijmenb tijmenb temporarily deployed to govuk-publishing-compon-pr-308 May 14, 2018 10:12 Inactive
@tijmenb tijmenb temporarily deployed to govuk-publishing-compon-pr-308 May 14, 2018 10:13 Inactive
@tijmenb tijmenb temporarily deployed to govuk-publishing-compon-pr-308 May 14, 2018 10:19 Inactive
@tijmenb tijmenb temporarily deployed to govuk-publishing-compon-pr-308 May 14, 2018 10:47 Inactive
@andysellick andysellick requested a review from vanitabarrett May 14, 2018 10:47
twitter_href ||= false
%>
<% if facebook_href || twitter_href %>
<div class="gem-c-share-links dont-print" data-module="track-share-button-clicks">
Copy link
Contributor

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

Copy link
Contributor Author

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?

Copy link
Contributor

@vanitabarrett vanitabarrett May 15, 2018

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

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?

@andysellick andysellick merged commit 40c59a3 into master May 15, 2018
@andysellick andysellick mentioned this pull request May 15, 2018
@barrucadu barrucadu deleted the add-share-links branch January 2, 2019 15:42
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.

None yet

3 participants