keystonejs / keystone

The most powerful headless CMS for Node.js — built with GraphQL and React
https://keystonejs.com
MIT License
8.98k stars 1.13k forks source link

Use app router template #9186

Open gautamsi opened 1 week ago

gautamsi commented 1 week ago

ref #9183

Blocked by

This PR updates the template to generate the App router, default to typescript version which can be turned off by setting config.ui.tsx = false

What is completed/Verified:

Pending:


@dcousens can you create a v-next branch which should be actual target for these PRs instead of main

codesandbox-ci[bot] commented 1 week ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f86b3fdf9b073f21197a67b45638014ae405c536:

Sandbox Source
@keystone-6/sandbox Configuration
gautamsi commented 1 week ago

@dcousens I will need some help in fixing tests, ~ smoke tests never finishes~ ~ wired error in package unit tests, it has mismatch on keystone error message in build but unable to trace.~ ~* random test failure with checkForTooManyEngines prisma error~

~I have disabled some ui tests, they need fixes but we can do that before merging to main~

@dcousens I have fixed most test cases, these tests definitely helped me fix a lot of issues.

I see that document-field test can not be fixed due to static generation, I may have missed something.

Test live-reloading.test is not behaving properly, same thing, trying to fix some page router vs app router thing. I am having trouble debugging locally on windows for some reason.

dcousens commented 1 week ago

@gautamsi I'm super busy and can't engage on this this week, but, I'll wrap back around as soon as I can and help move this forward :yellow_heart:

gautamsi commented 3 days ago

@dcousens I have not generated default files for all the example/test projects, have modified the code as such it will generate all the required nextjs files for dev and build. User would need to commit them in git.

The file generation is one time except the .admin/index file which generates the admin meta has and static keystone props for admin.