Skip to content

Add support for adding human-readable labels for choices when defining multiple choices questions#1898

Merged
ericof merged 3 commits intocookiecutter:mainfrom
vemonet:add-choices-labels
Jul 11, 2023
Merged

Add support for adding human-readable labels for choices when defining multiple choices questions#1898
ericof merged 3 commits intocookiecutter:mainfrom
vemonet:add-choices-labels

Conversation

@vemonet
Copy link
Copy Markdown
Contributor

@vemonet vemonet commented Jul 11, 2023

Add support for adding human-readable labels for choices when defining multiple choices questions. As mentioned by @henryiii in #1881

Example JSON:

{
  "full_name": "Audrey Roy Greenfeld",
  "email": "audreyr@gmail.com",
  "linting": ["ruff", "flake8", "none"],
  "__prompts__": {
    "full_name": "Provide your full name",
    "email": "Provide your email",
    "linting": {
      "__prompt__": "Which linting tool do you want to use?",
      "ruff": "Ruff",
      "flake8": "Flake8",
      "none": "No linting tool"
    }
  }
}

Previous behaviors are still working (no __prompts__ and providing just a string to the multiple choices __prompt__)

The README.md and readthedocs page for human-readable prompts have been updated accordingly

@ericof ericof self-requested a review July 11, 2023 13:02
@ericof ericof added the enhancement This issue/PR relates to a feature request. label Jul 11, 2023
@ericof ericof added this to the 2.2.3 milestone Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement This issue/PR relates to a feature request.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants