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

Generator labels do not show up #2044

Open
1 of 4 tasks
shadow1349 opened this issue Feb 23, 2024 · 4 comments
Open
1 of 4 tasks

Generator labels do not show up #2044

shadow1349 opened this issue Feb 23, 2024 · 4 comments
Labels
scope: ux UI improvements for usability

Comments

@shadow1349
Copy link

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:

Screenshot 2024-02-23 at 11 05 48 AM

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

Screenshot 2024-02-23 at 11 02 27 AM

Expected Behavior

I want the labels to appear instead of the values

GitHub Repo

No response

Steps to Reproduce

  1. Create an nx plugin with a generator
  2. Add a type in the generator with an xprompt that has a list
  3. 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

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@shadow1349 shadow1349 added the type: bug Something isn't working label Feb 23, 2024
@AgentEnder
Copy link
Member

I think this works properly on the CLI. Going to transfer to nx console repo to investigate the UI issue.

@AgentEnder AgentEnder transferred this issue from nrwl/nx Mar 4, 2024
@MaxKless
Copy link
Collaborator

MaxKless commented Mar 5, 2024

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.

@shadow1349
Copy link
Author

Thanks for the reply! If I have some time, I will definitely take a look.

@MaxKless
Copy link
Collaborator

MaxKless commented Mar 8, 2024

we're probably going to tackle it quite soon, actually. Lmk if you end up taking a look so we don't duplicate work.

@MaxKless MaxKless added scope: ux UI improvements for usability and removed type: bug Something isn't working labels Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: ux UI improvements for usability
Projects
None yet
Development

No branches or pull requests

3 participants