diff --git a/packages/blocks/RenderBlocks/BlockWrapper.tsx b/packages/blocks/RenderBlocks/BlockWrapper.tsx index e94b555d47..d55f8ec8d5 100644 --- a/packages/blocks/RenderBlocks/BlockWrapper.tsx +++ b/packages/blocks/RenderBlocks/BlockWrapper.tsx @@ -11,8 +11,8 @@ const BlockWrapper = (props: BlockWrapperProps) => { const data = content.blocks?.[block]; const category = blocksConfig?.[data['@type']]?.category; // TODO: Bring in the StyleWrapper helpers for calculating styles and classes - const classNames = null; - const style = null; + const classNames = undefined; + const style = undefined; return (
{ const Block = blocksConfig[blockType]?.view || DefaultBlockView; return Block ? ( - + {/* @ts-ignore It's ok to pass the blockData as is */} .changelog.draft", + "pipx run towncrier build --yes --version ${version}" + ], + "after:release": "rm .changelog.draft" + }, + "npm": { + "publish": false + }, + "git": { + "commitArgs": ["--no-verify"], + "changelog": "pipx run towncrier build --draft --yes --version 0.0.0", + "requireUpstream": false, + "requireCleanWorkingDir": false, + "commitMessage": "Release Plone7 ${version}", + "tagName": "plone7-${version}", + "tagAnnotation": "Release Plone7 ${version}" + }, + "github": { + "release": true, + "releaseName": "Plone7 ${version}", + "releaseNotes": "cat .changelog.draft" + } +} diff --git a/packages/revolto/CHANGELOG.md b/packages/revolto/CHANGELOG.md new file mode 100644 index 0000000000..a90be32e57 --- /dev/null +++ b/packages/revolto/CHANGELOG.md @@ -0,0 +1,11 @@ +# Plone 7 Release Notes + + + + + +## 1.0.0 (unreleased) diff --git a/packages/revolto/README.md b/packages/revolto/README.md index d6b9daf12c..9377c8fc62 100644 --- a/packages/revolto/README.md +++ b/packages/revolto/README.md @@ -1,30 +1,33 @@ -# Plone on React Router 7 - -This is a proof of concept of a [React Router](https://reactrouter.com/dev/docs) app, using the `@plone/*` libraries. -This is intended to serve as both a playground for the development of both packages and as a demo of Plone using Remix. +# Plone 7 > [!WARNING] -> This package or app is experimental. +> This package and all the efforts around it are not even in an alpha state and are experimental. > The community offers no support whatsoever for it. > Breaking changes may occur without notice. +This is the initial (and very early) implementation of Plone 7. +After the design and first implementations of all the required pieces (the `@plone/*` libraries) that will compose Plone 7, this package will concentrate all the development during the next years. + +It is based on [React Router](https://reactrouter.com/dev/docs) 7, using the `@plone/*` libraries. + +The name of this package and its folder name in `packages` may also change since it's undecided yet. + +## Releases + +Even in experimental phase, this package will be soft released periodically, under a tag. +This will provide a way to try it out in real development and deploy scenarios. + ## Development To start, from the root of the monorepo, issue the following commands. ```shell pnpm install -pnpm --filter plone-remix run dev +pnpm --filter plone7 run dev ``` Then start the Plone backend. -% TODO MAKEFILE ```shell make backend-docker-start ``` - - -## About this app - -- [Remix Docs](https://remix.run/docs/en/main) diff --git a/packages/revolto/app/content.tsx b/packages/revolto/app/content.tsx index cfc6134824..8358a163e0 100644 --- a/packages/revolto/app/content.tsx +++ b/packages/revolto/app/content.tsx @@ -37,14 +37,13 @@ export async function loader({ params, request }: Route.LoaderArgs) { /\.(css|css\.map)$/.test(path) ) ) { - console.log('prefetching', path); try { return await getContent({ path, expand }); } catch (error) { throw data('Content Not Found', { status: 404 }); } } else { - console.log('path not prefetched', path); + console.log('matched path not fetched', path); throw data('Content Not Found', { status: 404 }); } } diff --git a/packages/revolto/app/root.tsx b/packages/revolto/app/root.tsx index 7340c7627a..c8d30824cb 100644 --- a/packages/revolto/app/root.tsx +++ b/packages/revolto/app/root.tsx @@ -1,7 +1,6 @@ -import type { LinksFunction } from 'react-router'; -import type { Route } from './+types/root'; import { useState } from 'react'; import { + isRouteErrorResponse, Links, Meta, Outlet, @@ -12,8 +11,9 @@ import { useNavigate as useRRNavigate, useParams, useLoaderData, - isRouteErrorResponse, + useRouteLoaderData, } from 'react-router'; +import type { Route } from './+types/root'; import { QueryClient } from '@tanstack/react-query'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; @@ -38,7 +38,22 @@ function useHrefLocal(to: string) { return useHref(flattenToAppURL(to)); } -export const links: LinksFunction = () => [ +export const meta: Route.MetaFunction = () => [ + { name: 'generator', content: 'Plone 7 - https://plone.org' }, +]; + +export const links: Route.LinksFunction = () => [ + { + rel: 'icon', + href: '/favicon.png', + type: 'image/png', + sizes: 'any', + }, + { + rel: 'icon', + href: '/icon.svg', + type: 'image/svg+xml', + }, { rel: 'stylesheet', href: themingMain }, { rel: 'stylesheet', href: slotsMain }, { rel: 'preconnect', href: 'https://fonts.googleapis.com' }, @@ -66,17 +81,23 @@ export async function loader() { export function Layout({ children }: { children: React.ReactNode }) { const data = useLoaderData(); + const indexLoaderData = useRouteLoaderData('index'); + const contentLoaderData = useRouteLoaderData('content'); + const contentData = indexLoaderData || contentLoaderData; return ( - + + - {children} +