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

Product milestone 1 #21

Merged
merged 31 commits into from
Mar 30, 2023
Merged

Product milestone 1 #21

merged 31 commits into from
Mar 30, 2023

Conversation

brunobuddy
Copy link
Contributor

@brunobuddy brunobuddy commented Mar 23, 2023

Description

This PR closes the V1 version of the product:

  • Add props quickly
  • Solves login errors
  • Shows all items in detail page

What it does NOT include

Pretty CLI commands

I choose to not include the final CLI syntax to reduce the size of the sprint and the validation (we already have 3 "npm link" to do simultaneously). In addition to that I made some choices (not developed yet) that you will find in the documentation. Maybe we need to discuss those before working on them.

However all the npm scripts below correspond to an explicit "pretty" CLI command that will be added on the next sprint.

Image yield seeder

The features implemented previously in this yield (see screenshot below) have a price: It's hard to deliver a "simple" dummy image seeded. We may want to simplify this yield to make it simpler to use. You can create a resource or a property of the "image" type but you will need to remove the generated image yield in the list component.

image

How can it be tested?

  • First of all you will need to pull the related PR in the CASE Starter repo along this one
  • Follow the steps to install the case-starter project
  • Serve the doc and have a look about updated or new concepts: "create a resource" and "create a property"
  • From here you will need to run the case-starter project linking 3 npm packages: @case-app/angular-library, @case-app/schematics and @case-app/nest-library. You will need to go to the README-DEV.md of those 3 packages (case-client, case-server and schematics) and follow the steps.

You should now see that the form is pre-filled when you login:

image

OK, now you are ready for some testing !!

From the root of your project, type the following commands:

cs generate resource [name]

You can run this command by doing

npm run case:resource -- --name=[name]
npm run seed 

Don't forget to seed ! This will not be the case in the final CLI

cs generate resource [name] --props=[prop1,prop2]

Same again with the the "props" argument as explained in the doc

npm run case:resource -- --name=[name] --props=[prop1,prop2]
npm run seed 

Don't forget to seed ! This will not be the case in the final CLI

cs generate property [name] --resource=[resourceName]

Adding a prop to an existing resource is easy

npm run case:property -- --name=[name] --type=[type] --resource=[resourceName]
npm run seed 

Don't forget to seed ! This will not be the case in the final CLI

All of those commands should work and have a nice experience for the user

Check list before submitting

  • I have performed a self-review of my code (no debugs, no commented code, good naming, etc.)
  • I updated the documentation if necessary
  • This PR is wrote in a clear language and correctly labeled

@vercel
Copy link

vercel bot commented Mar 23, 2023

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

Name Status Preview Comments Updated
case-docs ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 30, 2023 at 7:46AM (UTC)

Copy link
Contributor

@ismaelguerrib ismaelguerrib left a comment

Choose a reason for hiding this comment

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

When I generate a resource there is no property name by default.

@SebConejo
Copy link
Contributor

@brunobuddy On the create-edit page, when we submit a form with a Date yield, an error says a date is expected when there is a date
Capture d’écran 2023-03-27 à 12 30 52

@SebConejo
Copy link
Contributor

SebConejo commented Mar 27, 2023

if a resource has no one property, when adding a property to this existing resource generate an error.

Command I used to generate a propoerty to the videoGame existing resource:
npm run case:property -- --name=name --resource=videoGame

The following error is generated:
Error: Cannot read properties of null (reading 'toString')

Capture d’écran 2023-03-27 à 12 41 39

@brunobuddy
Copy link
Contributor Author

2 things left before publishing:

  • Simplify image yield to accept only a string, we will add a more complex yield later
  • cs g res not working when resource is camelCase

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