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

Fix print logins #27213

Merged
merged 2 commits into from Feb 25, 2019
Merged

Fix print logins #27213

merged 2 commits into from Feb 25, 2019

Conversation

maddiedierker
Copy link
Contributor

@maddiedierker maddiedierker commented Feb 23, 2019

Fixes LP-148 (logged after the fact for tracking purposes).

Found 2 small bugs while testing /login_info for picture sections:

  1. Automatically calling printWindow.print() when the print window opens causes the students' secret pictures to not load. Solution: Don't automatically call .print(). This means the teacher will have to print themselves, which I assume they know how to do, but there may be a better solution for this.
  2. If things don't line up properly, login cards can get cut-off (meaning, a page would print 2.5 cards, where the third card would be cut-off). Solution: Add pageBreakInside: 'avoid' for login cards.
    screen shot 2019-02-22 at 4 40 03 pm

@@ -226,7 +227,6 @@ class WordOrPictureLogins extends React.Component {
printWindow.document.write('<body onafterprint="self.close()">');
printWindow.document.write(printArea);
printWindow.document.write('</body></html>');
printWindow.print();
Copy link
Contributor

Choose a reason for hiding this comment

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

😂 I wonder if we'll get complaints about this. Either way, I think it's worth a shot and we can do something more complicated around waiting for all images to load later, if we really need to.

@maddiedierker maddiedierker merged commit 16f65f3 into staging Feb 25, 2019
@maddiedierker maddiedierker deleted the fix-print-logins branch February 25, 2019 17:56
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

2 participants