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

fix(misc): update artifact generator option descriptions and cleanup leftovers #29077

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

leosvelperez
Copy link
Member

@leosvelperez leosvelperez commented Nov 26, 2024

  • Update artifact generator schemas:
    • Clarify path is the artifact file path relative to the current working directory
    • Clarify name is the artifact symbol name
    • Remove prompt for name and remove it from the important options (won't be displayed by default in Nx Console generation UI, it will be part of the collapsed options) given that most of the time, it's meant to match the filename (last segment of the path)
    • Remove some leftover options related to the name and path formats that were previously missed
  • Fix an issue with NestJS generators
  • Fix an issue with Next page generator

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #

@leosvelperez leosvelperez self-assigned this Nov 26, 2024
Copy link

vercel bot commented Nov 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Nov 27, 2024 1:33pm

@@ -9,17 +9,16 @@
"properties": {
"path": {
Copy link
Member

@mandarini mandarini Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think the name path is confusing, to be honest. To understand what it is, you need to carefully read the description. I think for such a widely used and simple generator, one should not need to read the description. It should be self explanatory. I would argue we keep the name as the default and prompted property (and infer the path from the name), and leave the path as optional and not prompted. The angular component generator only prompts for name, and I think we should keep that. Maybe I am wrong. I am trying to look at this from an outsider/user perspective.

Comment on lines -21 to -22
"description": "The name of the component.",
"x-prompt": "What name would you like to use for the component?"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should keep this, remove the path prompt.

packages/angular/src/generators/component/schema.json Outdated Show resolved Hide resolved
"$default": {
"$source": "argv",
"index": 0
},
"x-prompt": "Where to create the component?"
"x-prompt": "What is the component file path?"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where to generate the component? ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered that one, but it is less explicit about the fact that the option is meant to be a file path. I find it more ambiguous. While the current one explicitly asks for a file path.

packages/angular/src/generators/component/schema.json Outdated Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

3 participants