@patternfly/documentation-framework 2.0.0-alpha.8 → 5.0.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.
Files changed (71) hide show
  1. package/CHANGELOG.md +617 -0
  2. package/README.md +1 -1
  3. package/app.js +20 -14
  4. package/assets/Favicon-Light-16x16.png +0 -0
  5. package/assets/Favicon-Light-32x32.png +0 -0
  6. package/assets/Favicon-Light-48x48.png +0 -0
  7. package/assets/Favicon-Light.png +0 -0
  8. package/assets/android-chrome-36x36.png +0 -0
  9. package/assets/android-chrome-48x48.png +0 -0
  10. package/assets/android-chrome-96x96.png +0 -0
  11. package/components/autoLinkHeader/autoLinkHeader.css +2 -2
  12. package/components/autoLinkHeader/autoLinkHeader.js +18 -13
  13. package/components/cssVariables/cssSearch.js +3 -4
  14. package/components/cssVariables/cssVariables.css +4 -4
  15. package/components/cssVariables/cssVariables.js +83 -84
  16. package/components/example/example.css +29 -29
  17. package/components/example/example.js +34 -6
  18. package/components/footer/footer.css +16 -16
  19. package/components/footer/footer.js +16 -16
  20. package/components/functionsTable/functionsTable.js +57 -0
  21. package/components/gdprBanner/gdprBanner.css +2 -2
  22. package/components/gdprBanner/gdprBanner.js +3 -3
  23. package/components/inlineAlert/inlineAlert.js +1 -1
  24. package/components/link/link.js +1 -2
  25. package/components/propsTable/propsTable.js +85 -79
  26. package/components/sectionGallery/TextSummary.js +31 -0
  27. package/components/sectionGallery/sectionDataListLayout.js +51 -0
  28. package/components/sectionGallery/sectionGallery.css +53 -0
  29. package/components/sectionGallery/sectionGallery.js +76 -0
  30. package/components/sectionGallery/sectionGalleryLayout.js +41 -0
  31. package/components/sectionGallery/sectionGalleryToolbar.js +38 -0
  32. package/components/sectionGallery/sectionGalleryWrapper.js +110 -0
  33. package/components/sideNav/sideNav.css +12 -12
  34. package/components/sideNav/sideNav.js +44 -16
  35. package/components/tableOfContents/tableOfContents.css +17 -17
  36. package/helpers/codesandbox.js +3 -5
  37. package/helpers/getTitle.js +2 -2
  38. package/layouts/sideNavLayout/sideNavLayout.css +7 -11
  39. package/layouts/sideNavLayout/sideNavLayout.js +59 -45
  40. package/package.json +28 -29
  41. package/pages/404/404.css +2 -2
  42. package/pages/404/index.js +1 -1
  43. package/pages/global-css-variables.md +16 -16
  44. package/routes.js +20 -10
  45. package/scripts/cli/build.js +0 -1
  46. package/scripts/cli/cli.js +2 -1
  47. package/scripts/cli/generate.js +2 -2
  48. package/scripts/cli/start.js +6 -8
  49. package/scripts/md/parseMD.js +46 -11
  50. package/scripts/md/styled-tags.js +8 -4
  51. package/scripts/tsDocgen.js +119 -91
  52. package/scripts/typeDocGen.js +209 -0
  53. package/scripts/webpack/getHtmlWebpackPlugins.js +1 -2
  54. package/scripts/webpack/prerender.js +1 -2
  55. package/scripts/webpack/webpack.base.config.js +35 -35
  56. package/scripts/webpack/webpack.client.config.js +11 -8
  57. package/scripts/webpack/webpack.server.config.js +8 -5
  58. package/scripts/writeScreenshots.js +3 -3
  59. package/templates/html.ejs +6 -8
  60. package/templates/mdx.css +156 -161
  61. package/templates/mdx.js +122 -51
  62. package/templates/patternfly-docs/content/extensions/extension/design-guidelines/design-guidelines.md +2 -0
  63. package/templates/patternfly-docs/content/extensions/extension/examples/basic.md +2 -0
  64. package/templates/sitemap.ejs +1 -1
  65. package/versions.json +32 -13
  66. package/assets/favicon-16x16.png +0 -0
  67. package/assets/favicon-32x32.png +0 -0
  68. package/assets/favicon-48x48.png +0 -0
  69. package/assets/favicon.ico +0 -0
  70. package/components/topNav/topNav.css +0 -30
  71. package/pages/red-hat-font.md +0 -40
