Skip to content

Commit fc290d0

Browse files
feat(site): update doc-core to 1.22.0 (#4946)
* feat(API): update patternfly-doc-core to 1.15.4 * update to doc core 1.15.5 to resolve bugs found in 1.15.4 * feat(site): update doc-core to 1.20.0 * Update lock file * Add ci:build script for doc-core site to copy docs-site content at build * Update build-astro workflow to use ci:build:doc-core script * Update patternfly-doc-core to 1.22.0 * Add file extensions where needed after adding jsx extension to jsx files * Convert release notes data to JSX * Move wrangler.jsonc to root * Remove files which should've been gitignored * Update script to ensure needed directories are created * Gitignore and remove built files * Fix generate:content script to prevent double nesting of content dir * Update about-us.md to add section frontmatter at doc-core build time
1 parent 49ab888 commit fc290d0

File tree

88 files changed

+365
-5507
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+365
-5507
lines changed

.github/workflows-src/partials/build-astro.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
with:
1010
path: "packages/documentation-site/.cache"
1111
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
12-
- run: yarn build:doc-core
12+
- run: yarn ci:build:doc-core
1313
name: Build astro docs

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,5 @@ lerna-debug.log
4646
!.yarn/releases
4747
!.yarn/sdks
4848
!.yarn/versions
49+
50+
*.tsbuildinfo

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"build": "yarn workspace patternfly-org build && yarn copy",
1515
"build:extensions": "EXTENSIONS_ONLY=true PRERELEASE=true yarn build",
1616
"build:doc-core": "yarn workspace site build",
17+
"ci:build:doc-core": "yarn workspace site ci:build",
1718
"preview:doc-core": "yarn workspace site wrangler:preview",
1819
"build:ts": "yarn workspace patternfly-org build:ts",
1920
"build:ts:watch": "yarn build:ts --watch",
@@ -28,7 +29,8 @@
2829
"start:doc-core": "yarn workspace site dev",
2930
"uninstall": "find . -name node_modules | xargs rm -rf",
3031
"workflows": "node .github/generate-workflows",
31-
"test:a11y": "yarn workspace patternfly-org test:a11y"
32+
"test:a11y": "yarn workspace patternfly-org test:a11y",
33+
"generate:content": "yarn workspace site generate:content"
3234
},
3335
"workspaces": {
3436
"packages": [

packages/documentation-framework/components/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export * from './propsTable/propsTable';
88
export * from './navAnnouncementBanner/navAnnouncementBanner';
99
export * from './sideNav/sideNav';
1010
export * from './topNav/topNav';
11-
export * from './link/link';
11+
export * from './link/link.jsx';
1212
export * from './tableOfContents/tableOfContents';
1313
export * from './inlineAlert/inlineAlert';
1414
export * from './themeSelector/themeSelector';

packages/documentation-framework/components/link/link.js renamed to packages/documentation-framework/components/link/link.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import { Link as ReachLink, navigate } from '@reach/router';
3-
import { getAsyncComponent } from '../../routes';
3+
const { getAsyncComponent } = require('../../routes');
44

55
const Promiseany = (
66
Promise.any ||

packages/documentation-framework/components/sectionGallery/TextSummary.js renamed to packages/documentation-framework/components/sectionGallery/TextSummary.jsx

File renamed without changes.

packages/documentation-framework/components/sectionGallery/sectionDataListLayout.js renamed to packages/documentation-framework/components/sectionGallery/sectionDataListLayout.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import {
1111
ContentVariants,
1212
Label,
1313
} from "@patternfly/react-core";
14-
import { Link } from "../link/link";
15-
import { TextSummary } from "./TextSummary";
14+
import { Link } from "../link/link.jsx";
15+
import { TextSummary } from "./TextSummary.jsx";
1616

1717
export const SectionDataListLayout = ({
1818
galleryItems,
Lines changed: 1 addition & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1 @@
1-
import React from "react";
2-
3-
import './sectionGallery.css';
4-
import { SectionGalleryToolbar } from "./sectionGalleryToolbar";
5-
import { SectionGalleryLayout } from "./sectionGalleryLayout";
6-
import { SectionDataListLayout } from "./sectionDataListLayout";
7-
import { SectionGalleryWrapper } from "./sectionGalleryWrapper";
8-
9-
/**
10-
* Helper component returns gallery of items with search toolbar and switchable gallery/data list views.
11-
* @param {Object} illustrations - Object of preview images mapped to their snake_case item display name
12-
* @param {string} section - Name of the navigation section to create the gallery within
13-
* @param {Object} galleryItemsData - Object containing the image location & summary text mapped to the gallery item's hyphenated-name
14-
* @param {string} [placeholderText=Search by name] - Optional text to be displayed as placeholder for SearchInput
15-
* @param {string} [countText= items] - Optional text to be displayed after the number of search results
16-
* @param {string} [initialLayout=grid] - Optional text to indicate whether to default to grid or list layout
17-
* @param {Boolean} [hasGridText=false] - Optional boolean to toggle text on grid layout cards
18-
* @param {Boolean} [hasGridImages=false] - Optional boolean to toggle images on grid layout cards
19-
* @param {Boolean} [hasListText=false] - Optional boolean to toggle text on list layout rows
20-
* @param {Boolean} [hasListImages=false] - Optional boolean to toggle images on list layout rows
21-
* @param {Boolean} [isFullWidth=true] - Optional boolean to disable component from exceeding default max-width for page
22-
*/
23-
24-
export const SectionGallery = ({
25-
illustrations,
26-
section,
27-
subsection = null,
28-
includeSubsections = false,
29-
parseSubsections = false,
30-
galleryItemsData,
31-
placeholderText,
32-
countText,
33-
initialLayout = "grid",
34-
hasGridText = false,
35-
hasGridImages = true,
36-
hasListText = true,
37-
hasListImages = true,
38-
isFullWidth = true,
39-
onlyShowInGalleryData = false
40-
}) => (
41-
<SectionGalleryWrapper
42-
illustrations={illustrations}
43-
section={section}
44-
subsection={subsection}
45-
includeSubsections={includeSubsections}
46-
parseSubsections={parseSubsections}
47-
galleryItemsData={galleryItemsData}
48-
initialLayout={initialLayout}
49-
isFullWidth={isFullWidth}
50-
onlyShowInGalleryData={onlyShowInGalleryData}
51-
>
52-
{(sectionGalleryItems, searchTerm, setSearchTerm, layoutView, setLayoutView) => (
53-
<>
54-
<SectionGalleryToolbar
55-
galleryItems={sectionGalleryItems}
56-
searchTerm={searchTerm}
57-
setSearchTerm={setSearchTerm}
58-
layoutView={layoutView}
59-
setLayoutView={setLayoutView}
60-
placeholderText={placeholderText}
61-
countText={countText}
62-
/>
63-
<SectionGalleryLayout
64-
galleryItems={sectionGalleryItems}
65-
layoutView={layoutView}
66-
hasGridText={hasGridText}
67-
hasGridImages={hasGridImages}
68-
/>
69-
<SectionDataListLayout
70-
galleryItems={sectionGalleryItems}
71-
layoutView={layoutView}
72-
hasListText={hasListText}
73-
hasListImages={hasListImages}
74-
/>
75-
</>
76-
)}
77-
</SectionGalleryWrapper>
78-
);
1+
export * from './sectionGallery.jsx';
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
import React from "react";
2+
3+
import './sectionGallery.css';
4+
import { SectionGalleryToolbar } from "./sectionGalleryToolbar.jsx";
5+
import { SectionGalleryLayout } from "./sectionGalleryLayout.jsx";
6+
import { SectionDataListLayout } from "./sectionDataListLayout.jsx";
7+
import { SectionGalleryWrapper } from "./sectionGalleryWrapper.jsx";
8+
9+
/**
10+
* Helper component returns gallery of items with search toolbar and switchable gallery/data list views.
11+
* @param {Object} illustrations - Object of preview images mapped to their snake_case item display name
12+
* @param {string} section - Name of the navigation section to create the gallery within
13+
* @param {Object} galleryItemsData - Object containing the image location & summary text mapped to the gallery item's hyphenated-name
14+
* @param {string} [placeholderText=Search by name] - Optional text to be displayed as placeholder for SearchInput
15+
* @param {string} [countText= items] - Optional text to be displayed after the number of search results
16+
* @param {string} [initialLayout=grid] - Optional text to indicate whether to default to grid or list layout
17+
* @param {Boolean} [hasGridText=false] - Optional boolean to toggle text on grid layout cards
18+
* @param {Boolean} [hasGridImages=false] - Optional boolean to toggle images on grid layout cards
19+
* @param {Boolean} [hasListText=false] - Optional boolean to toggle text on list layout rows
20+
* @param {Boolean} [hasListImages=false] - Optional boolean to toggle images on list layout rows
21+
* @param {Boolean} [isFullWidth=true] - Optional boolean to disable component from exceeding default max-width for page
22+
*/
23+
24+
export const SectionGallery = ({
25+
illustrations,
26+
section,
27+
subsection = null,
28+
includeSubsections = false,
29+
parseSubsections = false,
30+
galleryItemsData,
31+
placeholderText,
32+
countText,
33+
initialLayout = "grid",
34+
hasGridText = false,
35+
hasGridImages = true,
36+
hasListText = true,
37+
hasListImages = true,
38+
isFullWidth = true,
39+
onlyShowInGalleryData = false
40+
}) => (
41+
<SectionGalleryWrapper
42+
illustrations={illustrations}
43+
section={section}
44+
subsection={subsection}
45+
includeSubsections={includeSubsections}
46+
parseSubsections={parseSubsections}
47+
galleryItemsData={galleryItemsData}
48+
initialLayout={initialLayout}
49+
isFullWidth={isFullWidth}
50+
onlyShowInGalleryData={onlyShowInGalleryData}
51+
>
52+
{(sectionGalleryItems, searchTerm, setSearchTerm, layoutView, setLayoutView) => (
53+
<>
54+
<SectionGalleryToolbar
55+
galleryItems={sectionGalleryItems}
56+
searchTerm={searchTerm}
57+
setSearchTerm={setSearchTerm}
58+
layoutView={layoutView}
59+
setLayoutView={setLayoutView}
60+
placeholderText={placeholderText}
61+
countText={countText}
62+
/>
63+
<SectionGalleryLayout
64+
galleryItems={sectionGalleryItems}
65+
layoutView={layoutView}
66+
hasGridText={hasGridText}
67+
hasGridImages={hasGridImages}
68+
/>
69+
<SectionDataListLayout
70+
galleryItems={sectionGalleryItems}
71+
layoutView={layoutView}
72+
hasListText={hasListText}
73+
hasListImages={hasListImages}
74+
/>
75+
</>
76+
)}
77+
</SectionGalleryWrapper>
78+
);

packages/documentation-framework/components/sectionGallery/sectionGalleryLayout.js renamed to packages/documentation-framework/components/sectionGallery/sectionGalleryLayout.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
Label,
1111
} from '@patternfly/react-core';
1212
import { navigate } from '@reach/router';
13-
import { TextSummary } from './TextSummary';
13+
import { TextSummary } from './TextSummary.jsx';
1414

1515
export const SectionGalleryLayout = ({
1616
galleryItems,

0 commit comments

Comments
 (0)