@patternfly/documentation-framework 6.0.0-alpha.123 → 6.0.0-alpha.125
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 +19 -0
- package/layouts/sideNavLayout/sideNavLayout.js +29 -76
- package/package.json +3 -3
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.0.0-alpha.125 (2024-10-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# 6.0.0-alpha.124 (2024-10-28)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **site:** update version switcher for v5 ([#4312](https://github.com/patternfly/patternfly-org/issues/4312)) ([84b72dd](https://github.com/patternfly/patternfly-org/commit/84b72dde9debe46b56973e2bdfcbba02afa13de7))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# 6.0.0-alpha.123 (2024-10-25)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @patternfly/documentation-framework
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
DropdownGroup,
|
|
10
10
|
DropdownList,
|
|
11
11
|
Divider,
|
|
12
|
-
Icon,
|
|
13
12
|
Masthead,
|
|
14
13
|
MastheadToggle,
|
|
15
14
|
MastheadMain,
|
|
@@ -26,7 +25,7 @@ import {
|
|
|
26
25
|
SearchInput,
|
|
27
26
|
ToggleGroup,
|
|
28
27
|
ToggleGroupItem,
|
|
29
|
-
MastheadLogo
|
|
28
|
+
MastheadLogo
|
|
30
29
|
} from '@patternfly/react-core';
|
|
31
30
|
import BarsIcon from '@patternfly/react-icons/dist/esm/icons/bars-icon';
|
|
32
31
|
import GithubIcon from '@patternfly/react-icons/dist/esm/icons/github-icon';
|
|
@@ -48,40 +47,32 @@ const HeaderTools = ({
|
|
|
48
47
|
isRTL,
|
|
49
48
|
setIsRTL,
|
|
50
49
|
isDarkTheme,
|
|
51
|
-
setIsDarkTheme
|
|
50
|
+
setIsDarkTheme
|
|
52
51
|
}) => {
|
|
53
52
|
const latestVersion = versions.Releases.find((version) => version.latest);
|
|
54
|
-
const previousReleases = Object.values(versions.Releases).filter(
|
|
55
|
-
(version) => !version.hidden && !version.latest
|
|
56
|
-
);
|
|
53
|
+
const previousReleases = Object.values(versions.Releases).filter((version) => !version.hidden && !version.latest);
|
|
57
54
|
const hasSearch = algolia;
|
|
58
55
|
const [isDropdownOpen, setDropdownOpen] = useState(false);
|
|
59
56
|
const [searchValue, setSearchValue] = React.useState('');
|
|
60
57
|
const [isSearchExpanded, setIsSearchExpanded] = React.useState(false);
|
|
61
58
|
|
|
62
59
|
const getDropdownItem = (version, isLatest = false) => (
|
|
63
|
-
<DropdownItem
|
|
64
|
-
|
|
65
|
-
key={version.name}
|
|
66
|
-
to={isLatest ? '/' : `/${version.name}`}
|
|
67
|
-
>
|
|
68
|
-
{`Current ${version.name}`}
|
|
60
|
+
<DropdownItem itemId={version.name} key={version.name} to={isLatest ? '/' : `/${version.name}`}>
|
|
61
|
+
{`Release ${version.name}`}
|
|
69
62
|
</DropdownItem>
|
|
70
63
|
);
|
|
71
64
|
|
|
72
65
|
const onChange = (_evt, value) => {
|
|
73
|
-
|
|
66
|
+
setSearchValue(value);
|
|
74
67
|
};
|
|
75
68
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
69
|
+
const onToggleExpand = (_evt, isSearchExpanded) => {
|
|
70
|
+
setIsSearchExpanded(!isSearchExpanded);
|
|
71
|
+
};
|
|
79
72
|
|
|
80
73
|
const toggleDarkTheme = (_evt, selected) => {
|
|
81
74
|
const darkThemeToggleClicked = !selected === isDarkTheme;
|
|
82
|
-
document
|
|
83
|
-
.querySelector('html')
|
|
84
|
-
.classList.toggle('pf-v6-theme-dark', darkThemeToggleClicked);
|
|
75
|
+
document.querySelector('html').classList.toggle('pf-v6-theme-dark', darkThemeToggleClicked);
|
|
85
76
|
setIsDarkTheme(darkThemeToggleClicked);
|
|
86
77
|
};
|
|
87
78
|
|
|
@@ -90,7 +81,7 @@ const HeaderTools = ({
|
|
|
90
81
|
if (hasSearch && isSearchExpanded) {
|
|
91
82
|
attachDocSearch(algolia, '.ws-global-search .pf-v6-c-text-input-group__text-input', 1000);
|
|
92
83
|
}
|
|
93
|
-
|
|
84
|
+
}, [isSearchExpanded]);
|
|
94
85
|
|
|
95
86
|
return (
|
|
96
87
|
<Toolbar isFullHeight>
|
|
@@ -137,7 +128,11 @@ const HeaderTools = ({
|
|
|
137
128
|
value={searchValue}
|
|
138
129
|
onChange={onChange}
|
|
139
130
|
onClear={(_evt) => onChange(_evt, '')}
|
|
140
|
-
expandableInput={{
|
|
131
|
+
expandableInput={{
|
|
132
|
+
isExpanded: isSearchExpanded,
|
|
133
|
+
onToggleExpand,
|
|
134
|
+
toggleAriaLabel: 'Expandable search input toggle'
|
|
135
|
+
}}
|
|
141
136
|
/>
|
|
142
137
|
</ToolbarItem>
|
|
143
138
|
)}
|
|
@@ -164,55 +159,29 @@ const HeaderTools = ({
|
|
|
164
159
|
onClick={() => setDropdownOpen(!isDropdownOpen)}
|
|
165
160
|
isExpanded={isDropdownOpen}
|
|
166
161
|
>
|
|
167
|
-
|
|
162
|
+
Release 6.0.0
|
|
168
163
|
</MenuToggle>
|
|
169
164
|
)}
|
|
165
|
+
popperProps={{ position: 'right' }}
|
|
170
166
|
>
|
|
171
167
|
<DropdownGroup key="Latest" label="Latest">
|
|
172
|
-
<DropdownList>
|
|
173
|
-
{getDropdownItem(latestVersion, true)}
|
|
174
|
-
</DropdownList>
|
|
168
|
+
<DropdownList>{getDropdownItem(latestVersion, true)}</DropdownList>
|
|
175
169
|
</DropdownGroup>
|
|
176
170
|
{previousReleases.length > 0 && (
|
|
177
|
-
<DropdownGroup
|
|
178
|
-
key="Previous releases"
|
|
179
|
-
label="Previous releases"
|
|
180
|
-
>
|
|
171
|
+
<DropdownGroup key="Previous releases" label="Previous releases">
|
|
181
172
|
<DropdownList>
|
|
182
|
-
{previousReleases
|
|
183
|
-
.slice(0, 3)
|
|
184
|
-
.map((version) => getDropdownItem(version))}
|
|
173
|
+
{previousReleases.slice(0, 3).map((version) => getDropdownItem(version))}
|
|
185
174
|
</DropdownList>
|
|
186
175
|
</DropdownGroup>
|
|
187
176
|
)}
|
|
188
177
|
<Divider key="divider1" />
|
|
189
|
-
<DropdownGroup
|
|
190
|
-
key="Alpha preview version"
|
|
191
|
-
label="Alpha preview version"
|
|
192
|
-
>
|
|
193
|
-
<DropdownList>
|
|
194
|
-
<DropdownItem
|
|
195
|
-
key="PatternFly 6"
|
|
196
|
-
className="ws-patternfly-versions"
|
|
197
|
-
isExternalLink
|
|
198
|
-
to="https://staging.patternfly.org/"
|
|
199
|
-
itemId="patternfly-6"
|
|
200
|
-
>
|
|
201
|
-
PatternFly 6
|
|
202
|
-
</DropdownItem>
|
|
203
|
-
</DropdownList>
|
|
204
|
-
</DropdownGroup>
|
|
205
|
-
<Divider key="divider2" />
|
|
206
|
-
<DropdownGroup
|
|
207
|
-
key="Previous versions"
|
|
208
|
-
label="Previous versions"
|
|
209
|
-
>
|
|
178
|
+
<DropdownGroup key="Previous versions" label="Previous versions">
|
|
210
179
|
<DropdownList>
|
|
211
180
|
<DropdownItem
|
|
212
181
|
key="PatternFly 5"
|
|
213
182
|
className="ws-patternfly-versions"
|
|
214
183
|
isExternalLink
|
|
215
|
-
to="https://
|
|
184
|
+
to="https://v5-archive.patternfly.org/"
|
|
216
185
|
itemId="patternfly-5"
|
|
217
186
|
>
|
|
218
187
|
PatternFly 5
|
|
@@ -253,21 +222,17 @@ export function attachDocSearch(algolia, inputSelector, timeout) {
|
|
|
253
222
|
inputSelector,
|
|
254
223
|
autocompleteOptions: {
|
|
255
224
|
hint: false,
|
|
256
|
-
appendTo: `.ws-global-search .pf-v6-c-text-input-group
|
|
225
|
+
appendTo: `.ws-global-search .pf-v6-c-text-input-group`
|
|
257
226
|
},
|
|
258
227
|
debug: process.env.NODE_ENV !== 'production',
|
|
259
|
-
...algolia
|
|
228
|
+
...algolia
|
|
260
229
|
});
|
|
261
230
|
} else {
|
|
262
231
|
setTimeout(() => attachDocSearch(algolia, inputSelector, timeout), timeout);
|
|
263
232
|
}
|
|
264
233
|
}
|
|
265
234
|
|
|
266
|
-
export const SideNavLayout = ({
|
|
267
|
-
children,
|
|
268
|
-
groupedRoutes,
|
|
269
|
-
navOpen: navOpenProp,
|
|
270
|
-
}) => {
|
|
235
|
+
export const SideNavLayout = ({ children, groupedRoutes, navOpen: navOpenProp }) => {
|
|
271
236
|
const algolia = process.env.algolia;
|
|
272
237
|
const hasGdprBanner = process.env.hasGdprBanner;
|
|
273
238
|
const hasVersionSwitcher = process.env.hasVersionSwitcher;
|
|
@@ -319,19 +284,9 @@ export const SideNavLayout = ({
|
|
|
319
284
|
<svg height="40px" viewBox="0 0 679 158">
|
|
320
285
|
<title>PF-HorizontalLogo-Color</title>
|
|
321
286
|
<defs>
|
|
322
|
-
<linearGradient
|
|
323
|
-
x1="68%"
|
|
324
|
-
y1="2.25860997e-13%"
|
|
325
|
-
x2="32%"
|
|
326
|
-
y2="100%"
|
|
327
|
-
id="linearGradient-website-masthead"
|
|
328
|
-
>
|
|
287
|
+
<linearGradient x1="68%" y1="2.25860997e-13%" x2="32%" y2="100%" id="linearGradient-website-masthead">
|
|
329
288
|
<stop stopColor="#2B9AF3" offset="0%"></stop>
|
|
330
|
-
<stop
|
|
331
|
-
stopColor="#73BCF7"
|
|
332
|
-
stopOpacity="0.502212631"
|
|
333
|
-
offset="100%"
|
|
334
|
-
></stop>
|
|
289
|
+
<stop stopColor="#73BCF7" stopOpacity="0.502212631" offset="100%"></stop>
|
|
335
290
|
</linearGradient>
|
|
336
291
|
</defs>
|
|
337
292
|
<g stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
|
|
@@ -400,9 +355,7 @@ export const SideNavLayout = ({
|
|
|
400
355
|
mainComponent="div"
|
|
401
356
|
masthead={masthead}
|
|
402
357
|
sidebar={SideBar}
|
|
403
|
-
skipToContent={
|
|
404
|
-
<SkipToContent href="#ws-page-main">Skip to content</SkipToContent>
|
|
405
|
-
}
|
|
358
|
+
skipToContent={<SkipToContent href="#ws-page-main">Skip to content</SkipToContent>}
|
|
406
359
|
isManagedSidebar
|
|
407
360
|
defaultManagedSidebarIsOpen={navOpenProp}
|
|
408
361
|
>
|
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.0.0-alpha.
|
|
4
|
+
"version": "6.0.0-alpha.125",
|
|
5
5
|
"author": "Red Hat",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"private": false,
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@babel/preset-env": "^7.24.3",
|
|
14
14
|
"@babel/preset-react": "^7.24.1",
|
|
15
15
|
"@mdx-js/util": "1.6.16",
|
|
16
|
-
"@patternfly/ast-helpers": "^1.4.0-alpha.
|
|
16
|
+
"@patternfly/ast-helpers": "^1.4.0-alpha.114",
|
|
17
17
|
"@reach/router": "npm:@gatsbyjs/reach-router@1.3.9",
|
|
18
18
|
"autoprefixer": "9.8.6",
|
|
19
19
|
"babel-loader": "^9.1.3",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"react": "^17.0.0 || ^18.0.0",
|
|
81
81
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "f62db02abf36afafabdd5b1a6eb96e6d8f7c0558"
|
|
84
84
|
}
|