-
Notifications
You must be signed in to change notification settings - Fork 36
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
feat!(jetbrains-gateway): enable multiple IDE buttons #339
base: main
Are you sure you want to change the base?
Conversation
Add support for specifying a list of default IDEs to be displayed on the Workspace page. This allows users to see multiple IDE options simultaneously. Ensure no duplicates are included and validate provided IDE codes against allowed set. Adjust logic to dynamically render IDE buttons based on specified defaults, improving flexibility in user interface setup.
- Allow creation of links with multiple IDEs. - Ensure outputs handle arrays for identifying multiple IDEs. - Update runTerraformApply to handle array values as JSON strings.
This change improves URL uniqueness by appending a lowercase IDE identifier to the slug, ensuring distinct slugs for each default IDE.
// Convert arrays to JSON strings | ||
combinedEnv[`TF_VAR_${key}`] = Array.isArray(value) ? JSON.stringify(value) : String(value); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was needed to support list(string)
inputs for tests.
Works on my end, tested using the following snippet: module "jetbrains_gateway" {
count = data.coder_workspace.me.start_count
source = "git::https://github.com/coder/modules.git//jetbrains-gateway?ref=atif/multi-gateway"
# JetBrains IDEs to make available for the user to select
jetbrains_ides = ["IU", "PY", "WS", "PS", "RD", "CL", "GO", "RM"]
default = ["IU", "PY"]
# Default folder to open when starting a JetBrains IDE
folder = "/home/coder"
agent_id = coder_agent.dev[0].id
agent_name = "dev"
order = 2
} https://dev.coder.com/templates/coder/aws-linux/versions/strange_goldstine7 |
@@ -14,12 +14,12 @@ This module adds a JetBrains Gateway Button to open any workspace with a single | |||
```tf | |||
module "jetbrains_gateway" { | |||
source = "registry.coder.com/modules/jetbrains-gateway/coder" | |||
version = "1.0.23" | |||
version = "1.0.24" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any way to make this ver 1.1.0?
This will immediately break templates using the latest version (version = ">= 1.0.0"
).
We can fix this by doing version = "~> 1.0.0"
, which will only update 1.0.x
versions, but we don't currently follow semver so that sucks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Holding it untill we have #157
Add support for specifying a list of default IDEs to be displayed on the Workspace page. This allows users to see multiple IDE options simultaneously.
Closes #338
Caution
This introduces a few breaking changes in the module
default
is now alist(string)
instead ofstring
, e.g.list(string)
coder_parameter
when there are multiple items indefault
.