Use an editable combobox for the Cloud Run region field (DT-4232)#3636
Open
rossnelson wants to merge 3 commits into
Open
Use an editable combobox for the Cloud Run region field (DT-4232)#3636rossnelson wants to merge 3 commits into
rossnelson wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
| roleExternalId = $bindable(), | ||
| gcpProject = $bindable(''), | ||
| gcpRegion = $bindable(''), | ||
| gcpRegions = [...GCP_REGIONS], |
Contributor
There was a problem hiding this comment.
how come this is a copy? does it get mutated somewhere?
Collaborator
Author
There was a problem hiding this comment.
It does, the user can a region that is not shown in the list. since its a static list, it made sense to also allow freeform input.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces the free-text
gcpRegioninput on the Create Worker Deployment form (Cloud Run provider) with an editable HoloceneCombobox, and makes the suggestion list configurable.GCP_REGIONSlist.allowCustomValue, so an unsupported-by-us region never blocks deployment creation.gcp-region-hintis preserved below the field.gcpRegions?: string[]prop, threaded page -> form ->compute-fields, so cloud-ui can pass its own region list. When omitted, the built-inGCP_REGIONSdefault applies.Combobox fix
While wiring this up, found a latent bug in the shared Holocene
Combobox:addCustomValueunconditionally cleared the input (displayValue = '') after selecting. For single-select this blanked the field even though the value was stored, so a newly added custom value looked unselected. That clear is only meant for multiselect (reset the input for the next chip), so it is now guarded withif (multiselect). The only otherallowCustomValueconsumer (nexus-form) is multiselect, so this path was never exercised before.Why
The worker's region is always a GCP (Cloud Run) region, while the Namespace region may be AWS or Azure, so defaulting to the Namespace region is not reliable. Our
GetRegionslist only covers regions we support for hosting a namespace, not all GCP regions a Cloud Run worker pool can use. This offers helpful suggestions without limiting the user.Notes
gcpRegionstays a required non-empty string, which allows custom values.Testing
pnpm checkpasses (0 errors)pnpm lintpasses (0 errors)Jira: DT-4232