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

Allow <nav> elements to be printed #610

Merged
merged 3 commits into from Jun 26, 2015
Merged

Allow <nav> elements to be printed #610

merged 3 commits into from Jun 26, 2015

Conversation

@fofr
Copy link
Contributor

@fofr fofr commented Jun 26, 2015

This is to fix printed topic pages, which were showing as completely blank. See: https://www.gov.uk/topic/land-registration/practice-guides

  • Introduce a helper class for hiding content when printing dont-print
  • Allow nav elements to be printed
  • But continue to hide nav elements found within a header, eg a proposition menu

https://trello.com/c/7GEsR48R/5-users-are-unable-to-print-topic-pages-medium
https://govuk.zendesk.com/agent/tickets/1061367

These changes have been tested against the most popular printed pages. (One notable change is that related links blocks now show a header as well as the list of links, rather than a header without any content.)

Before

screen shot 2015-06-26 at 15 44 20

After

screen shot 2015-06-26 at 15 44 49

cc @edds

fofr added 3 commits Jun 25, 2015
Add a helper class to make it easy to avoid printing any given HTML
element and be explicit about it. This should reduce reliance on more
generic print styles.
Topic pages are essentially all `nav`, so when printed they currently
print just a blank page. Allow `nav` elements to be printed again.

https://trello.com/c/7GEsR48R/5-users-are-unable-to-print-topic-pages-me
dium

Example
https://www.gov.uk/land-registration/practice-guides
Nav elements within a header are typically site navigation and not page
content, and should continue to be hidden. (See Whitehall’s proposition
menu)
edds added a commit that referenced this pull request Jun 26, 2015
Allow <nav> elements to be printed
@edds edds merged commit 6c5a9c8 into master Jun 26, 2015
1 check passed
1 check passed
default "Build #522 succeeded on Jenkins"
Details
@edds edds deleted the print-navs branch Jun 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.