Skip to content

Commit

Permalink
Merge branch 'debug/faust-ssr'
Browse files Browse the repository at this point in the history
# Conflicts:
#	package-lock.json
#	package.json
  • Loading branch information
jasonbahl committed Aug 26, 2024
2 parents 6f3c549 + d7afeb4 commit e3773e2
Show file tree
Hide file tree
Showing 37 changed files with 136 additions and 42 deletions.
13 changes: 11 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@

# dependencies
/node_modules
/.pnp
.pnp.js
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.pnp.*
.yarn/cache/
.yarn/unplugged/
.yarn/build-state.yml


# testing
/coverage
Expand Down
2 changes: 2 additions & 0 deletions components/DocsSidebarNavigation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import clsx from 'clsx';
import Link from 'next/link';
import { useState } from 'react';



DocsSidebarNavigation.fragment = gql`
fragment DocsSidebarNavigationFragment on RootQuery {
docsSidebarMenuItems: menuItems(
Expand Down
2 changes: 2 additions & 0 deletions components/FeatureTabsLeft.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@

import { gql } from '@apollo/client'
import { Tab } from '@headlessui/react'
import clsx from 'clsx'
import Image from 'next/image'
import { useEffect, useState } from 'react'


import { Container } from '@/components/Container'


Expand Down
1 change: 1 addition & 0 deletions components/FeatureTabsTop.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import { gql } from '@apollo/client';
import { Tab } from '@headlessui/react';
import clsx from 'clsx';
Expand Down
1 change: 1 addition & 0 deletions components/Fence.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Highlight, { defaultProps } from 'prism-react-renderer'
import { Fragment } from 'react'


export function Fence({ children, language }) {
return (
<Highlight
Expand Down
2 changes: 2 additions & 0 deletions components/FooterNavigation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import clsx from 'clsx'
import Link from 'next/link'
import * as React from 'react'



import styles from '@/styles/footer-navigation.module.css';

export function FooterNavigation({ navigation }) {
Expand Down
35 changes: 25 additions & 10 deletions components/HomepageLayoutsLayoutsHeroLayout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import clsx from 'clsx'
import Highlight, { defaultProps } from 'prism-react-renderer'
import { Fragment } from 'react'



import { Button } from '@/components/Button'


Expand Down Expand Up @@ -97,16 +99,29 @@ const HomepageLayoutsLayoutsHeroLayout = (hero) => {
style={style}
>
<code className="px-4">
{tokens.map((line, lineIndex) => (
<div key={lineIndex} {...getLineProps({ line })}>
{line.map((token, tokenIndex) => (
<span
key={tokenIndex}
{...getTokenProps({ token })}
/>
))}
</div>
))}
{tokens.map((line, lineIndex) => {

const lineProps = getLineProps({ line }) || {};
const linePropsKey = lineProps.key || lineIndex;
delete lineProps.key; // delete key to prevent React warning
return (
<div {...lineProps} key={linePropsKey}>
{line.map((token, tokenIndex) => {

const tokenProps = getTokenProps({ token }) || {};
const tokenPropsKey = tokenProps.key || tokenIndex;
delete tokenProps.key; // delete key to prevent React warning

return (
<span
key={tokenPropsKey}
{...tokenProps}
/>
)
})}
</div>
)}
)}
</code>
</pre>
)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@

import { gql } from '@apollo/client'
import clsx from 'clsx'
import { useInView } from 'framer-motion'
import Image from 'next/image'
import Link from 'next/link'
import { useEffect, useMemo, useRef, useState } from 'react'


import { Container } from '@/components/Container'


Expand Down
2 changes: 2 additions & 0 deletions components/Layout.jsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@

import { gql } from '@apollo/client'
import { flatListToHierarchical, useFaustQuery } from '@faustwp/core'
import clsx from 'clsx'
import Link from 'next/link'
import { useCallback, useEffect, useState } from 'react'


import EditPost from './EditPost'

import { DocsSidebarNavigation } from '@/components/DocsSidebarNavigation'
Expand Down
1 change: 1 addition & 0 deletions components/MiniGraphiQL.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useTheme } from 'next-themes';
import PropTypes from 'prop-types';
import React, { useEffect, useState } from 'react';


const MiniGraphiQLClient = ({ initialQuery, initialVariables, endpoint, readOnly }) => {
const [GraphiQL, setGraphiQL] = useState(null);
const { theme, resolvedTheme } = useTheme();
Expand Down
1 change: 1 addition & 0 deletions components/MobileNavigation.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import { Dialog } from '@headlessui/react'
import Link from 'next/link'
import { useRouter } from 'next/router'
Expand Down
1 change: 1 addition & 0 deletions components/PrimaryNavigation.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import { gql } from '@apollo/client'
import Link from 'next/link'
import * as React from 'react'
Expand Down
6 changes: 5 additions & 1 deletion components/Search.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import { DocSearchModal } from "@docsearch/react";
import clsx from 'clsx'
import Head from 'next/head'
Expand Down Expand Up @@ -100,7 +101,10 @@ function Hit({ hit, children }) {
export function Search({ ...props }) {
let [modifierKey, setModifierKey] = useState()
let searchButtonRef = useRef()
let { onOpen, onInput } = useContext(SearchContext)
let searchContext = useContext(SearchContext)

const onOpen = searchContext.onOpen || (() => {})
const onInput = searchContext.onInput || (() => {})

useEffect(() => {
function onKeyDown(event) {
Expand Down
4 changes: 2 additions & 2 deletions components/SiteHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import clsx from 'clsx'
import Link from 'next/link'
import { useEffect, useState } from 'react'


import { GitHubIcon } from '@/components/icons/GitHubIcon'
import { WordPressIcon } from '@/components/icons/WordPressIcon'
import { Logo } from '@/components/Logo'
import { MobileNavigation } from '@/components/MobileNavigation'
import { PrimaryNavigation } from '@/components/PrimaryNavigation'
import { Search } from '@/components/Search'
import { ModeToggle } from '@/components/ThemeSelector'

export function SiteHeader({ navigation, isNoticeVisible = false }) {
Expand Down Expand Up @@ -49,7 +49,7 @@ export function SiteHeader({ navigation, isNoticeVisible = false }) {
</div>
</div>
<div className="-my-5 mr-6 sm:mr-8 md:mr-0">
<Search />
{/*<Search />*/}
</div>
<div className="relative flex basis-0 justify-end gap-4 sm:gap-8 md:grow">
<ModeToggle className="relative z-10" />
Expand Down
1 change: 1 addition & 0 deletions components/ThemeProvider.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { ThemeProvider as NextThemesProvider } from "next-themes"
import * as React from "react"


export function ThemeProvider({ children, ...props }) {
return <NextThemesProvider {...props}>{children}</NextThemesProvider>
}
1 change: 1 addition & 0 deletions components/ThemeSelector.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client"


import { MoonIcon, SunIcon } from "@radix-ui/react-icons"
import { useTheme } from "next-themes"
import * as React from "react"
Expand Down
1 change: 1 addition & 0 deletions components/ui/accordion.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client"


import * as AccordionPrimitive from "@radix-ui/react-accordion"
import { ChevronDownIcon } from "@radix-ui/react-icons"
import * as React from "react"
Expand Down
1 change: 1 addition & 0 deletions components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Slot } from '@radix-ui/react-slot'
import { VariantProps, cva } from 'class-variance-authority'
import * as React from 'react'


import { cn } from '@/lib/utils'

const buttonVariants = cva(
Expand Down
1 change: 1 addition & 0 deletions components/ui/context-menu.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

import * as ContextMenuPrimitive from "@radix-ui/react-context-menu"
import { Check, ChevronRight, Circle } from "lucide-react"
import * as React from "react"
Expand Down
1 change: 1 addition & 0 deletions components/ui/dropdown-menu.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client"


import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"
import {
CheckIcon,
Expand Down
1 change: 1 addition & 0 deletions components/ui/label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as LabelPrimitive from '@radix-ui/react-label'
import { VariantProps, cva } from 'class-variance-authority'
import * as React from 'react'


import { cn } from '@/lib/utils'

const labelVariants = cva(
Expand Down
2 changes: 2 additions & 0 deletions components/ui/navigation-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { cva } from 'class-variance-authority'
import { ChevronDown } from 'lucide-react'
import * as React from 'react'



import { cn } from '@/lib/utils'

const NavigationMenu = React.forwardRef<
Expand Down
1 change: 1 addition & 0 deletions components/ui/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import * as PopoverPrimitive from "@radix-ui/react-popover"
import * as React from "react"


import { cn } from "@/lib/utils"

const Popover = PopoverPrimitive.Root
Expand Down
1 change: 1 addition & 0 deletions components/ui/separator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import * as SeparatorPrimitive from '@radix-ui/react-separator'
import * as React from 'react'


import { cn } from '@/lib/utils'

const Separator = React.forwardRef<
Expand Down
1 change: 1 addition & 0 deletions components/ui/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import * as TabsPrimitive from '@radix-ui/react-tabs'
import * as React from 'react'


import { cn } from '@/lib/utils'

const Tabs = TabsPrimitive.Root
Expand Down
1 change: 1 addition & 0 deletions components/ui/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import * as TabsPrimitive from "@radix-ui/react-tabs"
import * as React from "react"


import { cn } from "@/lib/utils"

const Tabs = TabsPrimitive.Root
Expand Down
Loading

1 comment on commit e3773e2

@headless-platform-by-wp-engine

Choose a reason for hiding this comment

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

Check out the recent updates to your Atlas environment:

App Environment URL Build
acf.wpgraphql.com main N/A ❌ (logs)

Learn more about building on Atlas in our documentation.

Please sign in to comment.