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

Make tutorials printable #467

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Make tutorials printable #467

wants to merge 4 commits into from

Conversation

siebrenf
Copy link

@siebrenf siebrenf commented Jan 8, 2021

see FR

PR task list:

  • Update NEWS
  • Add tests (if possible)
  • Update documentation with devtools::document()

@CLAassistant
Copy link

CLAassistant commented Jan 8, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@gadenbuie
Copy link
Member

Thank you for packaging this in a pull request, but I don't think we'd want to add a print button to every learnr tutorial and I don't think we'd want to add an argument to learnr::tutorial() to cover this feature.

Another possible solution would be to add a function — tutorial_print_button() or tutorialPrintButton()? — that would wrap the CSS and JavaScript in this PR that could be called by a user to add a print button, either to the tutorial footer or directly wherever the function is called.

That approach would also solve the problem of not wanting to add the print CSS to tutorials where authors don't want users to print the tutorial to "see ahead".

@siebrenf
Copy link
Author

I thought I'd pack it up since you've already wrote the whole solution, but I understand this implementation might not be desired. Unfortunately, I have no idea how to implement your suggestion (3 languages in 1 function, adding elements to the footer and CSS). Feel free to close this PR if it's easier to start from scratch/too much of a hassle!

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