@patternfly/documentation-framework 6.49.3 → 6.49.5

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.49.5 (2026-07-28)
7
+
8
+ **Note:** Version bump only for package @patternfly/documentation-framework
9
+
10
+
11
+
12
+
13
+
14
+ ## 6.49.4 (2026-07-27)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **nav:** close sidebar on mobile breakpoint ([#5087](https://github.com/patternfly/patternfly-org/issues/5087)) ([75b6042](https://github.com/patternfly/patternfly-org/commit/75b6042db3183f752f64b83a52ab1818d70c261d))
20
+
21
+
22
+
23
+
24
+
6
25
  ## 6.49.3 (2026-07-27)
7
26
 
8
27
 
@@ -20,7 +20,6 @@ const DIVIDER_STYLES = {
20
20
  marginBottom: 'var(--pf-t--global--spacer--xs)'
21
21
  };
22
22
  import { makeSlug } from '../../helpers';
23
- import globalBreakpointXl from '@patternfly/react-tokens/dist/esm/t_global_breakpoint_xl';
24
23
  import { trackEvent } from '../../helpers';
25
24
 
26
25
  const getIsActive = (location, section, subsection = null) => {
@@ -31,14 +30,13 @@ const getIsActive = (location, section, subsection = null) => {
31
30
  const defaultValue = 50;
32
31
 
33
32
  const NavItem = ({ text, href, isDeprecated, isBeta, isDemo }) => {
34
- const isMobileView = window.innerWidth < Number.parseInt(globalBreakpointXl.value, 10);
35
33
  return (
36
34
  <PageContextConsumer key={href + text}>
37
- {({ onSidebarToggle, isSidebarOpen }) => (
35
+ {({ onSidebarToggle, isSidebarOpen, isMobile }) => (
38
36
  <li
39
37
  key={href + text}
40
38
  className="pf-v6-c-nav__item"
41
- onClick={() => isMobileView && onSidebarToggle && onSidebarToggle()}
39
+ onClick={() => isMobile && onSidebarToggle && onSidebarToggle()}
42
40
  >
43
41
  <Link
44
42
  to={href}
@@ -170,24 +168,27 @@ export const SideNav = ({ groupedRoutes = {}, navItems = [] }) => {
170
168
  }
171
169
  }, []);
172
170
 
173
- const groupedItems = React.useMemo(() =>
174
- (navItems || []).filter(entry => entry && entry.title), [navItems]);
175
- const ungroupedItems = React.useMemo(() =>
176
- (navItems || []).filter(entry => entry && !entry.title), [navItems]);
171
+ const groupedItems = React.useMemo(() => (navItems || []).filter((entry) => entry && entry.title), [navItems]);
172
+ const ungroupedItems = React.useMemo(() => (navItems || []).filter((entry) => entry && !entry.title), [navItems]);
177
173
 
178
- const renderNavItem = React.useCallback((item) => {
179
- if (!item) return null;
180
-
181
- return item.section ? (
182
- <Location key={item.section}>
183
- {({ location }) => ExpandableNav({ groupedRoutes, location, section: item.section })}
184
- </Location>
185
- ) : NavItem({
186
- key: item.href || `nav-item-${Math.random()}`,
187
- text: item.text || (item.href ? capitalize(item.href.replace(/\//g, '').replace(/-/g, ' ')) : 'Untitled'),
188
- href: item.href
189
- });
190
- }, [groupedRoutes]);
174
+ const renderNavItem = React.useCallback(
175
+ (item) => {
176
+ if (!item) return null;
177
+
178
+ return item.section ? (
179
+ <Location key={item.section}>
180
+ {({ location }) => ExpandableNav({ groupedRoutes, location, section: item.section })}
181
+ </Location>
182
+ ) : (
183
+ NavItem({
184
+ key: item.href || `nav-item-${Math.random()}`,
185
+ text: item.text || (item.href ? capitalize(item.href.replace(/\//g, '').replace(/-/g, ' ')) : 'Untitled'),
186
+ href: item.href
187
+ })
188
+ );
189
+ },
190
+ [groupedRoutes]
191
+ );
191
192
 
192
193
  return (
193
194
  <Nav aria-label="Side Nav" theme="light">
@@ -202,13 +203,9 @@ export const SideNav = ({ groupedRoutes = {}, navItems = [] }) => {
202
203
  {group.hasDivider && <Divider style={DIVIDER_STYLES} />}
203
204
  </React.Fragment>
204
205
  ))}
205
-
206
+
206
207
  {/* Render ungrouped items - this handles the current flat structure */}
207
- {ungroupedItems.length > 0 && (
208
- <NavList className="ws-side-nav-list">
209
- {ungroupedItems.map(renderNavItem)}
210
- </NavList>
211
- )}
208
+ {ungroupedItems.length > 0 && <NavList className="ws-side-nav-list">{ungroupedItems.map(renderNavItem)}</NavList>}
212
209
  </Nav>
213
210
  );
214
- };
211
+ };
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.49.3",
4
+ "version": "6.49.5",
5
5
  "author": "Red Hat",
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -92,5 +92,5 @@
92
92
  "http-cache-semantics": ">=4.1.1",
93
93
  "nanoid": "3.3.8"
94
94
  },
95
- "gitHead": "2873cec22ee4be4da3754462b3e95f11bfb76f76"
95
+ "gitHead": "d849cbd78e9798d84e6ff959947d4c562e0cfe95"
96
96
  }