Skip to content

Commit 45b4059

Browse files
authored
feat(org): pull in react & core docs to astro site (#4758)
* feat(org): pull in react & core docs to astro site * fix yarn lock after rebase * readd import for icon
1 parent cb6b669 commit 45b4059

File tree

7 files changed

+526
-253
lines changed

7 files changed

+526
-253
lines changed

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@
1313
"build:analyze": "yarn workspace patternfly-org build:analyze && yarn copy",
1414
"build": "yarn workspace patternfly-org build && yarn workspace site build && yarn copy",
1515
"build:extensions": "EXTENSIONS_ONLY=true PRERELEASE=true yarn build",
16+
"build:doc-core": "yarn workspace site build",
1617
"copy": "rm -rf build/patternfly-org/site && mkdir -p build/patternfly-org && cp -r packages/documentation-site/public build/patternfly-org/site",
1718
"clean": "lerna run clean && rm -rf build",
1819
"serve": "npx pf-docs-framework serve build/patternfly-org/site",
20+
"serve:doc-core": "yarn workspace site serve",
1921
"test": "yarn workspace patternfly-org test:a11y:ci",
2022
"screenshots": "yarn workspace patternfly-org screenshots",
2123
"start": "yarn develop",
2224
"start:extensions": "yarn develop:extensions",
25+
"start:doc-core": "yarn workspace site dev",
2326
"uninstall": "find . -name node_modules | xargs rm -rf",
2427
"workflows": "node .github/generate-workflows",
2528
"test:a11y": "yarn workspace patternfly-org test:a11y"

packages/site/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
"clean": "rm -rf src/generated",
88
"generate:content": "patternfly-doc-core convert-to-mdx ../documentation-site/patternfly-docs/content/",
99
"dev": "patternfly-doc-core start",
10-
"build": "patternfly-doc-core build",
10+
"build": "patternfly-doc-core build --props",
1111
"serve": "patternfly-doc-core serve",
1212
"sync": "patternfly-doc-core sync",
1313
"init:docs": "patternfly-doc-core init"
1414
},
1515
"dependencies": {
16-
"@patternfly/patternfly-doc-core": "^1.12.0",
16+
"@patternfly/patternfly-doc-core": "^1.13.1",
1717
"astro": "^5.7.13"
1818
},
1919
"devDependencies": {

packages/site/pf-docs.config.mjs

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,31 @@ export const config = {
1010
//
1111
// example content entry for remote content, this would fetch all markdown files matching the glob in 'pattern'
1212
// from the specified npm package and serve them with a content identifier of 'react-component-docs':
13-
// {
14-
// packageName: "@patternfly/react-core",
15-
// pattern: "**/components/**/*.md",
16-
// name: "react-component-docs",
17-
// },
13+
// packageName: "../../../node_modules/@patternfly/react-core",
14+
// base: "../../node_modules/@patternfly/react-core",
15+
// src/{components/*/examples,layouts/*/examples,demos/**}
16+
{
17+
base: "../../node_modules/@patternfly/react-core",
18+
pattern: "src/{components/*/examples,layouts/*/examples,demos/**}/*.{md,mdx}",
19+
name: "react-component-docs", // must be "react-component-docs" to assign "react" tab properly
20+
},
21+
{
22+
base: "../../node_modules/@patternfly/patternfly",
23+
pattern: "docs/**/*.{md,mdx}",
24+
name: "core-component-docs", // must be "core-component-docs" to assign "html" tab properly
25+
},
1826
],
1927
navSectionOrder: [],
2028
outputDir: './dist',
2129
propsGlobs: [
22-
// {
23-
// include: ['*/@patternfly/react-core/src/**/*.tsx'],
24-
// exclude: [
25-
// '/**/examples/**',
26-
// '/**/__mocks__/**',
27-
// '/**/__tests__/**',
28-
// '/**/*.test.tsx',
29-
// ],
30-
// },
30+
{
31+
include: ['*/../../../node_modules/@patternfly/react-core/src/**/*.tsx'],
32+
exclude: [
33+
'/**/examples/**',
34+
'/**/__mocks__/**',
35+
'/**/__tests__/**',
36+
'/**/*.test.tsx',
37+
],
38+
},
3139
],
3240
}

