@patternfly/documentation-framework 6.45.0 → 6.46.1

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,28 @@
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.46.1 (2026-06-29)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **docs-framework:** fixes isStickyStuck rendering bugs ([#5044](https://github.com/patternfly/patternfly-org/issues/5044)) ([7d1d14d](https://github.com/patternfly/patternfly-org/commit/7d1d14d5dc205a1719d804f9480a84b58b8fba26))
12
+
13
+
14
+
15
+
16
+
17
+ # 6.46.0 (2026-06-26)
18
+
19
+
20
+ ### Features
21
+
22
+ * **ver:** update to release testing vers ([#5043](https://github.com/patternfly/patternfly-org/issues/5043)) ([e190a06](https://github.com/patternfly/patternfly-org/commit/e190a068d45710b683ce39ffa87927ebcf473ae5))
23
+
24
+
25
+
26
+
27
+
6
28
  # 6.45.0 (2026-06-25)
7
29
 
8
30
 
@@ -1,25 +1,34 @@
1
- import { useState, useLayoutEffect } from 'react';
1
+ import { useState, useLayoutEffect, useRef } from 'react';
2
2
 
3
3
  export const useIsStuck = (stickyElementId) => {
4
4
  const [isStuck, setIsStuck] = useState(false);
5
+ const prevIsStuck = useRef(false);
5
6
 
6
7
  useLayoutEffect(() => {
7
8
  const scrollElement = document.getElementById('ws-page-main');
8
9
  const stickyElement = document.getElementById(stickyElementId);
9
10
 
10
11
  if (!scrollElement || !stickyElement) {
11
- setIsStuck(false);
12
+ if (prevIsStuck.current !== false) {
13
+ setIsStuck(false);
14
+ prevIsStuck.current = false;
15
+ }
12
16
  return;
13
17
  }
14
18
 
15
19
  const syncFromScroll = () => {
16
- setIsStuck(scrollElement.scrollTop > stickyElement.getBoundingClientRect().top);
20
+ const newIsStuck = scrollElement.scrollTop >= stickyElement.offsetTop;
21
+ // Only update state if the value actually changed
22
+ if (prevIsStuck.current !== newIsStuck) {
23
+ setIsStuck(newIsStuck);
24
+ prevIsStuck.current = newIsStuck;
25
+ }
17
26
  };
18
27
 
19
28
  syncFromScroll();
20
29
  scrollElement.addEventListener('scroll', syncFromScroll, { passive: true });
21
30
  return () => scrollElement.removeEventListener('scroll', syncFromScroll);
22
- }, []);
31
+ }, [stickyElementId]);
23
32
 
24
33
  return isStuck;
25
34
  };
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.45.0",
4
+ "version": "6.46.1",
5
5
  "author": "Red Hat",
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -68,11 +68,11 @@
68
68
  "webpack-merge": "5.10.0"
69
69
  },
70
70
  "peerDependencies": {
71
- "@patternfly/patternfly": "^6.6.0-prerelease.14",
72
- "@patternfly/react-code-editor": "^6.6.0-prerelease.9",
73
- "@patternfly/react-core": "^6.6.0-prerelease.8",
74
- "@patternfly/react-icons": "^6.6.0-prerelease.3",
75
- "@patternfly/react-table": "^6.6.0-prerelease.8",
71
+ "@patternfly/patternfly": "^6.6.0-prerelease.16",
72
+ "@patternfly/react-code-editor": "^6.6.0-prerelease.10",
73
+ "@patternfly/react-core": "^6.6.0-prerelease.9",
74
+ "@patternfly/react-icons": "^6.6.0-prerelease.4",
75
+ "@patternfly/react-table": "^6.6.0-prerelease.9",
76
76
  "react": "^17.0.0 || ^18.0.0",
77
77
  "react-dom": "^17.0.0 || ^18.0.0"
78
78
  },
@@ -92,5 +92,5 @@
92
92
  "http-cache-semantics": ">=4.1.1",
93
93
  "nanoid": "3.3.8"
94
94
  },
95
- "gitHead": "72136b1e2a4215c0bbd4fbb34d29efcb6a4d8df8"
95
+ "gitHead": "ae6618374996ed56c89229619a172a6ab3dd63f3"
96
96
  }
package/templates/mdx.js CHANGED
@@ -25,6 +25,31 @@ import { convertToReactComponent } from '@patternfly/ast-helpers';
25
25
  import { FunctionsTable } from '../components/functionsTable/functionsTable';
26
26
  import { useIsStuck } from '../hooks/useIsStuck';
27
27
 
