dynamic parameters: `script` or `code` as a `form_type` option
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 3
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
### Proposal
Some customers want a larger text area in the workspace create so users may enter their scripts.
I think we should add a sibling to `textarea` that renders in monospace and displays line numbers.
I don't think embedding a text editor is necessary.
### Example
```terraform
data "coder_parameter" "setup_script" {
name = "setup_script"
description = "Commands that run after your workspace is provisioned."
mutable = true
display_name = "Workspace setup script"
# Renders as a code editor with syntax highlighting
form_type = "code"
type = "string"
# <<-EOT lets us indent the body but strips the extra leading tabs/spaces
default = <<-EOT
#!/usr/bin/env bash
# This script is executed once the workspace starts.
# You can install packages, pull dotfiles, or do any other bootstrap tasks.
set -euo pipefail
echo "🔄 Updating APT cache…"
sudo apt-get update -y
echo "📦 Installing baseline packages…"
sudo apt-get install -y tmux ripgrep fd-find
echo "⬇️ Cloning dotfiles repository (replace with your own)…"
if [ ! -d "$HOME/.dotfiles" ]; then
git clone https://github.com/your-github-handle/dotfiles.git "$HOME/.dotfiles"
"$HOME/.dotfiles/install.sh"
fi
echo "✅ Workspace bootstrap complete!"
EOT
}
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia individuando l’implementazione del form dei parametri dinamici e il tipo di form `textarea` esistente; l’issue non indica file o test specifici. Verifica come sono definite le opzioni di `form_type`, quindi determina il comportamento previsto per il carattere monospaziato, i numeri di riga e l’evidenziazione della sintassi, e aggiungi la copertura per la nuova opzione `code`.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- terraform
- Ambito
- frontend
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100