Skip to content

Use dropdowns rather than radio buttons for coder_parameter options #10264

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

Open
timquinlan opened this issue Oct 13, 2023 · 13 comments
Open

Use dropdowns rather than radio buttons for coder_parameter options #10264

timquinlan opened this issue Oct 13, 2023 · 13 comments

Comments

@timquinlan
Copy link
Contributor

User feedback: Can we add something to the coder_parameter options to display the options as a dropdown menu rather than radio buttons? This would save screen space when creating workspaces from our most complex templates.

@cdr-bot cdr-bot bot added the feature label Oct 13, 2023
@kylecarbs
Copy link
Member

Agreed!

@matifali
Copy link
Member

I think we should do it without changing anything in the provider and should convert any parameter with more than 4 options to a drop-down

@timquinlan
Copy link
Contributor Author

@matifali I think there should be an option in the provider to allow the user to choose.

@matifali
Copy link
Member

matifali commented Oct 16, 2023

@timquinlan I agree. so it can probably work like this

data "coder_paramter" "options" {
	name         = "options"
	display_name = "Options to choose"
	description  = "Choose 1 option"
	default      = "option1"
	style|type   = "bullets|dropdown"  # defaults to bullets to keep up the old behavior 
	option {
		name  = "foo"
		value = "option1"
	}
	option {
		name  = "bar"
		value = "option2"	
	}
	...
	option {
		name  = "bar"
		value = "option10"	
	}
}

cc: @timquinlan

@sreya sreya assigned aslilac and unassigned aslilac Oct 31, 2023
@matifali
Copy link
Member

matifali commented Nov 1, 2023

@sreya, are we planning to do it automatically, or want to give the user an option to choose the style? In the later case, we need to update the provider first. I personally prefer to handle in frontend depending on the number of option blocks.

@sreya
Copy link
Collaborator

sreya commented Nov 2, 2023

Yeah that's what we're planning on doing. No provider changes. cc @aslilac

@aslilac
Copy link
Member

aslilac commented Nov 2, 2023

I thought we decided to punt on this for now

@sreya
Copy link
Collaborator

sreya commented Nov 3, 2023

Oh whoops you're right. We can maybe circle back around to this on the spillover week for the sprint.

@matifali matifali changed the title Use dropdowns rather than radio buttons Use dropdowns rather than radio buttons for coder_parameter options Dec 4, 2023
@NiklasRosenstein
Copy link
Contributor

Hi, I was about to file this as a feature request but I'll just bring this issue back up to attention instead. 😃

I think it would be nice if the dropdown field would also allow entering text to filter choices. An option field in my template has 20+ options and it's not a great UX to parse that list.

image

(more below when scrolling)

@matifali
Copy link
Member

I agree. A drop-down list with a search bar to filter options as we type would be great UX.

@mattlqx
Copy link

mattlqx commented Oct 10, 2024

I would also greatly appreciate this. I would also go so far as to suggest an optional typeahead input as we have many different VM image names that would be handy to be able to just start typing and the list would update to only those that include the substring.

@matifali
Copy link
Member

We should add this if it's an easy lift or handle this case as part of #5540 and #11275

@matifali
Copy link
Member

I would also greatly appreciate this. I would also go so far as to suggest an optional typeahead input as we have many different VM image names that would be handy to be able to just start typing and the list would update to only those that include the substring.

This could be a separate request to allow search through coder_parameter options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants