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

feat: automatically forward block props to children of BlocksRenderer #805

Merged
merged 59 commits into from
Jul 15, 2024
Merged
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
f869143
feat: app router poc
nicholasio May 24, 2024
5df7f07
chore: adjust exports conditions
nicholasio May 27, 2024
e7dc174
wip: wip
nicholasio Jun 6, 2024
461a648
fix: merge conflicts
nicholasio Jun 17, 2024
fb075b2
feat: initial pass at fetch functions
nicholasio Jun 20, 2024
41f73e3
feat: more progress on data fetching on app router
nicholasio Jun 22, 2024
e4055dd
feat: fix tests and code sharing
nicholasio Jun 23, 2024
fb0e26b
feat: exploring multi site support in app router
nicholasio Jun 23, 2024
3b73131
feat(data-fetching): wrapping up first pass at data-fetching
nicholasio Jun 24, 2024
26c35a7
fix: removing hooks package
nicholasio Jun 24, 2024
0a0284b
chore: update workspaces config
nicholasio Jun 24, 2024
ce3ec6d
fix: build error
nicholasio Jun 24, 2024
8f078f6
feat(data-fetching): fetchAppSettings & queryAppSettings
nicholasio Jun 24, 2024
5a183aa
fix: build issue
nicholasio Jun 25, 2024
e5f741e
feat(data-fetching): queryAuthorArchive
nicholasio Jun 25, 2024
6f68dd8
feat: tag page
nicholasio Jun 25, 2024
21990bb
feat(data-fetching): querySearch and queryTerms
nicholasio Jun 25, 2024
30f94c7
feat(data-fetching): queryPostOrPosts
nicholasio Jun 25, 2024
156072f
fix: build error with pages router project
nicholasio Jun 25, 2024
fe647b5
fix: another build issue
nicholasio Jun 25, 2024
c3cf144
feat(data-fetching): issue a not-found if no redirect is found
nicholasio Jun 25, 2024
d96e10c
test: add more data-fetching tests
nicholasio Jun 25, 2024
3006585
test: more tests
nicholasio Jun 26, 2024
46971cb
test: add more tests
nicholasio Jun 28, 2024
dad963d
chore: changeset
nicholasio Jun 28, 2024
80c3576
chore: fix lock file
nicholasio Jun 28, 2024
a7eebf7
fix: re-export other server-compatible components
nicholasio Jun 28, 2024
96a5c2f
fix: remove unnecessary cache headers
nicholasio Jun 28, 2024
cd76604
feat: first pass at previewRouteHandler
nicholasio Jul 1, 2024
8b2858b
feat: preview fixes
nicholasio Jul 1, 2024
d7cc96f
feat: add PreviewIndicator component
nicholasio Jul 3, 2024
c945166
test: adding test for queryPost preview logic
nicholasio Jul 3, 2024
b01a4ba
chore: update re-exports
nicholasio Jul 3, 2024
631dbdc
fix: config loading for route handlers
nicholasio Jul 3, 2024
5a787aa
docs: update jsdocs
nicholasio Jul 3, 2024
2a17cf1
feat: update single route to render post content
nicholasio Jul 4, 2024
98bae20
chore: changeset
nicholasio Jul 4, 2024
08ae034
feat: revalidateRouteHandler
nicholasio Jul 9, 2024
db7486e
refactor: small refactor
nicholasio Jul 9, 2024
ad6beaf
test: first pass at setting a source url and mocking requests based o…
nicholasio Jul 9, 2024
a7dea3a
test: updating tests of next package
nicholasio Jul 9, 2024
e38627b
test: fix tests
nicholasio Jul 9, 2024
bd70af9
test: fixing more tests
nicholasio Jul 9, 2024
2dc5a06
test: fix last test
nicholasio Jul 9, 2024
f86a8cb
fix: can't use force-static with draft mode
nicholasio Jul 9, 2024
a91a47d
test: add tests for previewRouteHandler
nicholasio Jul 9, 2024
b585500
test: previewRouteHandler tests
nicholasio Jul 11, 2024
68db922
test: tests for revalidateRouteHandler
nicholasio Jul 11, 2024
0e6e5e3
feat: automatically forward block props to children of BlocksRenderer
nicholasio Jul 12, 2024
1c19843
test: add test for
nicholasio Jul 12, 2024
81abdf3
test: fix snapshots
nicholasio Jul 12, 2024
7af7b2d
Merge branch 'develop' into feature/block-renderer-app-router
nicholasio Jul 13, 2024
6d2dc90
feat: querying menu and block settings
nicholasio Jul 13, 2024
86b5875
chore: simplyfing code
nicholasio Jul 13, 2024
99a3b1d
fix: queryAppSettings
nicholasio Jul 15, 2024
22bf68d
fix: test and acccept empty query
nicholasio Jul 15, 2024
c81658a
fix: menu component
nicholasio Jul 15, 2024
4adc11b
chore: changeset
nicholasio Jul 15, 2024
0753094
feat: add theme settings provider
nicholasio Jul 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: build error
  • Loading branch information
nicholasio committed Jun 24, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit ce3ec6d3fbe7f7666ffacec064d776c853c0e179
3 changes: 2 additions & 1 deletion packages/core/src/react/components/Link.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { FC } from 'react';
import React, { FC } from 'react';

interface RawLinkProps {
href: string;
children: React.ReactNode;
}

export const RawLink: FC<RawLinkProps> = ({ children, href, ...props }) => {
2 changes: 2 additions & 0 deletions packages/core/src/react/provider/DataFetchingProvider.tsx
Original file line number Diff line number Diff line change
@@ -14,6 +14,8 @@ export type DataFetchingProviderProps = {
swrConfig: SWRConfiguration;

data: SWRConfiguration['fallback'];

children: React.ReactNode;
};

export const DataFetchingProvider: FC<DataFetchingProviderProps> = ({
3 changes: 2 additions & 1 deletion packages/core/src/react/provider/Provider.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
'use client';

import { FC, createContext, useMemo } from 'react';
import React, { FC, createContext, useMemo } from 'react';
import { getHeadlessConfig } from '../../utils/config';
import { SettingsContextProps } from './types';

export const SettingsContext = createContext<Partial<SettingsContextProps>>({});

interface ProviderProps {
settings: SettingsContextProps;
children: React.ReactNode;
}

export const SettingsProvider: FC<ProviderProps> = ({ settings, children }) => {
1 change: 1 addition & 0 deletions packages/core/src/react/provider/ThemeSettingsProvider.tsx
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ export const ThemeSettingsContext = createContext<ThemeJSON>({});

interface ProviderProps {
data: ThemeJSON;
children: React.ReactNode;
}

export const ThemeSettingsProvider: FC<ProviderProps> = ({ data, children }) => {
2 changes: 1 addition & 1 deletion packages/next/src/rsc/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export * from './data';
export * from './type';
export * from './types';
export * from './config';
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export type HeadstartWPRoute<Params extends { [k: string]: unknown } = {}> = {
params: { path: string[]; site: string };
params: { path: string[]; site?: string };
} & Params;
Loading