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

Expand report <details> on print. Fixes #1240 #1468

Merged
merged 2 commits into from
Jan 14, 2017
Merged

Conversation

ebidel
Copy link
Contributor

@ebidel ebidel commented Jan 13, 2017

R: all

The people have spoken. They want better printing!

@brendankenny
Copy link
Member

FINALLY

@@ -45,7 +45,32 @@ function sendJSONReport() {
const popup = window.open(VIEWER_URL, '_blank');
}

/**
* Sets up listeners to expand audit `<details>` when the user prints the page.
Copy link
Member

Choose a reason for hiding this comment

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

this is kind of dumb, but maybe add a clause here that expanding <details> isn't possible via a print stylesheet? Whenever I think about this issue my first thought is always, "wait, why can't we just solve this in the print stylesheet?" and it probably will be again when I come across this function in the future :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@brendankenny
Copy link
Member

viewer doesn't inherit this, right? Should it?

@ebidel
Copy link
Contributor Author

ebidel commented Jan 14, 2017

viewer doesn't inherit this, right? Should it?

It will :)

Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

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

🖨 🥇

@brendankenny brendankenny merged commit 97d48d3 into master Jan 14, 2017
@brendankenny brendankenny deleted the printexpand branch January 14, 2017 01:29
@paulirish
Copy link
Member

Wow. The cross browser subtleties in this one are fascinating! Nice

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.

3 participants