Skip to content

Commit

Permalink
Merge branch 'main' into tests/fix-typos-and-set-typings
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobbe authored Jan 17, 2025
2 parents 8f82626 + a39e340 commit 64a73a4
Show file tree
Hide file tree
Showing 52 changed files with 3,396 additions and 919 deletions.
8 changes: 0 additions & 8 deletions .changesets/11756.md

This file was deleted.

3 changes: 0 additions & 3 deletions .changesets/11769.md

This file was deleted.

3 changes: 3 additions & 0 deletions .changesets/11878.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Update to @typescript-eslint version that supports TypeScript 5.6.2 (#11878) by @Philzen

Fix TS version warning when running `yarn rw lint`
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// }
// ```
//
// See https://storybook.js.org/docs/react/writing-stories/args.
// See https://storybook.js.org/docs/7/writing-stories/args

import type { Meta, StoryObj } from '@storybook/react'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// }
// ```
//
// See https://storybook.js.org/docs/react/writing-stories/args.
// See https://storybook.js.org/docs/7/writing-stories/args

import type { Meta, StoryObj } from '@storybook/react'

Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/test-project/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.19",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.49",
"postcss": "^8.5.1",
"postcss-loader": "^8.1.1",
"prettier-plugin-tailwindcss": "^0.5.12",
"tailwindcss": "^3.4.17"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// }
// ```
//
// See https://storybook.js.org/docs/react/writing-stories/args.
// See https://storybook.js.org/docs/7/writing-stories/args

import type { Meta, StoryObj } from '@storybook/react'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// }
// ```
//
// See https://storybook.js.org/docs/react/writing-stories/args.
// See https://storybook.js.org/docs/7/writing-stories/args

import type { Meta, StoryObj } from '@storybook/react'

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -2126,7 +2126,7 @@ Starts Storybook locally
yarn redwood storybook
```
[Storybook](https://storybook.js.org/docs/react/get-started/introduction) is a tool for UI development that allows you to develop your components in isolation, away from all the conflated cruft of your real app.
[Storybook](https://storybook.js.org/docs/6/get-started/install) is a tool for UI development that allows you to develop your components in isolation, away from all the conflated cruft of your real app.
> "Props in, views out! Make it simple to reason about."
Expand Down
4 changes: 4 additions & 0 deletions docs/docs/how-to/oauth.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

If you're using an auth provider like [Auth0](/docs/auth/auth0), OAuth login to third party services (GitHub, Google, Facebook) is usually just a setting you can toggle on in your provider's dashboard. But if you're using [dbAuth](/docs/auth/dbauth) you'll only have username/password login to start. But, adding one or more OAuth clients isn't hard. This recipe will walk you through it from scratch, adding OAuth login via GitHub.

Alternatively, consider using the [redwoodjs-dbauth-oauth](https://github.com/spoonjoy/redwoodjs-dbauth-oauth) community package. This package streamlines the setup, includes support for multiple providers, and even includes UI components that you can use for making setup even easier.

If you do prefer to set this up manually or are just curious how OAuth and dbAuth can work together, read on!

## Prerequisites

This article assumes you have an app set up and are using dbAuth. We're going to make use of the dbAuth system to validate that you're who you say you are. If you just want to try this code out in a sandbox app, you can create a test blog app from scratch by checking out the [Redwood codebase](https://github.com/redwoodjs/redwood) itself and then running a couple of commands:
Expand Down
10 changes: 5 additions & 5 deletions docs/docs/storybook.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ You don't have to start the dev server, login as a user, tab through dropdowns,
And say goodbye to rendering a whole page and make six GraphQL calls just to change the color of a modal!
You can set up every component as a story and tweak it within Storybook. And for any [cells](./cells.md), [mocking GraphQL could not be easier!](./how-to/mocking-graphql-in-storybook.md)

RedwoodJS offers a Storybook integration leveraging Storybook's [Framework Packages](https://storybook.js.org/docs/configure/integration/frameworks),
RedwoodJS offers a Storybook integration leveraging Storybook's [Framework Packages](https://storybook.js.org/docs/7/configure/integration/frameworks),
using Vite as its bundler to align with your production project.

An older version of our Storybook integration used Webpack as its bundler — For more information on the differences, see [this forum post](https://community.redwoodjs.com/t/storybook-in-redwood-is-moving-to-vite/7212).
Expand All @@ -32,22 +32,22 @@ If this is your first time running Storybook:
- The Redwood CLI will install Storybook, the framework package, and all related dependencies.
- The Redwood CLI will create the following config files for you:
- `web/.storybook/main.ts`
- This is the primary [Storybook configuration file](https://storybook.js.org/docs/configure). Note that it references our framework package, [`storybook-framework-redwoodjs-vite`](https://www.npmjs.com/package/storybook-framework-redwoodjs-vite).
- This is the primary [Storybook configuration file](https://storybook.js.org/docs/7/configure). Note that it references our framework package, [`storybook-framework-redwoodjs-vite`](https://www.npmjs.com/package/storybook-framework-redwoodjs-vite).
- `web/.storybook/preview-body.html`
- This is required to change the `id` of the root div to `redwood-app`, which is what the entry file used by Vite requires.

Once Storybook is all set up, it'll spin up on localhost port `7910` and open your browser.

## Configuring Storybook

To configure Storybook, please follow [the official Storybook docs](https://storybook.js.org/docs/configure).
To configure Storybook, please follow [the official Storybook docs](https://storybook.js.org/docs/7/configure).

## Migrating from Storybook Webpack to Storybook Vite

An older version of our Storybook integration relied on Webpack. If you're just getting started with Storybook, this does not apply to you! 😊

If you've been using Storybook for a while, you might need to take some manual steps in upgrading to the new version.

If you don't have any custom [Storybook configuration](https://redwoodjs.com/docs/storybook#configuring-storybook), you should be good to go - no changes needed. The Out of Box experience should be the same, and please [let us know](https://github.com/redwoodjs/redwood/issues/new?assignees=&labels=bug%2Fneeds-info&projects=&template=bug-report.yml&title=%5BBug%5D%3A+) if you run into any issues.
If you don't have any custom [Storybook configuration](https://redwoodjs.com/docs/7.x/storybook/#configuring-storybook), you should be good to go - no changes needed. The Out of Box experience should be the same, and please [let us know](https://github.com/redwoodjs/redwood/issues/new?assignees=&labels=bug%2Fneeds-info&projects=&template=bug-report.yml&title=%5BBug%5D%3A+) if you run into any issues.

If you do have custom Storybook configuration, then you'll need to manually migrate it over to the new files. For example, if you've got any global decorators, you can now just follow the official Storybook docs on that: https://storybook.js.org/docs/writing-stories/decorators#global-decorators
If you do have custom Storybook configuration, then you'll need to manually migrate it over to the new files. For example, if you've got any global decorators, you can now just follow the official Storybook docs on that: https://storybook.js.org/docs/7/writing-stories/decorators#global-decorators
13 changes: 7 additions & 6 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
]
},
"dependencies": {
"@docusaurus/core": "3.5.2",
"@docusaurus/plugin-content-docs": "3.5.2",
"@docusaurus/preset-classic": "3.5.2",
"@docusaurus/theme-common": "3.5.2",
"@docusaurus/core": "3.7.0",
"@docusaurus/plugin-content-docs": "3.7.0",
"@docusaurus/preset-classic": "3.7.0",
"@docusaurus/theme-common": "3.7.0",
"@mdx-js/react": "3.0.1",
"clsx": "2.1.1",
"prism-react-renderer": "2.4.0",
Expand All @@ -36,8 +36,9 @@
"react-player": "2.16.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.5.2",
"@docusaurus/tsconfig": "3.5.2",
"@docusaurus/module-type-aliases": "3.7.0",
"@docusaurus/tsconfig": "3.7.0",
"@types/react": "^18.2.55",
"typescript": "5.6.2"
},
"packageManager": "[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion docs/versioned_docs/version-1.x/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -1823,7 +1823,7 @@ Starts Storybook locally
yarn redwood storybook
```
[Storybook](https://storybook.js.org/docs/react/get-started/introduction) is a tool for UI development that allows you to develop your components in isolation, away from all the conflated cruft of your real app.
[Storybook](https://storybook.js.org/docs/6/get-started/install) is a tool for UI development that allows you to develop your components in isolation, away from all the conflated cruft of your real app.
> "Props in, views out! Make it simple to reason about."
Expand Down
8 changes: 4 additions & 4 deletions docs/versioned_docs/version-1.x/storybook.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ All of these files get merged with Redwood's default configurations, which you c

> Since `storybook.config.js` configures Storybook's server, note that any changes you make require restarting Storybook.
While you can configure [any of Storybook server's available options](https://storybook.js.org/docs/react/configure/overview#configure-your-storybook-project) in `storybook.config.js`, you'll probably only want to configure `addons`:
While you can configure [any of Storybook server's available options](https://storybook.js.org/docs/6/configure) in `storybook.config.js`, you'll probably only want to configure `addons`:

```javascript title="web/config/storybook.config.js"
module.exports = {
Expand Down Expand Up @@ -77,7 +77,7 @@ export const decorators = [
]
```

For more, see the Storybook docs on [configuring how stories render](https://storybook.js.org/docs/react/configure/overview#configure-story-rendering).
For more, see the Storybook docs on [configuring how stories render](https://storybook.js.org/docs/6/configure#configure-story-rendering).

### Configuring the UI with `storybook.manager.js`

Expand All @@ -88,7 +88,7 @@ For more, see the Storybook docs on [configuring how stories render](https://sto
> yarn rw storybook --no-manager-cache
> ```
You can [theme Storybook's UI](https://storybook.js.org/docs/react/configure/theming) by installing two packages and making a few changes to Redwood's initial configuration.
You can [theme Storybook's UI](https://storybook.js.org/docs/6/configure/user-interface/theming) by installing two packages and making a few changes to Redwood's initial configuration.
From the root of your RedwoodJS project:
Expand All @@ -107,4 +107,4 @@ addons.setConfig({
})
```

Check out [Storybook's theming quickstart](https://storybook.js.org/docs/react/configure/theming#create-a-theme-quickstart) for a guide on creating your own theme. You may also want to export your theme to [re-use it with Storybook Docs](https://storybook.js.org/docs/react/configure/theming#theming-docs).
Check out [Storybook's theming quickstart](https://storybook.js.org/docs/6/configure/user-interface/theming#create-a-theme-quickstart) for a guide on creating your own theme. You may also want to export your theme to [re-use it with Storybook Docs](https://storybook.js.org/docs/6/configure/user-interface/theming#theming-docs).
2 changes: 1 addition & 1 deletion docs/versioned_docs/version-2.x/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -1842,7 +1842,7 @@ Starts Storybook locally
yarn redwood storybook
```
[Storybook](https://storybook.js.org/docs/react/get-started/introduction) is a tool for UI development that allows you to develop your components in isolation, away from all the conflated cruft of your real app.
[Storybook](https://storybook.js.org/docs/6/get-started/install) is a tool for UI development that allows you to develop your components in isolation, away from all the conflated cruft of your real app.
> "Props in, views out! Make it simple to reason about."
Expand Down
8 changes: 4 additions & 4 deletions docs/versioned_docs/version-2.x/storybook.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ All of these files get merged with Redwood's default configurations, which you c

> Since `storybook.config.js` configures Storybook's server, note that any changes you make require restarting Storybook.
While you can configure [any of Storybook server's available options](https://storybook.js.org/docs/react/configure/overview#configure-your-storybook-project) in `storybook.config.js`, you'll probably only want to configure `addons`:
While you can configure [any of Storybook server's available options](https://storybook.js.org/docs/6/configure) in `storybook.config.js`, you'll probably only want to configure `addons`:

```javascript title="web/config/storybook.config.js"
module.exports = {
Expand Down Expand Up @@ -77,7 +77,7 @@ export const decorators = [
]
```

For more, see the Storybook docs on [configuring how stories render](https://storybook.js.org/docs/react/configure/overview#configure-story-rendering).
For more, see the Storybook docs on [configuring how stories render](https://storybook.js.org/docs/6/configure#configure-story-rendering).

### Configuring the UI with `storybook.manager.js`

Expand All @@ -88,7 +88,7 @@ For more, see the Storybook docs on [configuring how stories render](https://sto
> yarn rw storybook --no-manager-cache
> ```
You can [theme Storybook's UI](https://storybook.js.org/docs/react/configure/theming) by installing two packages and making a few changes to Redwood's initial configuration.
You can [theme Storybook's UI](https://storybook.js.org/docs/6/configure/user-interface/theming) by installing two packages and making a few changes to Redwood's initial configuration.
From the root of your RedwoodJS project:
Expand All @@ -107,4 +107,4 @@ addons.setConfig({
})
```

Check out [Storybook's theming quickstart](https://storybook.js.org/docs/react/configure/theming#create-a-theme-quickstart) for a guide on creating your own theme. You may also want to export your theme to [re-use it with Storybook Docs](https://storybook.js.org/docs/react/configure/theming#theming-docs).
Check out [Storybook's theming quickstart](https://storybook.js.org/docs/6/configure/user-interface/theming#create-a-theme-quickstart) for a guide on creating your own theme. You may also want to export your theme to [re-use it with Storybook Docs](https://storybook.js.org/docs/6/configure/user-interface/theming#theming-docs).
2 changes: 1 addition & 1 deletion docs/versioned_docs/version-3.x/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -1910,7 +1910,7 @@ Starts Storybook locally
yarn redwood storybook
```
[Storybook](https://storybook.js.org/docs/react/get-started/introduction) is a tool for UI development that allows you to develop your components in isolation, away from all the conflated cruft of your real app.
[Storybook](https://storybook.js.org/docs/6/get-started/install) is a tool for UI development that allows you to develop your components in isolation, away from all the conflated cruft of your real app.
> "Props in, views out! Make it simple to reason about."
Expand Down
8 changes: 4 additions & 4 deletions docs/versioned_docs/version-3.x/storybook.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ All of these files get merged with Redwood's default configurations, which you c

> Since `storybook.config.js` configures Storybook's server, note that any changes you make require restarting Storybook.
While you can configure [any of Storybook server's available options](https://storybook.js.org/docs/react/configure/overview#configure-your-storybook-project) in `storybook.config.js`, you'll probably only want to configure `addons`:
While you can configure [any of Storybook server's available options](https://storybook.js.org/docs/6/configure) in `storybook.config.js`, you'll probably only want to configure `addons`:

```javascript title="web/config/storybook.config.js"
module.exports = {
Expand Down Expand Up @@ -77,7 +77,7 @@ export const decorators = [
]
```

For more, see the Storybook docs on [configuring how stories render](https://storybook.js.org/docs/react/configure/overview#configure-story-rendering).
For more, see the Storybook docs on [configuring how stories render](https://storybook.js.org/docs/6/configure#configure-story-rendering).

### Configuring the UI with `storybook.manager.js`

Expand All @@ -88,7 +88,7 @@ For more, see the Storybook docs on [configuring how stories render](https://sto
> yarn rw storybook --no-manager-cache
> ```
You can [theme Storybook's UI](https://storybook.js.org/docs/react/configure/theming) by installing two packages and making a few changes to Redwood's initial configuration.
You can [theme Storybook's UI](https://storybook.js.org/docs/6/configure/user-interface/theming) by installing two packages and making a few changes to Redwood's initial configuration.
From the root of your RedwoodJS project:
Expand All @@ -107,4 +107,4 @@ addons.setConfig({
})
```

Check out [Storybook's theming quickstart](https://storybook.js.org/docs/react/configure/theming#create-a-theme-quickstart) for a guide on creating your own theme. You may also want to export your theme to [re-use it with Storybook Docs](https://storybook.js.org/docs/react/configure/theming#theming-docs).
Check out [Storybook's theming quickstart](https://storybook.js.org/docs/6/configure/user-interface/theming#create-a-theme-quickstart) for a guide on creating your own theme. You may also want to export your theme to [re-use it with Storybook Docs](https://storybook.js.org/docs/6/configure/user-interface/theming#theming-docs).
2 changes: 1 addition & 1 deletion docs/versioned_docs/version-4.x/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -1910,7 +1910,7 @@ Starts Storybook locally
yarn redwood storybook
```
[Storybook](https://storybook.js.org/docs/react/get-started/introduction) is a tool for UI development that allows you to develop your components in isolation, away from all the conflated cruft of your real app.
[Storybook](https://storybook.js.org/docs/6/get-started/install) is a tool for UI development that allows you to develop your components in isolation, away from all the conflated cruft of your real app.
> "Props in, views out! Make it simple to reason about."
Expand Down
Loading

0 comments on commit 64a73a4

Please sign in to comment.