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

Problems: Add Copy Code Button #821

Open
cuihtlauac opened this issue Jan 16, 2023 · 2 comments
Open

Problems: Add Copy Code Button #821

cuihtlauac opened this issue Jan 16, 2023 · 2 comments
Labels
enhancement New feature or request exercise ui

Comments

@cuihtlauac
Copy link
Collaborator

It would be nice to have a button allowing to copy the problem code fragments, either in statement and solution.

@cuihtlauac cuihtlauac added enhancement New feature or request documentation labels Jan 16, 2023
@cuihtlauac cuihtlauac changed the title Porblems: Add Copy Code Button Problems: Add Copy Code Button Jan 16, 2023
@sabine sabine added the ui label Jan 17, 2023
@sabine
Copy link
Collaborator

sabine commented Jan 26, 2023

What needs to be done:

  1. extend problem.ml to provide statement_ml and solution_ml (or maybe there are better names) string fields that contain the strings that should be copied to clipboard. I think that means stripping the markdown code blocks and turning all non-code text into comments because it would be nice to have the full problem statement copied, not only the code block.
  2. add a button in the UI to copy to clipboard.

@sabine
Copy link
Collaborator

sabine commented Feb 20, 2023

After getting some feedback from the community it became clear that it is not that clear what should happen here: Some users would greatly prefer that exercises are also available for offline consumption, e.g. in a git repository or with a command line application that also checks that the exercise is solved correctly.

IMO it would be nice to have an "open in playground" button because the same code that is copied to the playground could also be made available separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request exercise ui
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants