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

Form Field CLI command not correct in docs #351

Open
1 of 2 tasks
marcjulian opened this issue Aug 8, 2024 · 5 comments
Open
1 of 2 tasks

Form Field CLI command not correct in docs #351

marcjulian opened this issue Aug 8, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@marcjulian
Copy link
Contributor

Please provide the environment you discovered this bug in.

Add Form Field component with npx nx g @spartan-ng/cli:ui form-field should request a directory and add the component.
Instead the CLI prompts "Choose which primitives you want to copy...."

Looks like form-field is not available in the CLI, instead formfield.

CleanShot 2024-08-08 at 17 03 07

Which area/package is the issue in?

Docs

Description

Should update docs or CLI to use the correct name for the Form Field component.

Please provide the exception or error you saw

No response

Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@marcjulian marcjulian added the bug Something isn't working label Aug 8, 2024
@marcjulian
Copy link
Contributor Author

@goetzrobin should the docs be updated or the formfield option to form-field in the CLI?

npx nx g @spartan-ng/cli:ui formfield works fine, but create the component under libs/ui/ui-formfield-helm/* instead of libs/ui/ui-form-field-helm.

@goetzrobin
Copy link
Collaborator

@marcjulian let's keep it the same as the others. how does e.g. aspectratio do it?

@marcjulian
Copy link
Contributor Author

Aspect ratio uses aspectratio without a dash in the command, but also without a das in the package name.

# cli
npx nx g @spartan-ng/cli:ui aspectratio
# import lib
import { HlmAspectRatioDirective } from '@spartan-ng/ui-aspectratio-helm';

For Form Field that would mean to rename the command and also the import path. Do you want to keep the dash between form-field?

# cli
npx nx g @spartan-ng/cli:ui form-field
# import lib
import { HlmFormFieldModule } from '@spartan-ng/ui-form-field-helm';

or

# cli
npx nx g @spartan-ng/cli:ui formfield
# import lib
import { HlmFormFieldModule } from '@spartan-ng/ui-formfield-helm';

@SimonHenz97
Copy link

SimonHenz97 commented Aug 12, 2024

I don't know if this is somehow releated, but I tried to install the formField component using the cli but it is missing most of the src content, only generating the test-setup.ts and an empty index.ts

image

cli: 0.0.1-alpha.361
ui: 0.0.1-alpha.353

@marcjulian
Copy link
Contributor Author

@SimonHenz97 when I run the command npx nx g @spartan-ng/cli:ui formfield following files are copied

CleanShot 2024-08-12 at 19 18 18

Not sure if this is related. I am also using "@spartan-ng/cli": "0.0.1-alpha.361"

Perhaps libs/ui/ui-formfield-helm/src/lib/form-field.spec.ts could be ignored, as it imports from @testing-library/*.

@goetzrobin goetzrobin self-assigned this Aug 22, 2024
cjosue15 added a commit to cjosue15/spartan that referenced this issue Sep 3, 2024
…ng#365,spartan-ng#358,spartan-ng#351)

- remove unused code
- change docs from form-field to formfield
- add ui-form-field-brain and ui-forms-brain into supported ui libraries
goetzrobin pushed a commit that referenced this issue Sep 9, 2024
…#369)

* fix(form-field): add form field brain into peerDependencies (#365,#358,#351)

- remove unused code
- change docs from form-field to formfield
- add ui-form-field-brain and ui-forms-brain into supported ui libraries

* fix(form-field): run linter

* fix(form-field): update supported UI libraries

- form field brain and forms brain

* feat(form-field): add UI form field test
elite-benni pushed a commit to elite-benni/spartan that referenced this issue Nov 3, 2024
…spartan-ng#369)

* fix(form-field): add form field brain into peerDependencies (spartan-ng#365,spartan-ng#358,spartan-ng#351)

- remove unused code
- change docs from form-field to formfield
- add ui-form-field-brain and ui-forms-brain into supported ui libraries

* fix(form-field): run linter

* fix(form-field): update supported UI libraries

- form field brain and forms brain

* feat(form-field): add UI form field test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants