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 printing support for reports that are longer than one page #2582

Closed

Conversation

mehmetoguzderin
Copy link
Contributor

Aims to fix #2563 issue.

This pull request adds a printing button that calls printing from iframe to the left of EXPLORE when using report view and changes the styling of the fixed container when in report view to make it possible to print a clean page without undesired bordering and page limiting.

Copy link
Contributor

@wlach wlach left a comment

Choose a reason for hiding this comment

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

Thanks for looking at this @mehmetoguzderin! I did some followup research myself and it does sound like this is the best possible approach given how the printing APIs work, we can see what @bcolloran thinks (note that I expect things will slow down a bit during the end-of-year holidays).

@@ -16,9 +16,17 @@ export class ViewModeToggleButtonUnconnected extends React.Component {
};
Copy link
Contributor

Choose a reason for hiding this comment

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

We probably would want to factor this into its own higher-level component, as it's not really a button anymore.

There are other minor UI Chrome elements that we want in the report view (like a spinner icon when the document is loading) so this might be an opportunity to pave the way for that.

variant="text"
mini
>
Print
Copy link
Contributor

Choose a reason for hiding this comment

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

Could probably use a printer icon as opposed to a textual button here, I'm sure material ui has one.

style.position = "static";
style.border = "none";
style.overflow = "visible";
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I suspect it is possible to do this with pure css / emotion, which is probably preferable.

@bcolloran
Copy link
Contributor

thanks for the PR @mehmetoguzderin -- unfortunately, i think this is not the way we want to go with this issue
see #2563 (comment)

@bcolloran bcolloran closed this Jan 6, 2020
@mehmetoguzderin
Copy link
Contributor Author

@bcolloran Thanks for the feedback!

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.

Print whole report to PDF
3 participants