Open fiveop opened 2 days ago
Hi @fiveop - thank you for the contribution! I have spoken to @tobyhodges about this and we have a couple of concerns:
A compromise could be that this copy paste option is only enabled when a configuration setting is provided, e.g. a "debug" or development mode for that lesson. This would allow lesson developers and maintainers to turn this on locally and use the functionality to quickly debug issues and code blocks. This would also mean that our official lessons would have this option disabled and the lessons would look as they do now.
Would this be a fair solution?
I have not thought of that and I admit that it is very rare that I missed such a button, mostly while preparing for a course, or as you suggest, while working on the material. Regarding your arguments:
Overall such a button offers a small convenience, replacing a selection and a shortcut with a single click. Given your arguments, I would suggest to leave the button out of the learners’ view, but show it in the instructors’ view. Though for me, that would be a compromise, as I tend towards trusting other people to act in their best interest after having instructed them how to do so.
An accompanying patch (https://github.com/carpentries/sandpaper/pull/625) for sandpaper adds buttons with class copy-button to code blocks.
The styling of the button is a suggestion.
The overall intention is to resolve https://github.com/carpentries/workbench/issues/58.