fix: re-enable code copying#463
Conversation
✅ Deploy Preview for chatterino-wiki-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
I'm OK with this, but I don't think any block of code in the Themes or Contributing sections should have a copy button - https://deploy-preview-463--chatterino-wiki-dev.netlify.app/Crash%20Analysis/#minidump-stackwalk is basically the only section where copy button makes sense since it's a "copy and fix last argument" kind of thing
Why does this not make sense here? If I wanted to write a theme from scratch, I would want to copy the whole code block. I shouldn't need to manually select the block.
If I wanted to play around with the code, I shouldn't need to manually select the block. I think we should be liberal with the copy button. We should only disable it where copying & pasting the whole block would result in some error (as with the terminal sessions). Copying the example in the themes section gives you valid JSON(5), in the contributor docs you get syntactically correct C++. |
...but disable it for the logging examples, as described in #462 (comment).
We already have code examples in the theme and developer documentation where it makes sense to copy code. Let's not break this.