nx-console
nx-console copied to clipboard
Generator labels do not show up
Current Behavior
I was trying to create a custom generator with a dropdown and I noticed that only values appear. I tried this:
"type": {
"type": "string",
"description": "Provide the library type",
"x-prompt": {
"message": "Which type of library would you like to generate?",
"type": "list",
"items": [
{
"value": "da",
"label": "Data Access"
},
{
"value": "f",
"label": "Feature"
},
{
"value": "s",
"label": "State Management"
}
]
}
}
and got this:
This is even apparent for other things like the Angular application generator.
https://github.com/nrwl/nx/blob/master/packages/angular/src/generators/application/schema.json#L29
Expected Behavior
I want the labels to appear instead of the values
GitHub Repo
No response
Steps to Reproduce
- Create an nx plugin with a generator
- Add a type in the generator with an xprompt that has a list
- View the generator
Nx Report
Node : 18.18.2
OS : darwin-arm64
npm : 9.8.1
nx : 18.0.2
@nx/js : 18.0.4
@nx/jest : 18.0.4
@nx/linter : 18.0.3
@nx/eslint : 18.0.3
@nx/workspace : 18.0.2
@nx/angular : 18.0.4
@nx/cypress : 18.0.4
@nx/devkit : 18.0.4
@nx/eslint-plugin : 18.0.3
@nx/playwright : 18.0.4
@nx/plugin : 18.0.4
@nrwl/tao : 18.0.2
@nx/web : 18.0.4
@nx/webpack : 18.0.4
typescript : 5.3.3
---------------------------------------
Community plugins:
ngx-build-plus : 17.0.0
Failure Logs
No response
Package Manager Version
npm - 9.8.1
Operating System
- [X] macOS
- [ ] Linux
- [ ] Windows
- [ ] Other (Please specify)
Additional Information
No response
I think this works properly on the CLI. Going to transfer to nx console repo to investigate the UI issue.
Hey! Yeah this is a known issue currently :) The thing is, it would complicate things in the code quite a bit because ultimately you'll still have to pass the values to the CLI.
We're going to get around to fixing it eventually but not 100% sure when. If you're interested in helping out with a contribution to get it updated more quickly, I'd love to help too.
Thanks for the reply! If I have some time, I will definitely take a look.
we're probably going to tackle it quite soon, actually. Lmk if you end up taking a look so we don't duplicate work.