Live user input for variable interpolation in code snippets #6027
Blargian
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Background
Sometimes in tutorials the user is asked to create their own GCS or S3 bucket. As the resource ids need to be unique, the writer ends up writing something like:
In the example above this is not a huge inconvenience to the reader, but if we imagine that there are 10 export statements rather than just a single one, it means that the user has to copy-paste their own value 10 times, which could be annoying.
Proposal
I propose adding the ability to accept live user input for variable interpolation in code blocks. It might look something like this:
The result will be that as the user updates the form value, the code block will substitute their text everywhere it finds a matching
varmarker inside<>markers. Some thought would have to be given to what these markers should be, so that it is not something encountered in the code itself.Beta Was this translation helpful? Give feedback.
All reactions