Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add the ability to customise how questions are asked

See original GitHub issue

Discussed in

<div type='discussions-op-text'>

Originally posted by pfmoore May 23, 2022 The prompt currently appears to be a 🎤emoji, followed by the help (if specified), then the item name and a format prompt. I’d like to be able to change the prompt as I find it difficult to read (in particular, the format prompt is very distracting, and I’d like to omit it). Is that possible?</div>

Having checked the source code, it seems that this isn’t possible. But the questionary library looks very flexible, so it would be possible to do this if there was a way to describe the format in the template configuration. Would such a change be welcome? I’d be more than happy to work on a PR for this, but I’m very new to the project (I’m currently trying to migrate my existing cookiecutter templates over to copier) so I don’t know if that’s something that would be considered a reasonable feature for the project.

I’d imagine doing this via settings in the copier.yml file, so the format would be decided by the template, rather than by the user. Would that make sense?

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:4
  • Comments:22 (22 by maintainers)

github_iconTop GitHub Comments

pfmoorecommented, May 23, 2022

My main concerns are:

  1. I don’t find the “Format: {type}” section of the prompt useful, and the fact that it isn’t separated from the value by punctuation is very distracting.
  2. The way the emoji is on the help line if there’s help, but on the variable name line if there’s a variable, is inconsistent and makes it hard for me to review what I entered.
  3. It’s not at all obvious (to me, at least) how to word the help - as a question, or a description.

I think I’d prefer something like:

    type: str
    help: Enter your project name
    type: int


🎤 Enter your project name: my_project 🎤 repeat: 12

So basically, "{emoji} {help_or_var_name}: "

If you wanted to include the type, maybe add " [{type}]" just before the colon, but only when it’s not “str”, so you would have:

🎤 Enter your project name: my_project 🎤 repeat [int]: 12

The emoji is OK, but it’s a bit of a personal preference. If copier had a “user settings” file, I’d suggest letting the user alter the emoji in that, but I don’t think it’s something you’d want on a command line. So maybe don’t worry about it for now.

pfmoorecommented, Jun 1, 2022

FWIW in case we wanted to have this configurable, I think it should be configurable per user, not per template.

Possibly. But as we’ve seen, any given format typically works best with a particular style of help, so there’s an argument that it should be tied to the template as well. But as you say, that’s something to worry about another day 🙂

Also some other experience I had in mind was a fullscreen TUI with backwards and forward buttons to let you edit previous answers.

Maybe expose an API that can be used by 3rd parties, and let someone else do that for you? LOL, so many ideas, so little time.

I’ll do a PR in the next couple of days for the prompt change we’ve agreed. I’ll replace the > with 2 spaces as per your earlier message.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Ask Great Questions - Harvard Business Review
Asking questions is a uniquely powerful tool for unlocking value in organizations: It spurs learning and the exchange of ideas, it fuels innovation...
Read more >
Custom Questions - Review Management - G2 Documentation
Custom questions offer you the opportunity to ask questions about your products that are not included in the standard G2 review form.
Read more >
Create Q&A featured questions for Power BI dashboards
On the dashboard, select the Ask a question about your data Q&A question box. · To create a featured question, in the top-right...
Read more >
How to use Q&A in Power BI to ASK natural ... - YouTube
... how to use one of the AI-based features in Power BI called Q&A, which gives you the ability to ask free-form questions...
Read more >
Show questions based on answers - Google Docs Editors Help
You can set up a survey so that people only see certain sections based on their answers. Open a form in Google Forms....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found