Skip to content
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

Support list syntax for enum type variables #7

Closed
nishantwrp opened this issue Jul 26, 2021 · 5 comments · Fixed by #39
Closed

Support list syntax for enum type variables #7

nishantwrp opened this issue Jul 26, 2021 · 5 comments · Fixed by #39
Labels
discussion Needs discussion enhancement New feature or request

Comments

@nishantwrp
Copy link
Collaborator

I wonder if it makes more sense to use the yaml list syntax for this? I think this will affect how your parser works, but should be a lot better for users. For example
This

fruit: enum(apple, orange, banana)

Would become this

fruit:
  - apple
  - orange
  - banana

Originally posted by @CalebJohn in #5 (comment)

@nishantwrp nishantwrp added the enhancement New feature or request label Jul 26, 2021
@nishantwrp
Copy link
Collaborator Author

Hi @CalebJohn,

Do you think we still need this? I'm asking because I think a large number of users have adapted to the enum syntax, And for the non-technical users, they won't be familiar with the yaml list syntax and also keeping in mind that we have a 2 spaces constraint for indentation.

@nishantwrp nishantwrp added the discussion Needs discussion label Aug 25, 2021
@CalebJohn
Copy link
Collaborator

I guess we don't necessarily need to use the proper yaml syntax, but something needs to be done about enum.
I agree, the list syntax is not necessarily easy for users either, but at least enum should be changed to something more intuitive (like option). The problem you have here is that most users won't know what an enum is, so it's just something that has to be memorized to use your plugin (or more likely, they'll need to read the documentation whenever they want to create a new template). This is not a good user experience.

@nishantwrp
Copy link
Collaborator Author

nishantwrp commented Aug 25, 2021

Got your point. How about using dropdown instead of enum? It will be a breaking change but as you said I can get away with breaking changes as the plugin is new.

@CalebJohn
Copy link
Collaborator

Dropdown seems like a good option. You can keep enum because it won't be hard to support both (but remove it from documentation).

@nishantwrp
Copy link
Collaborator Author

Right, I'll do that in #39 itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Needs discussion enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants