@patternfly/documentation-framework 6.31.9 → 6.31.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 6.31.11 (2025-11-20)
7
+
8
+ **Note:** Version bump only for package @patternfly/documentation-framework
9
+
10
+
11
+
12
+
13
+
14
+ ## 6.31.10 (2025-11-18)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * Resolves broken links. ([#4869](https://github.com/patternfly/patternfly-org/issues/4869)) ([4a86755](https://github.com/patternfly/patternfly-org/commit/4a867550498b03efd7f62ca1b9e59f9237ae93f9))
20
+
21
+
22
+
23
+
24
+
6
25
  ## 6.31.9 (2025-11-18)
7
26
 
8
27
  **Note:** Version bump only for package @patternfly/documentation-framework
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { useLocation } from '@reach/router';
2
3
  import { groupedRoutes } from '../../routes';
3
4
 
4
5
  export const SectionGalleryWrapper = ({
@@ -13,8 +14,16 @@ export const SectionGalleryWrapper = ({
13
14
  children,
14
15
  }) => {
15
16
  let sectionRoutes = subsection
16
- ? groupedRoutes[section][subsection]
17
+ ? groupedRoutes[section]?.[subsection]
17
18
  : groupedRoutes[section];
19
+ // Safety check: if sectionRoutes is undefined/null, return empty array to prevent errors
20
+ if (!sectionRoutes) {
21
+ return (
22
+ <div className={`ws-section-gallery${isFullWidth ? ' ws-section-gallery-full-width' : ''}`}>
23
+ {children([], '', () => {}, initialLayout, () => {})}
24
+ </div>
25
+ );
26
+ }
18
27
  if (!includeSubsections || parseSubsections) {
19
28
  const sectionRoutesArr = Object.entries(sectionRoutes);
20
29
  // loop through galleryItems object and build new object to handle subsections
@@ -40,6 +49,7 @@ export const SectionGalleryWrapper = ({
40
49
  }, {});
41
50
  }
42
51
 
52
+ const location = useLocation();
43
53
  const [searchTerm, setSearchTerm] = React.useState('');
44
54
  const [layoutView, setLayoutView] = React.useState(initialLayout);
45
55
  const filteredItems = Object.entries(sectionRoutes).filter(
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@patternfly/documentation-framework",
3
3
  "description": "A framework to build documentation for PatternFly.",
4
- "version": "6.31.9",
4
+ "version": "6.31.11",
5
5
  "author": "Red Hat",
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -12,7 +12,7 @@
12
12
  "@babel/preset-env": "7.27.1",
13
13
  "@babel/preset-react": "^7.24.1",
14
14
  "@mdx-js/util": "1.6.16",
15
- "@patternfly/ast-helpers": "^1.4.0-alpha.318",
15
+ "@patternfly/ast-helpers": "^1.4.0-alpha.320",
16
16
  "@reach/router": "npm:@gatsbyjs/reach-router@1.3.9",
17
17
  "autoprefixer": "10.4.19",
18
18
  "babel-loader": "^9.1.3",
@@ -89,5 +89,5 @@
89
89
  "http-cache-semantics": ">=4.1.1",
90
90
  "nanoid": "3.3.8"
91
91
  },
92
- "gitHead": "81a46f13d79dd603b8e621e12137befe985a408e"
92
+ "gitHead": "dd795161341deb5f3f19001937c9bef425a61d5a"
93
93
  }
@@ -73,31 +73,31 @@ const Page404 = () => {
73
73
  <Card404
74
74
  img={PatternFlyIcon}
75
75
  alt="PatternFly icon"
76
- title="Getting started"
77
- body="Learn about designing and developing with PatternFly."
76
+ title="About us"
77
+ body="Learn about the PatternFly design system."
78
78
  link={{
79
- text: 'View getting started resources',
79
+ text: 'Learn about PatternFly',
80
80
  to: '/about-us',
81
81
  }}
82
82
  />
83
83
  <Card404
84
84
  img={GuidelinesIcon}
85
85
  alt="Guidelines icon"
86
- title="Guidelines"
87
- body="Check out PatternFly's design approach to icons, colors, and more."
86
+ title="Foundations and styles"
87
+ body="Check out our approach to foundational elements and styles, like icons, colors, and more."
88
88
  link={{
89
- text: 'View guidelines',
90
- to: '/design-foundations/colors',
89
+ text: 'View foundations and styles',
90
+ to: '/foundations-and-styles/overview',
91
91
  }}
92
92
  />
93
93
  <Card404
94
94
  img={ComponentsIcon}
95
95
  alt="Components icon"
96
96
  title="Components"
97
- body="Start creating your applications with components -- the building blocks of user interfaces."
97
+ body="Start creating your applications with components, our UI building blocks."
98
98
  link={{
99
- text: 'View components',
100
- to: '/components/about-modal',
99
+ text: 'View all components',
100
+ to: '/components/all-components',
101
101
  }}
102
102
  />
103
103
  <Card404
@@ -107,7 +107,7 @@ const Page404 = () => {
107
107
  body="Visualize your facts and figures by designing the right charts for your data."
108
108
  link={{
109
109
  text: 'View charts',
110
- to: '/charts/about-charts',
110
+ to: '/components/charts/overview',
111
111
  }}
112
112
  />
113
113
  </Grid>
package/routes.js CHANGED
@@ -154,7 +154,7 @@ function getAsyncComponent(url) {
154
154
  if (allRoutes[url]) {
155
155
  res = allRoutes[url].Component;
156
156
  }
157
- else if (routes[url]) {
157
+ else if (routes[url] && routes[url].sources && routes[url].sources.length > 0) {
158
158
  res = routes[url].sources[0].Component;
159
159
  }
160
160
 
package/templates/mdx.js CHANGED
@@ -96,7 +96,7 @@ const MDXChildTemplate = ({ Component, source, toc = [], index = 0, id }) => {
96
96
  </React.Fragment>
97
97
  )}{' '}
98
98
  To learn more about deprecated components, visit{' '}
99
- <Link to="/get-started/about-patternfly#deprecated-components">about PatternFly.</Link>
99
+ <Link to="/about-us#deprecated-components">about PatternFly.</Link>
100
100
  </InlineAlert>
101
101
  )}
102
102
  {(template || source === 'react-template') && (