create-t3-app icon indicating copy to clipboard operation
create-t3-app copied to clipboard

Page stud borken

Open anthonylaflamme opened this issue 2 years ago • 9 comments

Describe the bug Create t3 app with all possible option will not return the correct page studs seems to have broke in : https://github.com/t3-oss/create-t3-app/commit/c4363821664fe95b4301d46b3e2d34fbeb14952d

To Reproduce Steps to reproduce the behavior:

  1. Run ct3 app
  2. Enable all possible feature
  3. Run the 3 commands
  4. Go to localhost
  5. See that only 4 cards on the page stud are showing missing prisma and next auth

Expected behavior Page stud should give out the according cards that were selected when scaffolding (verify all page stud seems like they all use the default component)

Screenshots If applicable, add screenshots to help explain your problem.

Sorry i'm on phone je

anthonylaflamme avatar Jul 14 '22 01:07 anthonylaflamme

I just started a fix for this will update soon

anthonylaflamme avatar Jul 14 '22 02:07 anthonylaflamme

Let me know if I should continue @nexxeln or if there was other discussion concerning this thank you

anthonylaflamme avatar Jul 14 '22 02:07 anthonylaflamme

Let me know if I should continue @nexxeln or if there was other discussion concerning this thank you

Please go ahead! Thank you for reporting this.

nexxeln avatar Jul 14 '22 02:07 nexxeln

hey @anthonylaflamme I have a PR open #189 fixing the issues introduced in #178, it seems it used an outdated main branch as base so it undid a few previous PRs.

CarlosGomez-dev avatar Jul 14 '22 02:07 CarlosGomez-dev

hey @anthonylaflamme I have a PR open #189 fixing the issues introduced in #178, it seems it used an outdated main branch as base so it undid a few previous PRs.

Oh no worries then go ahead ! Thank you

anthonylaflamme avatar Jul 14 '22 02:07 anthonylaflamme

I do think we have an issue with the home component in general. We don't have enough templates to handle all the possible combinations of the 4 packages we offer, and the more templates we create the harder it is to keep them up to date.

CarlosGomez-dev avatar Jul 14 '22 03:07 CarlosGomez-dev

@CarlosGomez-dev makes a good point. I wonder if there's some way we can "encode" the choices as like an array and then render the right cards for that array?

t3dotgg avatar Jul 14 '22 03:07 t3dotgg

There could be a missed opportunity in not including the technology options as a prisma model? It would show a good full circle use of primsa, trpc and the new TechnologyProps / component that was recently introduced. Vs right now I think there is an empty "example" model that really doesn't showcase much for new users.

If the tech option was a model that included a short code or slug of sorts, they could be queried depending on the template options that were picked in the findMany used by the trpc query?

const options = [next-auth, tailwind]; // set in home page and passed via trpc query? tech.findMany({ where: { slug: { in: options } } });

It could also show developers how to seed their database and reduce some of the repetitive copy.

xpressivecode avatar Jul 15 '22 19:07 xpressivecode

There could be a missed opportunity in not including the technology options as a prisma model? It would show a good full circle use of primsa, trpc and the new TechnologyProps / component that was recently introduced. Vs right now I think there is an empty "example" model that really doesn't showcase much for new users.

Not every ct3a includes Prisma.

Another possibility would be to check at runtime using require.resolve('<module-name>'), but this can't check for Tailwind as that's a devDependency.

Maybe the easiest thing is really to just hardcode an array of installed stuff during initialization.

c-ehrlich avatar Jul 16 '22 21:07 c-ehrlich

I think we can move forward with this without codemods since progress there seems to be a bit stale right now, so if anyone wants to make a neat way to include the correct cards, feel free.

Another approach could be to just include all cards for every template?

juliusmarminge avatar Aug 26 '22 20:08 juliusmarminge

Including all cards on every template makes sense imo.

c-ehrlich avatar Aug 30 '22 07:08 c-ehrlich

Including all cards on every template makes sense imo.

Are you free to make a PR for this? I'm also leaning towards this.

nexxeln avatar Aug 30 '22 08:08 nexxeln

Including all cards on every template makes sense imo.

Are you free to make a PR for this? I'm also leaning towards this.

yea sure, will do hopefully today

c-ehrlich avatar Aug 30 '22 09:08 c-ehrlich