chocolatey / chocolatey/choco-theme

Add the ability to have DynamicCodeBlockInput that is a drop down

Open
#541 1 comment 1 reaction 0 assignees View on GitHub
Enhancement
Dominant language
JavaScript
Stars
10
Forks
17
Avg merge
20h 33m
Merged PRs (30d)
4

Description

### Checklist

- [x] I have verified this is the correct repository for opening this issue.
- [x] I have verified no other issues exist related to my request.

### Is Your Feature Request Related To A Problem? Please describe.

There are some scripts (like what is currently on the CCM Database setup page) where the input is best suited as a predefined list of options.

### Describe The Solution. Why is it needed?

It would be really nice to have the ability to specify a list of options (and backing values that might differ) for a `DynamicCodeBlockInput`. For example, a script that needs to differ depending on the version of SQL Server it's targeting, could offer the options: `2025`, `2022`, `2019`, `2017`, or `2016` and depending on which is chosen insert that into the code block.

### User Story

As a documentation writer,
I would like to be able to offer predefined options to users,
so that they don't have to know the correct formatting of multiple choice entries.

### Additional Context

When I originally came up with this, it was for the script on https://docs.chocolatey.org/en-us/central-management/setup/database/, however I came up with a better way to solve the problem there.

### Acceptance Criteria

- [ ] Docs writers are able to provide a list of options for a dynamic code block input.

### Related Issues

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the DynamicCodeBlockInput implementation in this theme and review how inputs are rendered and configured. Use the Chocolatey Central Management database setup page as the cited context, while noting the issue says that page may use another solution. Done means documentation writers can configure display options and backing values so the dynamic code block inserts the selected value.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.