packages/site/src/content/get-started/release-notes-data.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3020,8 +3020,8 @@ export { ToolbarLabelGroupContent as CustomThing };`}
30203020
<Content>
30213021
<p>The `variant` prop of ToolbarGroup and ToolbarToggleGroup had these options renamed:</p>
30223022
<ul>
3023-
<li>button-group --> action-group</li>
3024-
<li>icon-button-group --> action-group-plain</li>
3023+
<li>button-group &rarr; action-group</li>
3024+
<li>icon-button-group &rarr; action-group-plain</li>
30253025
</ul>
30263026
<p>Codemods will make the following updates:</p>
30273027
<h2>Example in</h2>
@@ -3276,9 +3276,9 @@ export const ToolbarReplaceChipInstancesInput = () => (
32763276
<Content>
32773277
<p>The following Toolbar interfaces have been renamed</p>
32783278
<ul>
3279-
<li>ToolbarChipGroupContentProps --> ToolbarLabelGroupContentProps</li>
3280-
<li>ToolbarChipGroup --> ToolbarLabelGroup</li>
3281-
<li>ToolbarChip --> ToolbarLabel</li>
3279+
<li>ToolbarChipGroupContentProps &rarr; ToolbarLabelGroupContentProps</li>
3280+
<li>ToolbarChipGroup &rarr; ToolbarLabelGroup</li>
3281+
<li>ToolbarChip &rarr; ToolbarLabel</li>
32823282
</ul>
32833283
<p>Codemods will make the following updates:</p>
32843284
<h2>Example in</h2>

packages/site/src/content/get-started/upgrade.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ title: Upgrade to PatternFly 6
55
section: get-started
66
---
77
import { Alert, Button, Divider } from '@patternfly/react-core';
8+
import ArrowRightIcon from '@patternfly/react-icons/dist/esm/icons/arrow-right-icon';
89

910
PatternFly 6 introduces the exciting new features and functionality outlined [our release highlights](/get-started/release-highlights). For a detailed breakdown on the work that went into this release, you can view [the PatternFly 6 major release notes](/get-started/upgrade/release-notes).
1011

@@ -186,12 +187,12 @@ If you have previously implemented any breakpoint logic based on a pixel value,
186187

187188
If you need support as you upgrade, the PatternFly team is here to help! Since this upgrade includes significant visual changes, please contact us with questions about styles or concerns with your UI. We'll always do our best to answer your questions, double-check your work, and connect you with the right people quickly.
188189

189-
<Button variant="link" iconPosition="end" isInline component="a" href="https://join.slack.com/t/patternfly/shared_invite/zt-1npmqswgk-bF2R1E2rglV8jz5DNTezMQ" target="_blank">
190-
Reach out to us on Slack
190+
<Button variant="link" isInline component="a" href="https://join.slack.com/t/patternfly/shared_invite/zt-1npmqswgk-bF2R1E2rglV8jz5DNTezMQ" target="_blank">
191+
Reach out to us on Slack <ArrowRightIcon />
191192
</Button>
192193

193-
<Button variant="link" iconPosition="end" isInline component="a" href="https://github.com/orgs/patternfly/discussions" target="_blank">
194-
Ask a question in GitHub Discussions
194+
<Button variant="link" isInline component="a" href="https://github.com/orgs/patternfly/discussions" target="_blank">
195+
Ask a question in GitHub Discussions <ArrowRightIcon />
195196
</Button>
196197

197198
**Note:** If you use a custom solution to replicate PatternFly styling (without using PatternFly components), then your product will need to be re-skinned. This may be a large undertaking, so we encourage you to get help from the PatternFly team.

packages/site/wrangler.jsonc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"$schema": "node_modules/wrangler/config-schema.json",
3+
"name": "patternfly-org",
4+
"main": "./dist/_worker.js/index.js",
5+
"compatibility_date": "2025-06-17",
6+
"compatibility_flags": ["nodejs_compat"],
7+
"assets": {
8+
"binding": "ASSETS",
9+
"directory": "./dist"
10+
},
11+
"observability": {
12+
"enabled": true
13+
}
14+
}

0 commit comments

Comments
 (0)