package/CHANGELOG.md CHANGED
@@ -3,6 +3,623 @@
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
+ ## 5.0.1 (2023-06-23)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * turn dry run off ([#3627](https://github.com/patternfly/patternfly-org/issues/3627)) ([f0a2d51](https://github.com/patternfly/patternfly-org/commit/f0a2d510b75b69b18cdbbd7ceb663241ef30093f))
12
+
13
+
14
+
15
+
16
+
17
+ # 2.0.0-alpha.74 (2023-06-23)
18
+
19
+ **Note:** Version bump only for package @patternfly/documentation-framework
20
+
21
+
22
+
23
+
24
+
25
+ # 2.0.0-alpha.73 (2023-06-23)
26
+
27
+ **Note:** Version bump only for package @patternfly/documentation-framework
28
+
29
+
30
+
31
+
32
+
33
+ # 2.0.0-alpha.72 (2023-06-22)
34
+
35
+
36
+ ### Bug Fixes
37
+
38
+ * **deps:** update docs-framework to the latest prereleases ([#3615](https://github.com/patternfly/patternfly-org/issues/3615)) ([54091c3](https://github.com/patternfly/patternfly-org/commit/54091c358f01f65269f314c2717ad58767aa669a))
39
+
40
+
41
+
42
+
43
+
44
+ # 2.0.0-alpha.71 (2023-06-22)
45
+
46
+ **Note:** Version bump only for package @patternfly/documentation-framework
47
+
48
+
49
+
50
+
51
+
52
+ # 2.0.0-alpha.70 (2023-06-22)
53
+
54
+ **Note:** Version bump only for package @patternfly/documentation-framework
55
+
56
+
57
+
58
+
59
+
60
+ # 2.0.0-alpha.69 (2023-06-22)
61
+
62
+
63
+ ### Bug Fixes
64
+
65
+ * **docs:** fixed broken css vars header link ([#3617](https://github.com/patternfly/patternfly-org/issues/3617)) ([ad2b012](https://github.com/patternfly/patternfly-org/commit/ad2b01252d68cf8c4e53fac283b142b13994b222))
66
+
67
+
68
+
69
+
70
+
71
+ # 2.0.0-alpha.68 (2023-06-21)
72
+
73
+ **Note:** Version bump only for package @patternfly/documentation-framework
74
+
75
+
76
+
77
+
78
+
79
+ # 2.0.0-alpha.67 (2023-06-21)
80
+
81
+ **Note:** Version bump only for package @patternfly/documentation-framework
82
+
83
+
84
+
85
+
86
+
87
+ # 2.0.0-alpha.66 (2023-06-16)
88
+
89
+ **Note:** Version bump only for package @patternfly/documentation-framework
90
+
91
+
92
+
93
+
94
+
95
+ # 2.0.0-alpha.65 (2023-06-15)
96
+
97
+ **Note:** Version bump only for package @patternfly/documentation-framework
98
+
99
+
100
+
101
+
102
+
103
+ # 2.0.0-alpha.64 (2023-06-15)
104
+
105
+
106
+ ### Bug Fixes
107
+
108
+ * **Sidenav:** updated PageContext props ([#3593](https://github.com/patternfly/patternfly-org/issues/3593)) ([1cc24ea](https://github.com/patternfly/patternfly-org/commit/1cc24ea1ef88c42a6b62a4a6b2421d157bc298d8))
109
+
110
+
111
+
112
+
113
+
114
+ # 2.0.0-alpha.63 (2023-06-14)
115
+
116
+ **Note:** Version bump only for package @patternfly/documentation-framework
117
+
118
+
119
+
120
+
121
+
122
+ # 2.0.0-alpha.62 (2023-06-14)
123
+
124
+ **Note:** Version bump only for package @patternfly/documentation-framework
125
+
126
+
127
+
128
+
129
+
130
+ # 2.0.0-alpha.61 (2023-06-14)
131
+
132
+ **Note:** Version bump only for package @patternfly/documentation-framework
133
+
134
+
135
+
136
+
137
+
138
+ # 2.0.0-alpha.60 (2023-06-13)
139
+
140
+
141
+ ### Bug Fixes
142
+
143
+ * **docs:** fixed gallery styles affecting width, font vars ([#3596](https://github.com/patternfly/patternfly-org/issues/3596)) ([04f1b54](https://github.com/patternfly/patternfly-org/commit/04f1b54f947e1afca88926d8f371d3bf37a70e25))
144
+
145
+
146
+
147
+
148
+
149
+ # 2.0.0-alpha.59 (2023-06-13)
150
+
151
+ **Note:** Version bump only for package @patternfly/documentation-framework
152
+
153
+
154
+
155
+
156
+
157
+ # 2.0.0-alpha.58 (2023-06-13)
158
+
159
+ **Note:** Version bump only for package @patternfly/documentation-framework
160
+
161
+
162
+
163
+
164
+
165
+ # 2.0.0-alpha.57 (2023-06-12)
166
+
167
+ **Note:** Version bump only for package @patternfly/documentation-framework
168
+
169
+
170
+
171
+
172
+
173
+ # 2.0.0-alpha.56 (2023-06-12)
174
+
175
+
176
+ ### Features
177
+
178
+ * turn on dark switcher, remove extra css ([#3519](https://github.com/patternfly/patternfly-org/issues/3519)) ([0059891](https://github.com/patternfly/patternfly-org/commit/005989134d6a962189690a49faccb8dfc6e3de77))
179
+
180
+
181
+
182
+
183
+
184
+ # 2.0.0-alpha.55 (2023-06-12)
185
+
186
+
187
+ ### Bug Fixes
188
+
189
+ * **whitespace:** whitespace change to push out new release ([84d1bb3](https://github.com/patternfly/patternfly-org/commit/84d1bb3ccc79a9ef2c4cf5fb93b19fbb719b6078))
190
+
191
+
192
+
193
+
194
+
195
+ # 2.0.0-alpha.54 (2023-06-09)
196
+
197
+ **Note:** Version bump only for package @patternfly/documentation-framework
198
+
199
+
200
+
201
+
202
+
203
+ # 2.0.0-alpha.53 (2023-06-09)
204
+
205
+ **Note:** Version bump only for package @patternfly/documentation-framework
206
+
207
+
208
+
209
+
210
+
211
+ # 2.0.0-alpha.52 (2023-06-07)
212
+
213
+ **Note:** Version bump only for package @patternfly/documentation-framework
214
+
215
+
216
+
217
+
218
+
219
+ # 2.0.0-alpha.51 (2023-06-06)
220
+
221
+ **Note:** Version bump only for package @patternfly/documentation-framework
222
+
223
+
224
+
225
+
226
+
227
+ # 2.0.0-alpha.50 (2023-06-01)
228
+
229
+
230
+ ### Bug Fixes
231
+
232
+ * **labels:** Update label logic to include html components ([#3567](https://github.com/patternfly/patternfly-org/issues/3567)) ([32bdc0f](https://github.com/patternfly/patternfly-org/commit/32bdc0fe2120e2c86f39c1e5da94e3f2d11d9705))
233
+
234
+
235
+
236
+
237
+
238
+ # 2.0.0-alpha.49 (2023-06-01)
239
+
240
+ **Note:** Version bump only for package @patternfly/documentation-framework
241
+
242
+
243
+
244
+
245
+
246
+ # 2.0.0-alpha.48 (2023-05-31)
247
+
248
+ **Note:** Version bump only for package @patternfly/documentation-framework
249
+
250
+
251
+
252
+
253
+
254
+ # 2.0.0-alpha.47 (2023-05-31)
255
+
256
+
257
+ ### Bug Fixes
258
+
259
+ * **CSSVariables:** check for values before looping over them ([f2d167f](https://github.com/patternfly/patternfly-org/commit/f2d167f57c0cd38b289ade62d98022d7902de38f))
260
+
261
+
262
+
263
+
264
+
265
+ # 2.0.0-alpha.46 (2023-05-31)
266
+
267
+
268
+ ### Bug Fixes
269
+
270
+ * **CSSVariables:** resolve a11y issues in tables ([41a7837](https://github.com/patternfly/patternfly-org/commit/41a78379de36c08d7b36fe48a9ff40a4140cdc63))
271
+
272
+
273
+
274
+
275
+
276
+ # 2.0.0-alpha.45 (2023-05-25)
277
+
278
+ **Note:** Version bump only for package @patternfly/documentation-framework
279
+
280
+
281
+
282
+
283
+
284
+ # 2.0.0-alpha.44 (2023-05-25)
285
+
286
+ **Note:** Version bump only for package @patternfly/documentation-framework
287
+
288
+
289
+
290
+
291
+
292
+ # 2.0.0-alpha.43 (2023-05-25)
293
+
294
+
295
+ ### Features
296
+
297
+ * **labels:** add deprecated/demo/beta labels to headers + nav items ([#3547](https://github.com/patternfly/patternfly-org/issues/3547)) ([010a0e0](https://github.com/patternfly/patternfly-org/commit/010a0e05baea661964660d2a733569a34abbf243))
298
+
299
+
300
+
301
+
302
+
303
+ # 2.0.0-alpha.42 (2023-05-18)
304
+
305
+ **Note:** Version bump only for package @patternfly/documentation-framework
306
+
307
+
308
+
309
+
310
+
311
+ # 2.0.0-alpha.41 (2023-05-15)
312
+
313
+
314
+ ### Bug Fixes
315
+
316
+ * broken link in search-input summary ([7cbf968](https://github.com/patternfly/patternfly-org/commit/7cbf968c1b00aef2257ef8b7434c7ff8b9a4255a))
317
+
318
+
319
+
320
+
321
+
322
+ # 2.0.0-alpha.40 (2023-05-15)
323
+
324
+
325
+ ### Bug Fixes
326
+
327
+ * **docs:** use correct theme class on full page dark theme switcher ([#3532](https://github.com/patternfly/patternfly-org/issues/3532)) ([0008236](https://github.com/patternfly/patternfly-org/commit/0008236da2b105fd1789db2263323c59780b5194))
328
+
329
+
330
+
331
+
332
+
333
+ # 2.0.0-alpha.39 (2023-05-11)
334
+
335
+ **Note:** Version bump only for package @patternfly/documentation-framework
336
+
337
+
338
+
339
+
340
+
341
+ # 2.0.0-alpha.38 (2023-05-11)
342
+
343
+ **Note:** Version bump only for package @patternfly/documentation-framework
344
+
345
+
346
+
347
+
348
+
349
+ # 2.0.0-alpha.37 (2023-05-10)
350
+
351
+ **Note:** Version bump only for package @patternfly/documentation-framework
352
+
353
+
354
+
355
+
356
+
357
+ # 2.0.0-alpha.36 (2023-05-10)
358
+
359
+ **Note:** Version bump only for package @patternfly/documentation-framework
360
+
361
+
362
+
363
+
364
+
365
+ # 2.0.0-alpha.35 (2023-05-09)
366
+
367
+
368
+ ### Bug Fixes
369
+
370
+ * **org:** Fix up org css issues after doc framework update ([#3518](https://github.com/patternfly/patternfly-org/issues/3518)) ([a6f20c5](https://github.com/patternfly/patternfly-org/commit/a6f20c569a8ba8df2da23722c48f73f750e229e3))
371
+
372
+
373
+
374
+
375
+
376
+ # 2.0.0-alpha.34 (2023-05-05)
377
+
378
+
379
+ ### Features
380
+
381
+ * **docs:** Update docs framework with latest react code ([#3517](https://github.com/patternfly/patternfly-org/issues/3517)) ([2df0147](https://github.com/patternfly/patternfly-org/commit/2df014737dbbe35033d0b28ee71b40d5fbe22ed2))
382
+
383
+
384
+
385
+
386
+
387
+ # 2.0.0-alpha.33 (2023-05-04)
388
+
389
+
390
+ ### Bug Fixes
391
+
392
+ * **css:** update css selectors for v5 versioning ([#3516](https://github.com/patternfly/patternfly-org/issues/3516)) ([f681945](https://github.com/patternfly/patternfly-org/commit/f681945e2de1200fbb7d2d6ab8262091b1e72a8e))
393
+
394
+
395
+
396
+
397
+
398
+ # 2.0.0-alpha.32 (2023-05-02)
399
+
400
+ **Note:** Version bump only for package @patternfly/documentation-framework
401
+
402
+
403
+
404
+
405
+
406
+ # 2.0.0-alpha.31 (2023-05-01)
407
+
408
+
409
+ ### Bug Fixes
410
+
411
+ * update Text component summary to fix build ([64b3590](https://github.com/patternfly/patternfly-org/commit/64b359029fa14be143ddec212fdf89a3033145d5))
412
+
413
+
414
+
415
+
416
+
417
+ # 2.0.0-alpha.30 (2023-04-27)
418
+
419
+
420
+ ### Bug Fixes
421
+
422
+ * white space change to test CI ([e9e7ed3](https://github.com/patternfly/patternfly-org/commit/e9e7ed3cf6007fcf022dd7693bfed12bdf9d7e9a))
423
+
424
+
425
+
426
+
427
+
428
+ # 2.0.0-alpha.29 (2023-04-26)
429
+
430
+
431
+ ### Bug Fixes
432
+
433
+ * sidebar open by default ([#3506](https://github.com/patternfly/patternfly-org/issues/3506)) ([fb5f086](https://github.com/patternfly/patternfly-org/commit/fb5f08611d3edde80a559635b39dab7138f06d1d))
434
+
435
+
436
+
437
+
438
+
439
+ # 2.0.0-alpha.28 (2023-04-26)
440
+
441
+ **Note:** Version bump only for package @patternfly/documentation-framework
442
+
443
+
444
+
445
+
446
+
447
+ # 2.0.0-alpha.27 (2023-04-25)
448
+
449
+
450
+ ### Bug Fixes
451
+
452
+ * **docs:** Update static dir and fix null loading ([#3505](https://github.com/patternfly/patternfly-org/issues/3505)) ([e65a1b2](https://github.com/patternfly/patternfly-org/commit/e65a1b21ae7671322adcbcef1ada69436fd07802))
453
+
454
+
455
+
456
+
457
+
458
+ # 2.0.0-alpha.26 (2023-04-21)
459
+
460
+ **Note:** Version bump only for package @patternfly/documentation-framework
461
+
462
+
463
+
464
+
465
+
466
+ # 2.0.0-alpha.25 (2023-04-19)
467
+
468
+ **Note:** Version bump only for package @patternfly/documentation-framework
469
+
470
+
471
+
472
+
473
+
474
+ # 2.0.0-alpha.24 (2023-04-17)
475
+
476
+ **Note:** Version bump only for package @patternfly/documentation-framework
477
+
478
+
479
+
480
+
481
+
482
+ # 2.0.0-alpha.23 (2023-04-17)
483
+
484
+
485
+ ### Features
486
+
487
+ * **docs-framework:** add support for exposing function documentation ([#3485](https://github.com/patternfly/patternfly-org/issues/3485)) ([2f19ded](https://github.com/patternfly/patternfly-org/commit/2f19deda84c75042df1870c0950bb173eb2c3d84))
488
+
489
+
490
+
491
+
492
+
493
+ # 2.0.0-alpha.22 (2023-04-17)
494
+
495
+ **Note:** Version bump only for package @patternfly/documentation-framework
496
+
497
+
498
+
499
+
500
+
501
+ # 2.0.0-alpha.21 (2023-04-15)
502
+
503
+
504
+ ### Bug Fixes
505
+
506
+ * clean up references to katacoda ([#3491](https://github.com/patternfly/patternfly-org/issues/3491)) ([5de986b](https://github.com/patternfly/patternfly-org/commit/5de986b917ee7edf9c476bb2df2f2ee4d454a7e1))
507
+
508
+
509
+
510
+
511
+
512
+ # 2.0.0-alpha.20 (2023-04-14)
513
+
514
+ **Note:** Version bump only for package @patternfly/documentation-framework
515
+
516
+
517
+
518
+
519
+
520
+ # 2.0.0-alpha.19 (2023-04-12)
521
+
522
+ **Note:** Version bump only for package @patternfly/documentation-framework
523
+
524
+
525
+
526
+
527
+
528
+ # 2.0.0-alpha.18 (2023-04-11)
529
+
530
+
531
+ ### Bug Fixes
532
+
533
+ * **cssVariables:** Update expandId ([b9b0a6e](https://github.com/patternfly/patternfly-org/commit/b9b0a6edcc103c442f24caae086b68558415be57))
534
+
535
+
536
+
537
+
538
+
539
+ # 2.0.0-alpha.17 (2023-04-11)
540
+
541
+
542
+ ### Bug Fixes
543
+
544
+ * **docs:** fixes display & search bugs on icons page ([#3483](https://github.com/patternfly/patternfly-org/issues/3483)) ([39b225c](https://github.com/patternfly/patternfly-org/commit/39b225cdcbdc4c01c5002750600708eab6427f60))
545
+
546
+
547
+
548
+
549
+
550
+ # 2.0.0-alpha.16 (2023-04-11)
551
+
552
+
553
+ ### Features
554
+
555
+ * **tables:** update tables, context selector ([#3474](https://github.com/patternfly/patternfly-org/issues/3474)) ([cd82c35](https://github.com/patternfly/patternfly-org/commit/cd82c356f568f3368bc22319d614fde8dd74fb38))
556
+
557
+
558
+
559
+
560
+
561
+ # 2.0.0-alpha.15 (2023-04-06)
562
+
563
+ **Note:** Version bump only for package @patternfly/documentation-framework
564
+
565
+
566
+
567
+
568
+
569
+ # 2.0.0-alpha.14 (2023-04-03)
570
+
571
+
572
+ ### Bug Fixes
573
+
574
+ * **Tables:** temporarily comment out tables so Table can be deprecated ([#3468](https://github.com/patternfly/patternfly-org/issues/3468)) ([f4aa5ed](https://github.com/patternfly/patternfly-org/commit/f4aa5ed791161851cdc92d02d0c752eef4028306))
575
+
576
+
577
+
578
+
579
+
580
+ # 2.0.0-alpha.13 (2023-03-31)
581
+
582
+ **Note:** Version bump only for package @patternfly/documentation-framework
583
+
584
+
585
+
586
+
587
+
588
+ # 2.0.0-alpha.12 (2023-03-30)
589
+
590
+ **Note:** Version bump only for package @patternfly/documentation-framework
591
+
592
+
593
+
594
+
595
+
596
+ # 2.0.0-alpha.11 (2023-03-29)
597
+
598
+ **Note:** Version bump only for package @patternfly/documentation-framework
599
+
600
+
601
+
602
+
603
+
604
+ # 2.0.0-alpha.10 (2023-03-15)
605
+
606
+ **Note:** Version bump only for package @patternfly/documentation-framework
607
+
608
+
609
+
610
+
611
+
612
+ # 2.0.0-alpha.9 (2023-03-09)
613
+
614
+
615
+ ### Bug Fixes
616
+
617
+ * **versions:** fix typo ([a9b8fe2](https://github.com/patternfly/patternfly-org/commit/a9b8fe296a9c28bdd9ada01a80b1653810802ddf))
618
+
619
+
620
+
621
+
622
+
6
623
  # 2.0.0-alpha.8 (2023-03-03)
7
624
 
8
625
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @patternfly/documentation-framework
2
2
 
3
- ## The PatternFly documentation framework lets you develop component examples in markdown format, so that they can be added to [patternfly.org](https://www.patternfly.org/v4/).
3
+ ## The PatternFly documentation framework lets you develop component examples in markdown format, so that they can be added to [patternfly.org](https://www.patternfly.org/).
4
4
 
5
5
  ## Install
6
6
 
package/app.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import ReactDOM from 'react-dom';
2
+ import { createRoot, hydrateRoot } from 'react-dom/client';
3
3
  import { Router, useLocation } from '@reach/router';
4
4
  import 'client-styles'; // Webpack replaces this import: patternfly-docs.css.js
5
5
  import { SideNavLayout } from '@patternfly/documentation-framework/layouts';
@@ -13,17 +13,23 @@ import './components/tableOfContents/tableOfContents.css';
13
13
  import './components/example/example.css';
14
14
  import './components/footer/footer.css';
15
15
  import './components/sideNav/sideNav.css';
16
- import './components/topNav/topNav.css';
17
16
  import './layouts/sideNavLayout/sideNavLayout.css';
18
17
 
19
- const AppRoute = ({ child, katacodaLayout, title, path }) => {
18
+ const AppRoute = ({ child, title, path }) => {
20
19
  const pathname = useLocation().pathname;
21
20
  if (typeof window !== 'undefined' && window.gtag) {
22
- gtag('config', 'UA-47523816-6', {
21
+ gtag('config', process.env.googleAnalyticsID, {
23
22
  'page_path': pathname,
24
23
  'page_title': (title || pathname)
25
24
  });
26
25
  }
26
+
27
+ // Redirect all v4 url paths to the archived v4 site
28
+ if(pathname.startsWith("/v4")){
29
+ window.location.href = `https://v4-archive.patternfly.org${pathname}`;
30
+ return;
31
+ }
32
+
27
33
  // Send 404 event if redirected to 404 page
28
34
  if (path === '/404' && pathname.split('/').pop() !== '404') {
29
35
  trackEvent('404_redirect', 'redirect', pathname);
@@ -31,26 +37,23 @@ const AppRoute = ({ child, katacodaLayout, title, path }) => {
31
37
  return (
32
38
  <React.Fragment>
33
39
  {child}
34
- {!katacodaLayout && process.env.hasFooter && <Footer />}
40
+ {process.env.hasFooter && <Footer />}
35
41
  </React.Fragment>
36
42
  );
37
43
  }
38
44
 
39
45
  const SideNavRouter = () => {
40
- const pathname = useLocation().pathname.replace(process.env.pathPrefix, '');
41
46
  const componentsData = process?.env?.componentsData;
42
- const navOpen = !routes[pathname] || !routes[pathname].katacodaLayout;
43
47
  return (
44
- <SideNavLayout groupedRoutes={groupedRoutes} navOpen={navOpen} >
48
+ <SideNavLayout groupedRoutes={groupedRoutes} navOpen={true} >
45
49
  <Router id="ws-page-content-router">
46
50
  {Object.entries(routes)
47
- .map(([path, { Component, title, sources, katacodaLayout, id }]) => Component
51
+ .map(([path, { Component, title, sources, id }]) => Component
48
52
  ? <AppRoute
49
53
  key={path}
50
54
  path={path}
51
55
  default={path === '/404'}
52
56
  child={<Component />}
53
- katacodaLayout={katacodaLayout}
54
57
  title={title}
55
58
  />
56
59
  : <AppRoute
@@ -65,7 +68,6 @@ const SideNavRouter = () => {
65
68
  componentsData={componentsData}
66
69
  />
67
70
  }
68
- katacodaLayout={katacodaLayout}
69
71
  title={title}
70
72
  />
71
73
  )
@@ -87,7 +89,7 @@ const FullscreenComponent = ({ Component, title }) => {
87
89
 
88
90
  // Export for SSR
89
91
  export const App = () => (
90
- <Router basepath={process.env.pathPrefix} id="ws-router">
92
+ <Router id="ws-router">
91
93
  <SideNavRouter path="/*" />
92
94
  {Object.entries(fullscreenRoutes)
93
95
  .map(([path, { title, Component }]) =>
@@ -107,8 +109,12 @@ const isPrerender = process.env.PRERENDER;
107
109
  // Don't use ReactDOM in SSR
108
110
  if (!isPrerender) {
109
111
  function render() {
110
- const renderFn = isProd ? ReactDOM.hydrate : ReactDOM.render;
111
- renderFn(<App />, document.getElementById('root'));
112
+ const container = document.getElementById('root');
113
+ if (isProd) {
114
+ hydrateRoot(container, <App />);
115
+ } else {
116
+ createRoot(container).render(<App />);
117
+ }
112
118
  }
113
119
  // On first load, await promise for the current page to avoid flashing a "Loading..." state
114
120
  const Component = getAsyncComponent(null);
Binary file