Skip to content

Commit 86f0cf6

Browse files
committed
Rebase examples catalog onto current site page
1 parent 38e847e commit 86f0cf6

1 file changed

Lines changed: 22 additions & 55 deletions

File tree

prototypes/docusaurus/src/pages/examples.tsx

Lines changed: 22 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type {ReactNode} from 'react';
22
import Link from '@docusaurus/Link';
33
import Layout from '@theme/Layout';
44

5+
import {docsRoutes} from '../constants/docsRoutes';
56
import styles from './examples.module.css';
67

78
const decisionPaths = [
@@ -10,45 +11,24 @@ const decisionPaths = [
1011
title: 'Start a new Rails + React app',
1112
description:
1213
'Use the create-app and quick-start docs first, then compare the maintained starter repos for SSR + HMR or React on Rails Pro + RSC.',
13-
href: '/docs/getting-started/create-react-on-rails-app',
14+
href: docsRoutes.docsGuide,
1415
cta: 'Open starter docs',
1516
},
1617
{
1718
eyebrow: 'Migration path',
1819
title: 'Move from react-rails',
1920
description:
2021
'Use the migration guide together with the maintained migration reference repos instead of reconstructing the process from older blog posts.',
21-
href: '/docs/migrating/migrating-from-react-rails',
22+
href: docsRoutes.migrateFromReactRails,
2223
cta: 'Use the migration guide',
2324
},
2425
{
2526
eyebrow: 'Pro path',
2627
title: 'Evaluate React on Rails Pro + RSC',
2728
description:
28-
'Start with the Pro docs, then use the public RSC and benchmark demos to judge where the added complexity pays for itself.',
29-
href: '/docs/pro/react-server-components/tutorial',
30-
cta: 'Evaluate Pro + RSC',
31-
},
32-
];
33-
34-
const namingPattern = [
35-
{
36-
title: 'Demo repos',
37-
pattern: 'react-on-rails-demo-*',
38-
description:
39-
'Use for evaluation apps, benchmarks, feature showcases, and product comparisons.',
40-
},
41-
{
42-
title: 'Example repos',
43-
pattern: 'react-on-rails-example-*',
44-
description:
45-
'Use for focused implementation references, migrations, and narrowly scoped technical patterns.',
46-
},
47-
{
48-
title: 'Tutorial repos',
49-
pattern: 'react-on-rails-tutorial-*',
50-
description:
51-
'Use for repos that map directly to a docs flow, workshop, or educational sequence.',
29+
'Start with the OSS vs Pro guide, then use the public RSC demos to judge where the added complexity pays for itself.',
30+
href: docsRoutes.ossVsPro,
31+
cta: 'Compare OSS and Pro',
5232
},
5333
];
5434

@@ -81,7 +61,7 @@ const catalogSections = [
8161
eyebrow: 'Migrations',
8262
title: 'Adoption and migration references',
8363
description:
84-
'Use these when your question is not "how do I start?" but "how do I move an existing app?"',
64+
'Use these when your question is not how do I start? but how do I move an existing app?',
8565
items: [
8666
{
8767
title: 'react-rails migration example',
@@ -105,7 +85,7 @@ const catalogSections = [
10585
eyebrow: 'React on Rails Pro',
10686
title: 'RSC and performance demos',
10787
description:
108-
'These are the demos to reach for when the conversation is about React on Rails Pro, React Server Components, and measured user-visible wins.',
88+
'These public demos use React on Rails Pro and React Server Components. Reach for them when the conversation is about measured user-visible wins.',
10989
items: [
11090
{
11191
title: 'Hacker News RSC demo',
@@ -123,13 +103,21 @@ const catalogSections = [
123103
href: 'https://github.com/shakacode/react-server-components-marketplace-demo',
124104
tags: ['Pro', 'RSC', 'Performance'],
125105
},
106+
],
107+
},
108+
{
109+
eyebrow: 'Legacy',
110+
title: 'Historical full-app reference',
111+
description:
112+
'This repo is still useful when you want to see an older production-style app, but it is no longer the recommended starting point for new work.',
113+
items: [
126114
{
127-
title: 'Gumroad comparison demo',
128-
repo: 'gumroad-rsc',
115+
title: 'react-webpack-rails-tutorial',
116+
repo: 'react-webpack-rails-tutorial',
129117
description:
130-
'Benchmark-oriented comparison between an Inertia-style surface and a React on Rails Pro + RSC surface on the same product domain.',
131-
href: 'https://github.com/shakacode/gumroad-rsc',
132-
tags: ['Pro', 'RSC', 'Benchmark'],
118+
'Older full-app reference with a live demo at reactrails.com. Keep this for historical context rather than as the primary starter.',
119+
href: 'https://github.com/shakacode/react-webpack-rails-tutorial',
120+
tags: ['Legacy', 'Full App'],
133121
},
134122
],
135123
},
@@ -173,26 +161,6 @@ export default function ExamplesPage(): ReactNode {
173161
</div>
174162
</section>
175163

176-
<section className="container">
177-
<div className={styles.sectionHeader}>
178-
<p className={styles.sectionEyebrow}>Naming pattern</p>
179-
<h2>Use predictable prefixes for public React on Rails repos.</h2>
180-
<p className={styles.sectionLead}>
181-
The catalog is moving toward clearer prefixes so GitHub filtering and docs curation
182-
stay simple.
183-
</p>
184-
</div>
185-
<div className={styles.patternGrid}>
186-
{namingPattern.map((entry) => (
187-
<article className={styles.card} key={entry.pattern}>
188-
<h3>{entry.title}</h3>
189-
<p className={styles.pattern}>{entry.pattern}</p>
190-
<p>{entry.description}</p>
191-
</article>
192-
))}
193-
</div>
194-
</section>
195-
196164
{catalogSections.map((section) => (
197165
<section className="container" key={section.title}>
198166
<div className={styles.sectionHeader}>
@@ -227,8 +195,7 @@ export default function ExamplesPage(): ReactNode {
227195
<p className={styles.sectionEyebrow}>Source of truth</p>
228196
<h2>Use the docs for taxonomy and this page for curation.</h2>
229197
<p className={styles.sectionLead}>
230-
The canonical docs page for repo taxonomy lives in
231-
{' '}
198+
The canonical docs page for repo taxonomy lives in{' '}
232199
<Link to="/docs/getting-started/examples-and-references">
233200
Examples and migration references
234201
</Link>

0 commit comments

Comments
 (0)