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

Add Vite (client only, no SSR) build. Update Next.js 14.2.2 and Remix to 2.8.0 #5970

Merged
merged 17 commits into from
Apr 25, 2024
Merged
46 changes: 42 additions & 4 deletions docs/source/contributing/developing-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,21 +289,59 @@ Used by Volto, you can also use it in other JavaScript frameworks and environmen
## Supported frameworks

Plone supports several frontend implementations, the main one being Volto as the default frontend and reference React-based implementation.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Plone supports several frontend implementations, the main one being Volto as the default frontend and reference React-based implementation.
Plone supports several frontend {term}`reference implementation`s.
Volto, a React-based reference implementation, is the default frontend for Plone 6.

Copy link
Member Author

@sneridagh sneridagh Apr 24, 2024

Choose a reason for hiding this comment

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

@stevepiercy I'd like to start using the "reference implementation" concept here and there. We talked about it during the sprint, if you think that the wording is not correct and we should find a better one, let's do it, but I'd like to convey this from now on for Volto and Classic.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, I thought it was a mistake, not intentional. In that case the term is "reference implementation" and should not have other terms inserted within. I updated my suggestion accordingly.

I added the term to the Documentation glossary in plone/documentation#1656.

There are plans to support implementations in other frontends, including NextJS and Remix.
The others are currently under heavy development, marked as experimental and for now, they remain as a proof of concept.
sneridagh marked this conversation as resolved.
Show resolved Hide resolved
Although they do work now in an acceptable way, the implementation might change in the future.
Please note that these implementations only show how to access the public Plone content in the current site and dealing with data fetching and routing.
sneridagh marked this conversation as resolved.
Show resolved Hide resolved
They use the Plone Frontend Strategic Packages (`@plone/registry`, `@plone/client`, `@plone/components`, etc).
sneridagh marked this conversation as resolved.
Show resolved Hide resolved

### Plone

The default frontend and reference React-based implementation in Plone is Volto.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The default frontend and reference React-based implementation in Plone is Volto.
Volto is the default frontend for Plone 6.
It is a React-based {term}`reference implementation`.

Copy link
Member Author

Choose a reason for hiding this comment

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

Same as above

Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggestion updated.

In the `apps` folder you'll find a Volto project scaffolding that uses Volto as a library.
sneridagh marked this conversation as resolved.
Show resolved Hide resolved
This is the same as the one that you'll have when running the Volto generator or `cookiecutter-plone-starter`.

### NextJS
### Next.js

Coming soon.
This is the proof of concept using Next.js with Plone.
sneridagh marked this conversation as resolved.
Show resolved Hide resolved

You can try it out using:
sneridagh marked this conversation as resolved.
Show resolved Hide resolved

```
sneridagh marked this conversation as resolved.
Show resolved Hide resolved
pnpm --filter plone-nextjs dev
```

### Remix

Coming soon.
This is the proof of concept using Remix with Plone.
sneridagh marked this conversation as resolved.
Show resolved Hide resolved

You can try it out using:
sneridagh marked this conversation as resolved.
Show resolved Hide resolved

```
sneridagh marked this conversation as resolved.
Show resolved Hide resolved
pnpm --filter plone-remix dev
```

### Vite build (client only)

This is the proof of concept using a custom client build based in Vite with Plone.
sneridagh marked this conversation as resolved.
Show resolved Hide resolved
It uses `@tanstack/router` in combination with `@plone/client` (which in turns uses `@tanstack/query`).
sneridagh marked this conversation as resolved.
Show resolved Hide resolved
This build is suitable for applications that do not need server side generation, and it's client only.

You can try it out using:
sneridagh marked this conversation as resolved.
Show resolved Hide resolved

```
sneridagh marked this conversation as resolved.
Show resolved Hide resolved
pnpm --filter plone-vite dev
```

### Vite SSR build

This is the proof of concept using a custom build based in Vite with SSR with Plone.
sneridagh marked this conversation as resolved.
Show resolved Hide resolved
It uses `@tanstack/router` in combination with `@plone/client` (which in turns uses `@tanstack/query`).

You can try it out using:
sneridagh marked this conversation as resolved.
Show resolved Hide resolved

```
sneridagh marked this conversation as resolved.
Show resolved Hide resolved
pnpm --filter plone-vite-ssr dev
```

## Support libraries

Expand Down