28
+ const StickyTabs = React.memo(({ sourceKeys, tabNames, activeSource, path }) => {
29
+ const isStickyStuck = useIsStuck('ws-sticky-nav-tabs');
30
+
31
+ return (
32
+ <PageSection id="ws-sticky-nav-tabs" stickyBase="top" isStickyStuck={isStickyStuck} type="tabs">
33
+ <div className="pf-v6-c-tabs pf-m-page-insets">
34
+ <ul className="pf-v6-c-tabs__list">
35
+ {sourceKeys.map((source, index) => (
36
+ <li
37
+ key={source}
38
+ className={css('pf-v6-c-tabs__item', activeSource === source && 'pf-m-current')}
39
+ onClick={() => trackEvent('tab_click', 'click_event', source.toUpperCase())}
40
+ >
41
+ <Link className="pf-v6-c-tabs__link" to={`${path}${index === 0 ? '' : '/' + source}`}>
42
+ {tabNames[source]}
43
+ </Link>
44
+ </li>
45
+ ))}
46
+ </ul>
47
+ </div>
48
+ </PageSection>
49
+ );
50
+ });
51
+ StickyTabs.displayName = 'StickyTabs';
52
+
28
53
  const MDXChildTemplate = ({ Component, source, toc = [], index = 0, id }) => {
29
54
  const {
30
55
  propComponents = [],
@@ -168,7 +193,6 @@ const MDXChildTemplate = ({ Component, source, toc = [], index = 0, id }) => {
168
193
  };
169
194
 
170
195
  export const MDXTemplate = ({ title, sources = [], path, id, componentsData }) => {
171
- const isStickyStuck = useIsStuck('ws-sticky-nav-tabs');
172
196
 
173
197
  const hasFeedbackButton = process.env.hasFeedbackButton;
174
198
  const isDeprecated =
@@ -310,24 +334,7 @@ export const MDXTemplate = ({ title, sources = [], path, id, componentsData }) =
310
334
  </Content>
311
335
  </PageSection>
312
336
  {showTabs && (
313
- <PageSection id="ws-sticky-nav-tabs" stickyBase="top" isStickyStuck={isStickyStuck} type="tabs">
314
- <div className="pf-v6-c-tabs pf-m-page-insets">
315
- <ul className="pf-v6-c-tabs__list">
316
- {sourceKeys.map((source, index) => (
317
- <li
318
- key={source}
319
- className={css('pf-v6-c-tabs__item', activeSource === source && 'pf-m-current')}
320
- // Send clicked tab name for analytics
321
- onClick={() => trackEvent('tab_click', 'click_event', source.toUpperCase())}
322
- >
323
- <Link className="pf-v6-c-tabs__link" to={`${path}${index === 0 ? '' : '/' + source}`}>
324
- {tabNames[source]}
325
- </Link>
326
- </li>
327
- ))}
328
- </ul>
329
- </div>
330
- </PageSection>
337
+ <StickyTabs sourceKeys={sourceKeys} tabNames={tabNames} activeSource={activeSource} path={path} />
331
338
  )}
332
339
  <PageSection id="main-content" isFilled className="pf-m-light-100">
333
340
  {isSinglePage && <MDXChildTemplate {...sources[0]} id={id} />}
package/versions.json CHANGED
@@ -1,9 +1,36 @@
1
1
  {
2
2
  "Releases": [
3
+ {
4
+ "name": "6.6.0-prerelease.9",
5
+ "date": "2026-06-26",
6
+ "latest": true,
7
+ "versions": {
8
+ "@patternfly/chatbot": "6.7.0-prerelease.4",
9
+ "@patternfly/patternfly": "6.6.0-prerelease.16",
10
+ "@patternfly/quickstarts": "6.6.0-prerelease.1",
11
+ "@patternfly/react-catalog-view-extension": "6.4.0",
12
+ "@patternfly/react-charts": "8.6.0-prerelease.4",
13
+ "@patternfly/react-code-editor": "6.6.0-prerelease.10",
14
+ "@patternfly/react-component-groups": "6.5.0",
15
+ "@patternfly/react-console": "6.2.0",
16
+ "@patternfly/react-core": "6.6.0-prerelease.9",
17
+ "@patternfly/react-data-view": "6.5.0",
18
+ "@patternfly/react-drag-drop": "6.6.0-prerelease.9",
19
+ "@patternfly/react-icons": "6.6.0-prerelease.4",
20
+ "@patternfly/react-log-viewer": "6.4.0",
21
+ "@patternfly/react-styles": "6.6.0-prerelease.4",
22
+ "@patternfly/react-table": "6.6.0-prerelease.9",
23
+ "@patternfly/react-templates": "6.6.0-prerelease.9",
24
+ "@patternfly/react-tokens": "6.6.0-prerelease.4",
25
+ "@patternfly/react-topology": "6.6.0-prerelease.1",
26
+ "@patternfly/react-user-feedback": "6.4.0-prerelease.2",
27
+ "@patternfly/react-virtualized-extension": "6.2.0"
28
+ }
29
+ },
3
30
  {
4
31
  "name": "6.6.0-prerelease.7",
5
32
  "date": "2026-06-24",
6
- "latest": true,
33
+ "hidden": true,
7
34
  "versions": {
8
35
  "@patternfly/chatbot": "6.7.0-prerelease.3",
9
36
  "@patternfly/patternfly": "6.6.0-prerelease.14",