Skip to content

feat: rich parameters: introduce display_name #6919

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Apr 3, 2023

Conversation

mtojek
Copy link
Member

@mtojek mtojek commented Mar 31, 2023

Fixes: #6852

This PR enables an extra coder parameter property, display_name. This property will be used to display the human-readable parameter name.

data "coder_parameter" "random_string" {
  name         = "Optional random string"
  display_name = "Very random string"
  icon         = "/icon/aws.png"
  description  = "This string is optional"
  mutable      = true
  default      = ""
}

data "coder_parameter" "project_id" {
  name         = "project_id"
  display_name = "My Project ID"
  icon         = "/icon/azure.png"
  description  = "This is the Project ID."
  default      = "12345"
  validation {
    regex = "^[a-z0-9]+$"
    error = "I'm sorry, my friend"
  }
}

Screenshot 2023-04-03 at 11 45 51

Screenshot 2023-04-03 at 11 45 33

Screenshot 2023-04-03 at 11 48 58

Changes:

  • Adjust backend to process display_name
  • CLI
  • Site UI

@mtojek mtojek self-assigned this Mar 31, 2023
@mtojek mtojek requested review from BrunoQuaresma and bpmct April 3, 2023 10:04
@mtojek mtojek marked this pull request as ready for review April 3, 2023 10:05
Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mtojek mtojek merged commit 633dfbd into coder:main Apr 3, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cannot pre-fill template parameter values with param name
3 participants