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

[WIP/RFC] Full Next.JS experience with App Router #9181

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

gautamsi
Copy link
Member

@gautamsi gautamsi commented Jun 24, 2024

This is my attempt to modernize the template with App Router and server side actions. This also brings the fullNext.JS experience without using isolated nextjs folder.

changes:

  • use NextJS app router
  • Use this in client only rendering for now. use client for quick POC
  • Work with real files instead of hidden .keystone/admin instance of Next.JS
  • generates <src|optional>/app/admin or app/(admin) folder to make use of basePath config

Need to fix

  • dashboard/list paths (have fixed it one point but broken again)

Roadmap

  • upgrade Next.JS and React to 15 and 19
  • Use server actions for forms
  • use server code with keystone context instead of graphql
  • still use graphql for certain part of the portal
  • Add support for composable UI elements, which will pave the way for UI Extension (aka Hooks in v5)
  • upgrade @keystone-ui to be ssr friendly
  • ...TBD

@dcousens This PR is for feedback and collaboration to make it next gen, I have plans to add more features like nested lists. Wanted to get your take on this if ThinkMill is willing to work in this direction or not.

this is using part of eslint cleanup branch, should be less clutter once the other PR merges

@dcousens
Copy link
Member

dcousens commented Jun 24, 2024

Wanted to get your take on this if ThinkMill is willing to work in this direction or not.

@gautamsi I think it was a mistake for Keystone to use NextJS without leveraging NextJS for it's potential, and I'm happy to see you think we should be moving in this direction too!

@dcousens
Copy link
Member

dcousens commented Jun 24, 2024

In the interests of merging early, let's try and keep each feature in it's own pull request, as small and as atomic as possible.

Some of the features you have listed will need more attention than others, and we need not hold everything back while reviewing one particular feature.

@gautamsi
Copy link
Member Author

gautamsi commented Jun 24, 2024

Lets move this into an RFC which can be contributed towards the feature improvements. I will then create atomic PRs.
probably we have a v-next branch to keep the update isolated from main. and merge when there is significant changes approved for initial release in the direction.

@gautamsi
Copy link
Member Author

@dcousens what is your opinion on React 19 and Next 15? If all goes well, the release could be timed with the final release of the two with some beta/rc/nightly release along the way. or do you want to focus with Next 14 only? IMO Next 15 will keep it going for long.

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.

2 participants