@patternfly/documentation-framework 6.20.0 → 6.21.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,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.21.1 (2025-09-03)
7
+
8
+ **Note:** Version bump only for package @patternfly/documentation-framework
9
+
10
+
11
+
12
+
13
+
14
+ # 6.21.0 (2025-09-02)
15
+
16
+
17
+ ### Features
18
+
19
+ * **Feedback:** Add a feedback button with qualtrics form ([#4755](https://github.com/patternfly/patternfly-org/issues/4755)) ([21a8823](https://github.com/patternfly/patternfly-org/commit/21a88238b7187e3c98fbb2f4d8c94483796dfcf0))
20
+
21
+
22
+
23
+
24
+
6
25
  # 6.20.0 (2025-08-28)
7
26
 
8
27
 
package/app.js CHANGED
@@ -11,6 +11,7 @@ import './components/cssVariables/cssVariables.css';
11
11
  import './components/tableOfContents/tableOfContents.css';
12
12
  import './components/example/example.css';
13
13
  import './components/footer/footer.css';
14
+ import './components/feedbackButton/feedbackButton.css';
14
15
  import './layouts/sideNavLayout/sideNavLayout.css';
15
16
 
16
17
  const AppRoute = ({ child, title, path }) => {
@@ -0,0 +1,48 @@
1
+ .ws-feedback-button-container {
2
+ position: fixed;
3
+ right: 0;
4
+ top: 50vh;
5
+ transform: translateY(-50%);
6
+ transform: rotate(-90deg);
7
+ z-index: 9999;
8
+ pointer-events: auto;
9
+ }
10
+
11
+ .ws-feedback-button {
12
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
13
+ }
14
+
15
+ /* Ensure the button is visible on all screen sizes */
16
+ @media (max-width: 768px) {
17
+ .ws-feedback-button-container {
18
+ right: -20px;
19
+ }
20
+ }
21
+
22
+ /* Ensure the button doesn't interfere with other elements */
23
+ .ws-feedback-button-container .pf-v6-c-button {
24
+ min-width: auto;
25
+ }
26
+
27
+ /* Make the feedback modal taller */
28
+ .ws-feedback-modal {
29
+ max-height: 90vh !important;
30
+ }
31
+
32
+ .ws-feedback-modal .pf-v6-c-modal-box {
33
+ max-height: 90vh !important;
34
+ height: 90vh !important;
35
+ }
36
+
37
+ .ws-feedback-modal .pf-v6-c-modal-box__body {
38
+ height: calc(90vh - 120px) !important;
39
+ overflow-y: auto;
40
+ }
41
+
42
+ /* Make the iframe fill the modal body */
43
+ .ws-feedback-iframe {
44
+ width: 100% !important;
45
+ height: 100% !important;
46
+ border: none;
47
+ display: block;
48
+ }
@@ -0,0 +1,44 @@
1
+ import React, { useState } from 'react';
2
+ import {
3
+ Button,
4
+ Modal,
5
+ ModalBody,
6
+ ModalHeader,
7
+ ModalFooter,
8
+ ModalVariant,
9
+ Label
10
+ } from '@patternfly/react-core';
11
+ import './feedbackButton.css';
12
+
13
+ export const FeedbackButton = () => {
14
+ const [isModalOpen, setIsModalOpen] = useState(false);
15
+
16
+ const handleModalToggle = () => {
17
+ setIsModalOpen(!isModalOpen);
18
+ };
19
+
20
+ return (
21
+ <>
22
+ <div className="ws-feedback-button-container">
23
+ <Button variant="primary" size="sm" className="ws-feedback-button" onClick={handleModalToggle}>Give feedback</Button>
24
+ </div>
25
+
26
+ <Modal
27
+ variant={ModalVariant.large}
28
+ isOpen={isModalOpen}
29
+ onClose={handleModalToggle}
30
+ aria-label="PatternFly feedback modal"
31
+ aria-describedby="feedback-modal-description"
32
+ className="ws-feedback-modal"
33
+ >
34
+ <ModalBody tabIndex="0" id="feedback-modal-description">
35
+ <iframe
36
+ src="https://www.feedback.redhat.com/jfe/form/SV_9MKBjq8H7muINMy"
37
+ title="Give PatternFly feedback"
38
+ className="ws-feedback-iframe"
39
+ ></iframe>
40
+ </ModalBody>
41
+ </Modal>
42
+ </>
43
+ );
44
+ };
@@ -10,4 +10,5 @@ export * from './topNav/topNav';
10
10
  export * from './link/link';
11
11
  export * from './tableOfContents/tableOfContents';
12
12
  export * from './inlineAlert/inlineAlert';
13
- export * from './themeSelector/themeSelector';
13
+ export * from './themeSelector/themeSelector';
14
+ export * from './feedbackButton/feedbackButton';
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.20.0",
4
+ "version": "6.21.1",
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.267",
15
+ "@patternfly/ast-helpers": "^1.4.0-alpha.269",
16
16
  "@reach/router": "npm:@gatsbyjs/reach-router@1.3.9",
17
17
  "autoprefixer": "10.4.19",
18
18
  "babel-loader": "^9.1.3",
@@ -87,5 +87,5 @@
87
87
  "braces": ">=3.0.3",
88
88
  "ssri": ">=8.0.1"
89
89
  },
90
- "gitHead": "1c8e427c1a63ea3973e2269a7c3f8df0a1696efb"
90
+ "gitHead": "cb6b669a2d71bb3bf26423404b20d585d70ed939"
91
91
  }
@@ -15,6 +15,7 @@ module.exports = (_env, argv) => {
15
15
  hasThemeSwitcher = false,
16
16
  hasHighContrastSwitcher = false,
17
17
  hasRTLSwitcher = false,
18
+ hasFeedbackButton = false,
18
19
  componentsData = {},
19
20
  sideNavItems = [],
20
21
  topNavItems = [],
@@ -145,6 +146,7 @@ module.exports = (_env, argv) => {
145
146
  'process.env.hasThemeSwitcher': JSON.stringify(hasThemeSwitcher),
146
147
  'process.env.hasHighContrastSwitcher': JSON.stringify(hasHighContrastSwitcher),
147
148
  'process.env.hasRTLSwitcher': JSON.stringify(hasRTLSwitcher),
149
+ 'process.env.hasFeedbackButton': JSON.stringify(hasFeedbackButton),
148
150
  'process.env.componentsData': JSON.stringify(componentsData),
149
151
  'process.env.sideNavItems': JSON.stringify(sideNavItems),
150
152
  'process.env.topNavItems': JSON.stringify(topNavItems),
package/templates/mdx.js CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  import { css } from '@patternfly/react-styles';
19
19
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon';
20
20
  import { Router, useLocation } from '@reach/router';
21
- import { CSSVariables, PropsTable, TableOfContents, Link, AutoLinkHeader, InlineAlert } from '../components';
21
+ import { CSSVariables, PropsTable, TableOfContents, Link, AutoLinkHeader, InlineAlert, FeedbackButton } from '../components';
22
22
  import { capitalize, getTitle, slugger, trackEvent } from '../helpers';
23
23
  import './mdx.css';
24
24
  import { convertToReactComponent } from '@patternfly/ast-helpers';
@@ -167,6 +167,7 @@ const MDXChildTemplate = ({ Component, source, toc = [], index = 0, id }) => {
167
167
  };
168
168
 
169
169
  export const MDXTemplate = ({ title, sources = [], path, id, componentsData }) => {
170
+ const hasFeedbackButton = process.env.hasFeedbackButton;
170
171
  const isDeprecated =
171
172
  sources.some((source) => source.source === 'react-deprecated' || source.source === 'html-deprecated') &&
172
173
  !sources.some((source) => source.source === 'react' || source.source === 'html');
@@ -339,6 +340,7 @@ export const MDXTemplate = ({ title, sources = [], path, id, componentsData }) =
339
340
  )}
340
341
  </PageSection>
341
342
  <BackToTop className="ws-back-to-top" scrollableSelector="#ws-page-main" />
343
+ {hasFeedbackButton && <FeedbackButton />}
342
344
  </PageGroup>
343
345
  </React.Fragment>
344
346
  );