Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ahaywood committed Sep 11, 2024
2 parents 6e114b2 + 362a16b commit 1638c38
Show file tree
Hide file tree
Showing 9 changed files with 242 additions and 2 deletions.
1 change: 1 addition & 0 deletions web/public/images/react-advanced-logo-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions web/public/images/react-advanced-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions web/src/Routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ const Routes = () => {
<Route path="/conf" redirect="/react-conf" />
<Route path="/reactconf" redirect="/react-conf" />
<Route path="/react-conf" page={ReactConfPage} name="reactConf" />
<Route path="/reactadvanced" redirect="/react-advanced" />
<Route path="/react-advanced" page={ReactAdvancedPage} name="reactAdvanced" />

{/* UPGRADE - INDEX */}
<Route path="/upgrade" page={UpgradeGuidePage} name="upgradeGuide" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ I won't go into all the details here and some of our canary setup is subject to

The main changes we chose to make were:

1. Switched away from the Dockerfile Fly generated and used the Redwood Dockerfile [template](https://github.com/redwoodjs/redwood/blob/main/packages/cli/src/commands/experimental/templates/docker/Dockerfile).
1. Switched away from the Dockerfile Fly generated and used the Redwood Dockerfile [template](https://github.com/redwoodjs/redwood/blob/main/packages/cli/src/commands/setup/docker/templates/Dockerfile).

2. Altered the start script for our Fly machine to start both the web and API server processes. You should follow Fly's advice on multiple processes [here](https://fly.io/docs/app-guides/multiple-processes/).

Expand Down
2 changes: 1 addition & 1 deletion web/src/content/upgrades/v8/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ export const data = {
'Version 8 is out with some cool new features like background jobs! Upgrading should be easy with this guide to help you along the way.',
tags: ['v8'],
publishedAt: new Date('2024-09-04T00:10:00.000Z'),
updatedAt: new Date('2024-09-05T09:30:00.000Z'),
updatedAt: new Date('2024-09-06T16:05:00.000Z'),
author: JoshGMWalker,
}
2 changes: 2 additions & 0 deletions web/src/content/upgrades/v8/guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ We have added [conditional exports](https://nodejs.org/api/packages.html#conditi

For example, you could have been using components such as `Toast` by importing from the dist directory inside of `@redwoodjs/web`. We often no longer support importing directly from dist and you should instead import from the root like so `@redwoodjs/web/toast`.

In order to make this upgrade as smooth as possible, we have not removed all possible deep imports. There are cases like: `'@redwoodjs/web/dist/components/DevFatalErrorPage'` where this import will still work. If you encounter a problem with an import you should check the [Redwood repository](https://github.com/redwoodjs/redwood/tree/main/packages) and look at the `package.json` file of the package you're having difficulty with. If there is an `exports` field then you'll be able to see all our supported import paths, if there is no `exports` field then you can simply continue importing from dist as before.

### `server.config.js` no longer supported

You can no longer use the `server.config.js` file to configure your fastify server. Instead, you'll have to migrate to the new server file setup. This is documented [here](https://docs.redwoodjs.com/docs/canary/docker/#using-the-server-file).
Expand Down
13 changes: 13 additions & 0 deletions web/src/pages/ReactAdvancedPage/ReactAdvancedPage.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { Meta, StoryObj } from '@storybook/react'

import ReactAdvancedPage from './ReactAdvancedPage'

const meta: Meta<typeof ReactAdvancedPage> = {
component: ReactAdvancedPage,
}

export default meta

type Story = StoryObj<typeof ReactAdvancedPage>

export const Primary: Story = {}
14 changes: 14 additions & 0 deletions web/src/pages/ReactAdvancedPage/ReactAdvancedPage.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { render } from '@redwoodjs/testing/web'

import ReactAdvancedPage from './ReactAdvancedPage'

// Improve this test with help from the Redwood Testing Doc:
// https://redwoodjs.com/docs/testing#testing-pages-layouts

describe('ReactAdvancedPage', () => {
it('renders successfully', () => {
expect(() => {
render(<ReactAdvancedPage />)
}).not.toThrow()
})
})
207 changes: 207 additions & 0 deletions web/src/pages/ReactAdvancedPage/ReactAdvancedPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
import { Link, routes, useLocation } from '@redwoodjs/router'
import { Metadata } from '@redwoodjs/web'

import Accordion from 'src/components/Accordion/Accordion'
import BlogCard from 'src/components/BlogCard/BlogCard'
import BentoOpenSource from 'src/components/Home/WhatsIncluded/BentoOpenSource/BentoOpenSource'
import BentoTech from 'src/components/Home/WhatsIncluded/BentoTech/BentoTech'
import Icon from 'src/components/Icon/Icon'
import ConnectWithUs from 'src/components/ReactConf/ConnectWithUs/ConnectWithUs'
import GetInvolved from 'src/components/ReactConf/GetInvolved/GetInvolved'
import Newsletter from 'src/components/ReactConf/Newsletter/Newsletter'
import RoadmapDetails from 'src/components/RoadmapDetails/RoadmapDetails'
import { getPostBySlug } from 'src/content/posts'
import { Constants } from 'src/helpers/Constants'

const ReactAdvancedPage = () => {
const { origin } = useLocation()
return (
<>
<Metadata
title="React Advanced"
description="Hello, from React Advanced 2024!"
og={{ image: `${origin}/images/og.png` }}
/>

<div className="page-content">
<header className="grid grid-cols-10 gap-5">
<div className="col-span-12 mr-12 lg:col-span-5">
{/* Heading and logo */}
<div className="mb-16">
<h1 className="mb-8 font-serif text-5xl font-bold text-maiTai md:text-7xl">
Hello from
</h1>
<img
src="/images/react-advanced-logo.svg"
alt="React Advanced 2024"
className="dark:hidden"
/>
<img
src="/images/react-advanced-logo-white.svg"
alt="React Advanced 2024"
className="hidden dark:block"
/>
</div>

{/* Newsletter Form */}
<Newsletter />
</div>
<div className="col-span-12 hidden lg:col-span-5 lg:block">
<img src="/images/react-conf-art.png" alt="React Advanced 2024" />
</div>
</header>
</div>

<hr />

<div className="page-content grid-cols-10 gap-5 lg:grid">
<div className="col-span-8">
<h1 className="mb-10 font-serif text-5xl leading-none text-maiTai md:text-[72px]">
What are you looking for?
<br /> How can we help?
</h1>
<p className="mb-10 text-2xl font-light md:text-4xl">
We could dump our <Link to={routes.blog()}>latest content</Link>,{' '}
<Link to={routes.home()}>upcoming events</Link>, and{' '}
<Link to={routes.home()}>roadmap</Link>, here. 🤪 But, is that
really what you’re looking for?
</p>
<p className="text-2xl font-bold md:text-4xl">
We invite you to Choose Your Own Adventure.
</p>
</div>
</div>

<hr />

<Accordion
heading="Why is Redwood special?"
subheading="What are some of the key differences between Redwood, Remix, and NextJS?"
>
<div className="bento">
<div className="col-span-6 lg:col-span-3">
<BlogCard
post={getPostBySlug(
'whats-different-comparing-the-router-in-nextjs-app-api-nextjs-pages-api-remix-and-redwoodjs'
)}
/>
</div>
<div className="col-span-6 lg:col-span-3">
<BlogCard post={getPostBySlug('techniques-for-fetching-data')} />
</div>
<div className="col-span-6 grid grid-cols-3 gap-5">
<div className="col-span-3 lg:col-span-2">
<BentoTech className="h-full" />
</div>
<div className="col-span-3 lg:col-span-1">
<BentoOpenSource className="h-full" />
</div>
</div>
</div>
</Accordion>
<Accordion
heading="Tell me more about RedwoodJS, where should I start?"
subheading="We have several resources to make learning easy."
>
<div className="grid grid-cols-1 gap-x-5 gap-y-16 md:grid-cols-2">
<div>
<a href={Constants.YOUTUBE_SERIES} target="_blank" rel="noreferrer">
<img
src="/images/youtube-playlist.png"
alt="YouTube Playlist: Building a Full-Stack Application in RedwoodJS"
/>
</a>
</div>
<div>
<h3 className="mb-5 text-2xl font-thin hover:text-sulu">
<a
href={Constants.YOUTUBE_SERIES}
target="_blank"
rel="noreferrer"
>
Building a Full-Stack Application in RedwoodJS
</a>
</h3>
<p className="mb-5">
This is a multi-part series that core Team Member, Amy Dutton, has
been working on. She builds a Hacker News Clone and covers React,
GraphQL, Apollo, Storybook, Prisma, TypeScript, and Jest.
</p>
<p>
<a
href={Constants.YOUTUBE_SERIES}
className="group/link inline-flex cursor-pointer items-center uppercase"
target="_blank"
rel="noreferrer"
>
<span className="border-b-1 border-b-black text-sm font-bold group-hover/link:border-b-alienArmpit dark:border-b-white dark:group-hover/link:border-b-sulu">
Watch the Playlist
</span>{' '}
<Icon id="doubleChevronRight" />
</a>
</p>
</div>

<div>
<a href={Constants.TUTORIAL}>
<img
src="/images/redwood-tutorial.png"
alt="RedwoodJS Tutorial"
/>
</a>
</div>
<div>
<h3 className="mb-5 text-2xl font-thin">
<a href={Constants.TUTORIAL} className="hover:text-sulu">
RedwoodJS Tutorial
</a>
</h3>
<p className="mb-5">
If you prefer reading instead of watching, this is for you! This
tutorial is really a master class in building a full-stack
application. It covers GraphQL, Apollo, Storybook, Prisma,
TypeScript, and Jest. At the end, you should have everything you
need to build full-stack applications within Redwood.
</p>
<p>
<a
href={Constants.TUTORIAL}
className="group/link inline-flex cursor-pointer items-center uppercase"
target="_blank"
rel="noreferrer"
>
<span className="border-b-1 border-b-black text-sm font-bold group-hover/link:border-b-alienArmpit dark:border-b-white dark:group-hover/link:border-b-sulu">
Read the Tutorial
</span>{' '}
<Icon id="doubleChevronRight" />
</a>
</p>
</div>
</div>
</Accordion>
<Accordion
heading="React Server Components is the future. How is RedwoodJS implementing them?"
subheading="We’ve named our next epoch of development, Big Horn, entirely focused on implemented React Server Components and SSR."
>
<div className="col-span-2 grid gap-5">
<BlogCard post={getPostBySlug('rsc-now-in-redwoodjs')} />
<BlogCard post={getPostBySlug('building-a-new-docs-site-with-rsc')} />
<BlogCard post={getPostBySlug('middleware-in-redwoodjs')} />
<BlogCard post={getPostBySlug('new-feature-ogimage-middleware')} />
</div>
</Accordion>
<Accordion
heading="What does the future of Redwood look like?"
subheading="Short answer: Bright! Long answer: We have a roadmap for that!"
>
<RoadmapDetails />
</Accordion>

<GetInvolved />

<ConnectWithUs />
</>
)
}

export default ReactAdvancedPage

0 comments on commit 1638c38

Please sign in to comment.