From 8bb728059cb34efd2001fb93fbad6daa6c565914 Mon Sep 17 00:00:00 2001 From: Katie McFaul Date: Mon, 15 Apr 2024 13:23:46 -0400 Subject: [PATCH 1/2] update v6 alphas --- package.json | 3 +- packages/module/package.json | 14 +- .../extensions/react-console/react.js | 5 +- .../AccessConsoles/AccessConsoles.tsx | 2 +- .../AccessConsoles.test.tsx.snap | 63 +-- .../DesktopViewer/ConnectWithRemoteViewer.tsx | 8 +- .../DesktopViewer/ManualConnection.tsx | 2 +- .../__snapshots__/DesktopViewer.test.tsx.snap | 508 +++++++++--------- .../SerialConsole/SerialConsole.tsx | 20 +- .../src/components/SerialConsole/XTerm.tsx | 3 +- .../__snapshots__/SerialConsole.test.tsx.snap | 66 ++- .../SerialConsoleActions.test.tsx.snap | 12 +- .../__snapshots__/XTerm.test.tsx.snap | 2 +- .../src/components/VncConsole/VncActions.tsx | 2 +- .../src/components/VncConsole/VncConsole.tsx | 20 +- .../__snapshots__/VncActions.test.tsx.snap | 42 +- .../__snapshots__/VncConsole.test.tsx.snap | 28 +- yarn.lock | 441 ++++++++++----- 18 files changed, 697 insertions(+), 544 deletions(-) diff --git a/package.json b/package.json index eeedb7f..58fe46e 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,9 @@ ], "scripts": { "build": "yarn workspace @patternfly/react-console build", + "build:watch": "npm run build:watch -w @patternfly/react-console", "build:docs": "yarn workspace @patternfly/react-console docs:build", - "start": "yarn build && concurrently --kill-others \"yarn workspace @patternfly/react-console docs:develop\"", + "start": "concurrently --kill-others \"npm run build:watch\" \"npm run docs:develop -w @patternfly/react-console\"", "serve:docs": "yarn workspace @patternfly/react-console docs:serve", "clean": "yarn workspace @patternfly/react-console clean", "lint:js": "node --max-old-space-size=4096 node_modules/.bin/eslint packages --ext js,jsx,ts,tsx --cache", diff --git a/packages/module/package.json b/packages/module/package.json index 2eb6ce1..d0f57c9 100644 --- a/packages/module/package.json +++ b/packages/module/package.json @@ -6,6 +6,7 @@ "module": "dist/esm/index.js", "scripts": { "build": "yarn build:esm && yarn build:cjs", + "build:watch": "npm run build:esm -- --watch", "build:esm": "tsc --build --verbose ./tsconfig.json", "build:cjs": "tsc --build --verbose ./tsconfig.cjs.json", "clean": "rimraf dist", @@ -34,8 +35,8 @@ }, "dependencies": { "@novnc/novnc": "^1.3.0", - "@patternfly/react-core": "^6.0.0-alpha.1", - "@patternfly/react-styles": "^6.0.0-alpha.1", + "@patternfly/react-core": "6.0.0-alpha.50", + "@patternfly/react-styles": "6.0.0-alpha.19", "@spice-project/spice-html5": "^0.2.1", "file-saver": "^1.3.8", "xterm": "^4.8.1", @@ -46,14 +47,13 @@ "react-dom": "^17 || ^18" }, "devDependencies": { - "@patternfly/documentation-framework": "^5.0.15", - "@patternfly/patternfly": "^6.0.0-alpha.9", + "@patternfly/documentation-framework": "6.0.0-alpha.20", + "@patternfly/patternfly": "6.0.0-alpha.117", "@patternfly/patternfly-a11y": "^4.3.1", - "@patternfly/react-code-editor": "^6.0.0-alpha.1", - "@patternfly/react-table": "^6.0.0-alpha.1", + "@patternfly/react-code-editor": "6.0.0-alpha.50", + "@patternfly/react-table": "6.0.0-alpha.50", "rimraf": "^2.6.2", "serve": "^14.1.2", - "react-monaco-editor": "^0.51.0", "monaco-editor": "^0.34.1" } } diff --git a/packages/module/patternfly-docs/generated/extensions/react-console/react.js b/packages/module/patternfly-docs/generated/extensions/react-console/react.js index 6e03733..3cd33f7 100644 --- a/packages/module/patternfly-docs/generated/extensions/react-console/react.js +++ b/packages/module/patternfly-docs/generated/extensions/react-console/react.js @@ -14,6 +14,7 @@ const pageData = { "section": "extensions", "subsection": "", "deprecated": false, + "template": false, "beta": true, "demo": false, "newImplementationLink": false, @@ -362,9 +363,7 @@ pageData.liveContext = { SerialConsoleCustom, debounce }; -pageData.relativeImports = { - -}; +pageData.relativeImports = "import { SerialConsoleCustom } from 'content/extensions/react-console/examples/./SerialConsoleCustom.jsx';" pageData.examples = { 'Basic Usage': props => {\n const [status, setStatus] = React.useState('disconnected');\n const setConnected = React.useRef(debounce(() => setStatus('connected'), 3000)).current;\n const onConnect = React.useCallback(() => {\n setStatus('loading');\n setConnected();\n }, [setConnected])\n const onDisconnect = React.useCallback(() => setStatus('disconnected'), [])\n const ref = React.createRef();\n\n return (\n \n \n {\n ref.current.onDataReceived(data);\n }}\n ref={ref}\n />\n \n \n \n );\n};","title":"Basic Usage","lang":"js","isFullscreen":true}}> diff --git a/packages/module/src/components/AccessConsoles/AccessConsoles.tsx b/packages/module/src/components/AccessConsoles/AccessConsoles.tsx index 58d410a..699cd9c 100644 --- a/packages/module/src/components/AccessConsoles/AccessConsoles.tsx +++ b/packages/module/src/components/AccessConsoles/AccessConsoles.tsx @@ -70,7 +70,7 @@ export const AccessConsoles: React.FunctionComponent = ({ const toggle = (toggleRef: React.Ref) => (
`; @@ -11,7 +11,7 @@ exports[`AccessConsoles Empty 1`] = ` exports[`AccessConsoles with DesktopViewer 1`] = `
`; @@ -19,31 +19,28 @@ exports[`AccessConsoles with DesktopViewer 1`] = ` exports[`AccessConsoles with SerialConsole and VncConsole as children 1`] = `
-
-
- Loading ... +
+

+ Loading ... +

+
@@ -155,7 +156,7 @@ exports[`AccessConsoles with preselected SerialConsole 1`] = ` exports[`AccessConsoles with wrapped SerialConsole as a child 1`] = `

Serial console text diff --git a/packages/module/src/components/DesktopViewer/ConnectWithRemoteViewer.tsx b/packages/module/src/components/DesktopViewer/ConnectWithRemoteViewer.tsx index dafde42..dab2171 100644 --- a/packages/module/src/components/DesktopViewer/ConnectWithRemoteViewer.tsx +++ b/packages/module/src/components/DesktopViewer/ConnectWithRemoteViewer.tsx @@ -97,13 +97,13 @@ export const ConnectWithRemoteViewer: React.FunctionComponent -

- {!!rdp && ( - )} diff --git a/packages/module/src/components/DesktopViewer/ManualConnection.tsx b/packages/module/src/components/DesktopViewer/ManualConnection.tsx index d6bd7fa..e085ffb 100644 --- a/packages/module/src/components/DesktopViewer/ManualConnection.tsx +++ b/packages/module/src/components/DesktopViewer/ManualConnection.tsx @@ -61,7 +61,7 @@ export const ManualConnection: React.FunctionComponent = const rdpAddress = rdp && rdp.address !== address ? rdp.address : null; return ( -
+
{textManualConnection} diff --git a/packages/module/src/components/DesktopViewer/__snapshots__/DesktopViewer.test.tsx.snap b/packages/module/src/components/DesktopViewer/__snapshots__/DesktopViewer.test.tsx.snap index 9aa1d21..ea5547c 100644 --- a/packages/module/src/components/DesktopViewer/__snapshots__/DesktopViewer.test.tsx.snap +++ b/packages/module/src/components/DesktopViewer/__snapshots__/DesktopViewer.test.tsx.snap @@ -15,113 +15,113 @@ exports[`DesktopViewer default MoreInformationContent 1`] = ` is available for most operating systems. To install it, search for it in GNOME Software or run the following:

RHEL, CentOS
sudo yum install virt-viewer
Fedora
sudo dnf install virt-viewer
SLE, openSUSE
sudo zypper install virt-viewer
Ubuntu, Debian
sudo apt-get install virt-viewer
Windows
Download the MSI from @@ -143,17 +143,17 @@ exports[`DesktopViewer default MoreInformationContent 1`] = ` exports[`DesktopViewer empty 1`] = `

@@ -189,17 +189,17 @@ exports[`DesktopViewer empty 1`] = ` exports[`DesktopViewer with Spice and VNC 1`] = `