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

Update "print entire guide" functionality #2315

Merged
merged 1 commit into from
Jan 6, 2022

Conversation

jon-kirwan
Copy link
Contributor

@jon-kirwan jon-kirwan commented Dec 13, 2021

What

https://trello.com/c/OlsybM1y/914-update-print-entire-guide-functionality

  • Remove Print entire guide button and replace with link View a printable version of the whole guide and
  • Replace print link component with a hyperlink to the printable version page (/print)
  • Disable the print dialogue from automatically appearing on the printable version page (/print)
  • Add additional copy below page h1, Printable version using the lead paragraph component
  • Add two Print this page buttons on the printable version page (/print)
  • Add analytics / click-rate tracking on both print buttons (top and bottom)

Why

Visual changes

Before (guide - content page) After (guide - content page)
Before (guide - printable version) After (guide - printable version)
Before (travel_advice - content page) After (travel_advice - content page)
Before (travel_advice - printable version) After (travel_advice - printable version)

Anything else

@govuk-ci govuk-ci temporarily deployed to government-f-update-pri-wexzio December 13, 2021 13:43 Inactive
@jon-kirwan jon-kirwan force-pushed the update-print-entire-guide-functionality branch from 6556290 to 5a052b9 Compare December 13, 2021 14:12
@govuk-ci govuk-ci temporarily deployed to government-f-update-pri-wexzio December 13, 2021 14:12 Inactive
@jon-kirwan jon-kirwan force-pushed the update-print-entire-guide-functionality branch from 5a052b9 to 2530046 Compare December 13, 2021 14:17
@govuk-ci govuk-ci temporarily deployed to government-f-update-pri-wexzio December 13, 2021 14:17 Inactive
@jon-kirwan jon-kirwan force-pushed the update-print-entire-guide-functionality branch from 2530046 to 30bffa9 Compare December 13, 2021 14:18
@govuk-ci govuk-ci temporarily deployed to government-f-update-pri-wexzio December 13, 2021 14:18 Inactive
@jon-kirwan jon-kirwan force-pushed the update-print-entire-guide-functionality branch from 30bffa9 to 3078c70 Compare December 13, 2021 14:40
@govuk-ci govuk-ci temporarily deployed to government-f-update-pri-wexzio December 13, 2021 14:40 Inactive
@jon-kirwan jon-kirwan force-pushed the update-print-entire-guide-functionality branch from 3078c70 to ae9ac66 Compare December 13, 2021 14:51
@govuk-ci govuk-ci temporarily deployed to government-f-update-pri-wexzio December 13, 2021 14:51 Inactive
@jon-kirwan jon-kirwan force-pushed the update-print-entire-guide-functionality branch from ae9ac66 to f08834f Compare December 13, 2021 14:56
@govuk-ci govuk-ci temporarily deployed to government-f-update-pri-wexzio December 13, 2021 14:56 Inactive
@jon-kirwan jon-kirwan force-pushed the update-print-entire-guide-functionality branch from f08834f to 880b7ad Compare December 13, 2021 15:05
@govuk-ci govuk-ci temporarily deployed to government-f-update-pri-wexzio December 13, 2021 15:05 Inactive
@jon-kirwan jon-kirwan force-pushed the update-print-entire-guide-functionality branch from 880b7ad to 6b0ac00 Compare December 13, 2021 16:28
@govuk-ci govuk-ci temporarily deployed to government-f-update-pri-wexzio December 13, 2021 16:29 Inactive
@jon-kirwan jon-kirwan marked this pull request as ready for review December 13, 2021 16:31
@govuk-ci govuk-ci temporarily deployed to government-f-update-pri-qqj0mz January 5, 2022 13:55 Inactive
Copy link
Contributor

@maxgds maxgds left a comment

Choose a reason for hiding this comment

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

One small thing for you to consider - happy to approve it if you and Nik decide it's ok as is.

Good point on the page structure, I'll raise another ticket for that. Please update the links on it, though, currently they point to the same example for both schema types.

title: @content_item.title,
} %>

<%= render 'govuk_publishing_components/components/lead_paragraph', {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this might benefit from adding govuk-!-display-none-print which means while it renders on screen it wouldn't show up in the printed version - one to check with Nik though. I think you'll have to use a wrapper to apply it as I don't think the lead paragraph can, or should, take extra classes.

I was in two minds about using the lead paragraph component as this doesn't seem to qualify as a paragraph, it's so short, but it does seem to match the use case when I looked at the docs so I think it should stay even if that does mean we need the extra clutter of a wrapper if we hide the text on the printout.

Whatever you do here obviously applies for the other case where it appears. While the same is true for the actual print button, that's handled by the component side and already applied.

Copy link

Choose a reason for hiding this comment

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

Spoke to @jon-kirwan and really like that idea @maxgds. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @maxgds - have updated both page / schema types as above. I can't see a way to pass in an extra class to the lead paragraph component either so instead have wrapped it with a div and added the govuk-!-display-none-print class.

I've updated in the same commit since it's quite a small change.

Also updated the link examples in the description.

@jon-kirwan jon-kirwan force-pushed the update-print-entire-guide-functionality branch from 6b0ac00 to 3d12664 Compare January 6, 2022 16:12
@govuk-ci govuk-ci temporarily deployed to government-f-update-pri-qqj0mz January 6, 2022 16:12 Inactive
@jon-kirwan jon-kirwan requested a review from maxgds January 6, 2022 16:31
@maxgds maxgds merged commit 962e25f into main Jan 6, 2022
@maxgds maxgds deleted the update-print-entire-guide-functionality branch January 6, 2022 17:40
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