From 8aac990c00ab9ce55f8bc179b1b60562ecbe9ef0 Mon Sep 17 00:00:00 2001 From: Nick Mitchell Date: Fri, 6 Nov 2020 11:22:37 -0500 Subject: [PATCH] fix: Switching Carbon tabs can cause content to scroll off-viewport Fixes #6014 --- package-lock.json | 168 +++++++++--------- package.json | 2 +- packages/builder/bin/hackCarbon.sh | 19 -- packages/builder/package.json | 1 - packages/react/package.json | 2 +- packages/test/src/api/selectors.ts | 10 +- packages/test/src/api/util.ts | 2 +- plugins/plugin-client-common/package.json | 10 +- .../Views/Sidecar/ToolbarButton.tsx | 4 +- .../Views/Sidecar/TopNavSidecarV2.tsx | 1 - .../web/css/static/sidecar-carbon.css | 18 +- .../web/css/static/sidecar-main.css | 19 +- .../web/css/static/sidecar.scss | 5 +- 13 files changed, 123 insertions(+), 138 deletions(-) delete mode 100755 packages/builder/bin/hackCarbon.sh diff --git a/package-lock.json b/package-lock.json index 5c8322a68e7..10fcf93aa4e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -732,9 +732,9 @@ "integrity": "sha512-JtmCXV7iIc+N5RqQQy+MGT8T+5KcF7+BUKADvHnJKZ8o+ncF5gI4hmrP450dQD76mikI4fqQ0dQflaosesdSPw==" }, "node_modules/@carbon/icons-react": { - "version": "10.19.0", - "resolved": "https://registry.npmjs.org/@carbon/icons-react/-/icons-react-10.19.0.tgz", - "integrity": "sha512-pbAegbVe5geqmz36W//y99W4DV+WRyBvL/3733AgZ4vPuXKLrK9exOUp7C1O/NPWrxIhOppMc3QZRWuicMU31g==", + "version": "10.20.0", + "resolved": "https://registry.npmjs.org/@carbon/icons-react/-/icons-react-10.20.0.tgz", + "integrity": "sha512-xjdfCsbrgyWo5ykjmBYq/JZIfJ0rlhm2Da54gzNZjtHs416JFWYx0CbykEHzFwOulMOS8uba9uDyxtBUd1T3ew==", "dependencies": { "@carbon/icon-helpers": "^10.9.0" } @@ -1011,9 +1011,9 @@ "dev": true }, "node_modules/@types/carbon__icons-react": { - "version": "10.17.1", - "resolved": "https://registry.npmjs.org/@types/carbon__icons-react/-/carbon__icons-react-10.17.1.tgz", - "integrity": "sha512-I18TtuZGhS3Q9TBc6DI5O0p9TZaUl20d2FBWpdLxr9fNQ0CJveekj/i9pmX3w4sGXpiYe4MIE+zy+yOAin3kBA==" + "version": "10.20.0", + "resolved": "https://registry.npmjs.org/@types/carbon__icons-react/-/carbon__icons-react-10.20.0.tgz", + "integrity": "sha512-+JVMVbHD8tC1bY32jI/7D0IVFUHiqfVi0z6xYw40dpj6qWr1Fb0AgYMOj++iqqLprX1QxYQKWQzz/CMubHODmQ==" }, "node_modules/@types/carbon-components-react": { "version": "7.10.11", @@ -3021,9 +3021,9 @@ "dev": true }, "node_modules/carbon-components": { - "version": "10.22.0", - "resolved": "https://registry.npmjs.org/carbon-components/-/carbon-components-10.22.0.tgz", - "integrity": "sha512-0cADWQf1e+6YsxXnjEz630Z7GZa3Z1ssO0UW/HnnJy03Dr+qdT3o6sIgSqObYLddJliAVcjeTlwJshZ9K4bWJQ==", + "version": "10.23.2", + "resolved": "https://registry.npmjs.org/carbon-components/-/carbon-components-10.23.2.tgz", + "integrity": "sha512-rw/FzEEP4XILoz1S8a90k7xSNJR0Nrp1piSwAIj87OQp116Bui7tudAHq4gXZfgXF6OJaiOSKwnRA6kLBuMBUg==", "dependencies": { "flatpickr": "4.6.1", "lodash.debounce": "^4.0.8", @@ -3034,11 +3034,11 @@ } }, "node_modules/carbon-components-react": { - "version": "7.22.0", - "resolved": "https://registry.npmjs.org/carbon-components-react/-/carbon-components-react-7.22.0.tgz", - "integrity": "sha512-36f90jO2tHIyOzOY+ytWLwmFEahXZa1bdzybQvx3QPi2HOi6UVjTADBPipvARhOFgAlpCqLL1CIqLCEKipR3uw==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/carbon-components-react/-/carbon-components-react-7.23.2.tgz", + "integrity": "sha512-JKqR9JD55kKNtITWYwtSYdcjg+c5QE6rYBDfdJGdbOCxxHv5KFLTwWJ4jD6rD8h2KM45rPjDaIy+c35GkSluYQ==", "dependencies": { - "@carbon/icons-react": "^10.19.0", + "@carbon/icons-react": "^10.20.0", "classnames": "2.2.6", "downshift": "5.2.1", "flatpickr": "4.6.1", @@ -3056,8 +3056,8 @@ "peerDependencies": { "carbon-components": "^10.9.0", "carbon-icons": "^7.0.7", - "react": "^16.8.6", - "react-dom": "^16.8.6" + "react": "^16.8.6 || ^17.0.1", + "react-dom": "^16.8.6 || ^17.0.1" } }, "node_modules/carbon-icons": { @@ -4031,9 +4031,9 @@ } }, "node_modules/core-js": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", - "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.7.0.tgz", + "integrity": "sha512-NwS7fI5M5B85EwpWuIwJN4i/fbisQUwLwiSNUWeXlkAZ0sbBjLEvLvFLf1uzAUV66PcEPt4xCGCmOZSxVf3xzA==", "dev": true, "hasInstallScript": true, "optional": true, @@ -4043,9 +4043,9 @@ } }, "node_modules/core-js-pure": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.5.tgz", - "integrity": "sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.7.0.tgz", + "integrity": "sha512-EZD2ckZysv8MMt4J6HSvS9K2GdtlZtdBncKAmF9lr2n0c9dJUaUN88PSTjvgwCgQPWKTkERXITgS6JJRAnljtg==", "dev": true, "hasInstallScript": true, "funding": { @@ -5274,9 +5274,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.3.589", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.589.tgz", - "integrity": "sha512-rQItBTFnol20HaaLm26UgSUduX7iGerwW7pEYX17MB1tI6LzFajiLV7iZ7LVcUcsN/7HrZUoCLrBauChy/IqEg==", + "version": "1.3.590", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.590.tgz", + "integrity": "sha512-76/kAJffe8VUXvEVu677KZuQ92rD1HHn1WO7vjn5atJN/2n71jPgLJ2qs7jKg/00i1xmdR91ZNTg1VIQAxVOIw==", "dev": true }, "node_modules/elegant-spinner": { @@ -5439,12 +5439,13 @@ "dev": true }, "node_modules/es-get-iterator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.0.tgz", - "integrity": "sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.1.tgz", + "integrity": "sha512-qorBw8Y7B15DVLaJWy6WdEV/ZkieBcu6QCq/xzWzGOKJqgG1j754vXRfZ3NY7HSShneqU43mPB4OkQBTkvHhFw==", "dev": true, "dependencies": { - "es-abstract": "^1.17.4", + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.1", "has-symbols": "^1.0.1", "is-arguments": "^1.0.4", "is-map": "^2.0.1", @@ -8457,7 +8458,6 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/indefinite/-/indefinite-2.4.1.tgz", "integrity": "sha512-4C1k983crWkOu4tfmx8by1jQ0xBLBo0EhNV1WsRem2y+IbzLmPkYycjrQe399heo3bZ5OYpImQo2o85vQ0HkSQ==", - "license": "MIT", "engines": { "node": ">=6.0.0" } @@ -12023,7 +12023,6 @@ "version": "3.21.3", "resolved": "https://registry.npmjs.org/openwhisk/-/openwhisk-3.21.3.tgz", "integrity": "sha512-vP3WZGsy6vuiSX4lSY5ldg+ISXqu+hayfn1gWCN0a44O0l9JURMfF6VRjM8OQXURrIN7LyK9603ip3lphZ9F6Q==", - "license": "Apache-2.0", "dependencies": { "needle": "^2.4.0" }, @@ -12265,8 +12264,7 @@ "node_modules/parse-duration": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/parse-duration/-/parse-duration-0.4.4.tgz", - "integrity": "sha512-KbAJuYGUhZkB9gotDiKLnZ7Z3VTacK3fgwmDdB6ZVDtJbMBT6MfLga0WJaYpPDu0mzqT0NgHtHDt5PY4l0nidg==", - "license": "MIT" + "integrity": "sha512-KbAJuYGUhZkB9gotDiKLnZ7Z3VTacK3fgwmDdB6ZVDtJbMBT6MfLga0WJaYpPDu0mzqT0NgHtHDt5PY4l0nidg==" }, "node_modules/parse-entities": { "version": "2.0.0", @@ -13737,9 +13735,9 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/react-markdown": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-5.0.1.tgz", - "integrity": "sha512-+Fu+UeIfuwhCvaIPNJfG12b9LZlBxwbj3wHt3pE+znmG/lisDIYcTjLvLE5uwkv1RB7na7uaWrGFNmpSSVBwgg==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-5.0.2.tgz", + "integrity": "sha512-kmkB4JbV7LqkDAjvaKRKtodB3n3Id76/DalaDun1U8FuLB0SenPfvH+jAQ5Pcpo54cACRQc1LB1yXmuuuIVecw==", "dependencies": { "@types/mdast": "^3.0.3", "@types/unist": "^2.0.3", @@ -16411,14 +16409,14 @@ } }, "node_modules/tar-fs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.0.tgz", - "integrity": "sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "dependencies": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", - "tar-stream": "^2.0.0" + "tar-stream": "^2.1.4" } }, "node_modules/tar-fs/node_modules/bl": { @@ -19720,7 +19718,6 @@ "kui-build-electron": "dist/electron/build.sh", "kui-build-headless": "dist/headless/build.sh", "kui-compile": "bin/compile.sh", - "kui-hack-carbon": "bin/hackCarbon.sh", "kui-init": "build/kui-dist-init.js", "kui-prescan": "bin/prescan.sh", "kui-pty-rebuild": "bin/pty-rebuild.sh" @@ -19839,7 +19836,7 @@ "version": "9.1.0", "license": "Apache-2.0", "dependencies": { - "@types/carbon__icons-react": "10.17.1", + "@types/carbon__icons-react": "10.20.0", "react": "16.13.1", "react-dom": "16.13.1" } @@ -19920,15 +19917,15 @@ "version": "9.1.0", "license": "Apache-2.0", "dependencies": { - "@carbon/icons-react": "10.19.0", + "@carbon/icons-react": "10.20.0", "@patternfly/react-core": "4.50.2", - "carbon-components": "10.22.0", - "carbon-components-react": "7.22.0", + "carbon-components": "10.23.2", + "carbon-components-react": "7.23.2", "carbon-icons": "7.0.7", - "cli-spinners": "^2.4.0", + "cli-spinners": "2.5.0", "monaco-editor": "0.21.2", "monaco-editor-webpack-plugin": "2.0.0", - "react-markdown": "5.0.1", + "react-markdown": "5.0.2", "tmp": "0.2.1" } }, @@ -20713,9 +20710,9 @@ "integrity": "sha512-JtmCXV7iIc+N5RqQQy+MGT8T+5KcF7+BUKADvHnJKZ8o+ncF5gI4hmrP450dQD76mikI4fqQ0dQflaosesdSPw==" }, "@carbon/icons-react": { - "version": "10.19.0", - "resolved": "https://registry.npmjs.org/@carbon/icons-react/-/icons-react-10.19.0.tgz", - "integrity": "sha512-pbAegbVe5geqmz36W//y99W4DV+WRyBvL/3733AgZ4vPuXKLrK9exOUp7C1O/NPWrxIhOppMc3QZRWuicMU31g==", + "version": "10.20.0", + "resolved": "https://registry.npmjs.org/@carbon/icons-react/-/icons-react-10.20.0.tgz", + "integrity": "sha512-xjdfCsbrgyWo5ykjmBYq/JZIfJ0rlhm2Da54gzNZjtHs416JFWYx0CbykEHzFwOulMOS8uba9uDyxtBUd1T3ew==", "requires": { "@carbon/icon-helpers": "^10.9.0" } @@ -20855,15 +20852,15 @@ "@kui-shell/plugin-client-common": { "version": "file:plugins/plugin-client-common", "requires": { - "@carbon/icons-react": "10.19.0", + "@carbon/icons-react": "10.20.0", "@patternfly/react-core": "4.50.2", - "carbon-components": "10.22.0", - "carbon-components-react": "7.22.0", + "carbon-components": "10.23.2", + "carbon-components-react": "7.23.2", "carbon-icons": "7.0.7", - "cli-spinners": "^2.4.0", + "cli-spinners": "2.5.0", "monaco-editor": "0.21.2", "monaco-editor-webpack-plugin": "2.0.0", - "react-markdown": "5.0.1", + "react-markdown": "5.0.2", "tmp": "0.2.1" } }, @@ -21045,7 +21042,7 @@ "@kui-shell/react": { "version": "file:packages/react", "requires": { - "@types/carbon__icons-react": "10.17.1", + "@types/carbon__icons-react": "10.20.0", "react": "16.13.1", "react-dom": "16.13.1" } @@ -21189,9 +21186,9 @@ "dev": true }, "@types/carbon__icons-react": { - "version": "10.17.1", - "resolved": "https://registry.npmjs.org/@types/carbon__icons-react/-/carbon__icons-react-10.17.1.tgz", - "integrity": "sha512-I18TtuZGhS3Q9TBc6DI5O0p9TZaUl20d2FBWpdLxr9fNQ0CJveekj/i9pmX3w4sGXpiYe4MIE+zy+yOAin3kBA==" + "version": "10.20.0", + "resolved": "https://registry.npmjs.org/@types/carbon__icons-react/-/carbon__icons-react-10.20.0.tgz", + "integrity": "sha512-+JVMVbHD8tC1bY32jI/7D0IVFUHiqfVi0z6xYw40dpj6qWr1Fb0AgYMOj++iqqLprX1QxYQKWQzz/CMubHODmQ==" }, "@types/carbon-components-react": { "version": "7.10.11", @@ -22858,9 +22855,9 @@ "dev": true }, "carbon-components": { - "version": "10.22.0", - "resolved": "https://registry.npmjs.org/carbon-components/-/carbon-components-10.22.0.tgz", - "integrity": "sha512-0cADWQf1e+6YsxXnjEz630Z7GZa3Z1ssO0UW/HnnJy03Dr+qdT3o6sIgSqObYLddJliAVcjeTlwJshZ9K4bWJQ==", + "version": "10.23.2", + "resolved": "https://registry.npmjs.org/carbon-components/-/carbon-components-10.23.2.tgz", + "integrity": "sha512-rw/FzEEP4XILoz1S8a90k7xSNJR0Nrp1piSwAIj87OQp116Bui7tudAHq4gXZfgXF6OJaiOSKwnRA6kLBuMBUg==", "requires": { "flatpickr": "4.6.1", "lodash.debounce": "^4.0.8", @@ -22868,11 +22865,11 @@ } }, "carbon-components-react": { - "version": "7.22.0", - "resolved": "https://registry.npmjs.org/carbon-components-react/-/carbon-components-react-7.22.0.tgz", - "integrity": "sha512-36f90jO2tHIyOzOY+ytWLwmFEahXZa1bdzybQvx3QPi2HOi6UVjTADBPipvARhOFgAlpCqLL1CIqLCEKipR3uw==", + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/carbon-components-react/-/carbon-components-react-7.23.2.tgz", + "integrity": "sha512-JKqR9JD55kKNtITWYwtSYdcjg+c5QE6rYBDfdJGdbOCxxHv5KFLTwWJ4jD6rD8h2KM45rPjDaIy+c35GkSluYQ==", "requires": { - "@carbon/icons-react": "^10.19.0", + "@carbon/icons-react": "^10.20.0", "classnames": "2.2.6", "downshift": "5.2.1", "flatpickr": "4.6.1", @@ -23655,16 +23652,16 @@ } }, "core-js": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", - "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.7.0.tgz", + "integrity": "sha512-NwS7fI5M5B85EwpWuIwJN4i/fbisQUwLwiSNUWeXlkAZ0sbBjLEvLvFLf1uzAUV66PcEPt4xCGCmOZSxVf3xzA==", "dev": true, "optional": true }, "core-js-pure": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.6.5.tgz", - "integrity": "sha512-lacdXOimsiD0QyNf9BC/mxivNJ/ybBGJXQFKzRekp1WTHoVUWsUHEn+2T8GJAzzIhyOuXA+gOxCVN3l+5PLPUA==", + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.7.0.tgz", + "integrity": "sha512-EZD2ckZysv8MMt4J6HSvS9K2GdtlZtdBncKAmF9lr2n0c9dJUaUN88PSTjvgwCgQPWKTkERXITgS6JJRAnljtg==", "dev": true }, "core-util-is": { @@ -24663,9 +24660,9 @@ } }, "electron-to-chromium": { - "version": "1.3.589", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.589.tgz", - "integrity": "sha512-rQItBTFnol20HaaLm26UgSUduX7iGerwW7pEYX17MB1tI6LzFajiLV7iZ7LVcUcsN/7HrZUoCLrBauChy/IqEg==", + "version": "1.3.590", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.590.tgz", + "integrity": "sha512-76/kAJffe8VUXvEVu677KZuQ92rD1HHn1WO7vjn5atJN/2n71jPgLJ2qs7jKg/00i1xmdR91ZNTg1VIQAxVOIw==", "dev": true }, "elegant-spinner": { @@ -24805,12 +24802,13 @@ "dev": true }, "es-get-iterator": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.0.tgz", - "integrity": "sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.1.tgz", + "integrity": "sha512-qorBw8Y7B15DVLaJWy6WdEV/ZkieBcu6QCq/xzWzGOKJqgG1j754vXRfZ3NY7HSShneqU43mPB4OkQBTkvHhFw==", "dev": true, "requires": { - "es-abstract": "^1.17.4", + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.1", "has-symbols": "^1.0.1", "is-arguments": "^1.0.4", "is-map": "^2.0.1", @@ -31375,9 +31373,9 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "react-markdown": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-5.0.1.tgz", - "integrity": "sha512-+Fu+UeIfuwhCvaIPNJfG12b9LZlBxwbj3wHt3pE+znmG/lisDIYcTjLvLE5uwkv1RB7na7uaWrGFNmpSSVBwgg==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/react-markdown/-/react-markdown-5.0.2.tgz", + "integrity": "sha512-kmkB4JbV7LqkDAjvaKRKtodB3n3Id76/DalaDun1U8FuLB0SenPfvH+jAQ5Pcpo54cACRQc1LB1yXmuuuIVecw==", "requires": { "@types/mdast": "^3.0.3", "@types/unist": "^2.0.3", @@ -33544,14 +33542,14 @@ } }, "tar-fs": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.0.tgz", - "integrity": "sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", + "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "requires": { "chownr": "^1.1.1", "mkdirp-classic": "^0.5.2", "pump": "^3.0.0", - "tar-stream": "^2.0.0" + "tar-stream": "^2.1.4" }, "dependencies": { "bl": { diff --git a/package.json b/package.json index d7d0e591cdc..6533186a410 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "pty:nodejs": "npm run pty:rebuild node", "link": "bash -c \"if [ $OSTYPE != msys ]; then CLIENT=${CLIENT-default}; CLIENT_HOME=$(cd ./node_modules/@kui-shell/client && pwd) ./packages/builder/bin/seticon.js; fi\"", "update": "ncu -u -x \"@types/yargs-parser,husky,electron,spectron,@types/webdriverio\" && for i in plugins/*; do (cd $i && ncu -u -x electron,spectron,@types/webdriverio,chokidar,d3,elkjs,xtermjs,strip-ansi && rm -rf node_modules); done && rm -rf node_modules/ package-lock.json && npm install", - "postinstall": "npm rebuild node-sass && npm run compile && npx kui-hack-carbon", + "postinstall": "npm rebuild node-sass && npm run compile", "open": "electron . shell", "start": "WATCH_ARGS='open' npm run watch" }, diff --git a/packages/builder/bin/hackCarbon.sh b/packages/builder/bin/hackCarbon.sh deleted file mode 100755 index 9232a0427cc..00000000000 --- a/packages/builder/bin/hackCarbon.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -# -# Temporary hack workaround for https://github.com/IBM/kui/issues/6014 -# -# Summary: upstream bug in carbon-components-react that causes -# undesirable scrolling behavior when switching inline sidecar tabs. -# -# Future readers: please get rid of this hack, once the upstream -# carbon bug fix has been released; hopefully that will happen in -# carbon-components-react 7.23.x. As of this writing, Kui is on -# 7.22.x: https://github.com/carbon-design-system/carbon/pull/7111 -# - -T=$(mktemp) - -node -e 'console.log(require("fs").readFileSync("node_modules/carbon-components-react/es/components/Tabs/Tabs.js").toString().replace(/_tab\$tabAnchor\.scrollIntoView\(false\)/, "_tab$tabAnchor.scrollIntoViewIfNeeded ? _tab$tabAnchor.scrollIntoViewIfNeeded() : _tab$tabAnchor.scrollIntoView(false)"))' > "$T" - -mv "$T" node_modules/carbon-components-react/es/components/Tabs/Tabs.js diff --git a/packages/builder/package.json b/packages/builder/package.json index 53f6d27987e..a88db4c56dc 100644 --- a/packages/builder/package.json +++ b/packages/builder/package.json @@ -12,7 +12,6 @@ "url": "git+https://github.com/IBM/kui.git" }, "bin": { - "kui-hack-carbon": "./bin/hackCarbon.sh", "kui-pty-rebuild": "./bin/pty-rebuild.sh", "kui-build-headless": "./dist/headless/build.sh", "kui-build-electron": "./dist/electron/build.sh", diff --git a/packages/react/package.json b/packages/react/package.json index 2ca47ea0777..692d995c941 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -15,7 +15,7 @@ "url": "git+https://github.com/IBM/kui.git" }, "dependencies": { - "@types/carbon__icons-react": "10.17.1", + "@types/carbon__icons-react": "10.20.0", "react": "16.13.1", "react-dom": "16.13.1" }, diff --git a/packages/test/src/api/selectors.ts b/packages/test/src/api/selectors.ts index 7ea780136d9..a8273c41cd6 100644 --- a/packages/test/src/api/selectors.ts +++ b/packages/test/src/api/selectors.ts @@ -63,7 +63,7 @@ export const TERMINAL_SIDECAR_WATCHER_BUTTON = `${TOP_TAB_BUTTONS} [data-mode="s // sidecar toolbar export const SIDECAR_TOOLBAR = (N: number) => - `${SIDECAR(N)} .bx--tab-content[aria-hidden="false"] .sidecar-bottom-stripe-toolbar` + `${SIDECAR(N)} .bx--tab-content:not([hidden]) .sidecar-bottom-stripe-toolbar` export const SIDECAR_TOOLBAR_TEXT = (N: number, type: string) => `${SIDECAR_TOOLBAR(N)} .sidecar-toolbar-text[data-type="${type}"] .sidecar-toolbar-text-content` export const SIDECAR_TOOLBAR_BUTTON = (N: number, mode: string) => @@ -73,20 +73,20 @@ export const SIDECAR_TOOLBAR_BUTTON = (N: number, mode: string) => // sidecar alert export const SIDECAR_ALERT = (N: number, type: string) => - `${SIDECAR(N)} .bx--tab-content[aria-hidden="false"] .kui--toolbar-alert[data-type="${type}"]` + `${SIDECAR(N)} .bx--tab-content:not([hidden]) .kui--toolbar-alert[data-type="${type}"]` // terminal alert export const TERMINAL_ALERT = (type: string) => `.kui--terminal-alert[data-type="${type}"]` // sidecar tab content, for visible tab -export const SIDECAR_TAB_CONTENT = (N: number) => `${SIDECAR(N)} .bx--tab-content[aria-hidden="false"] .custom-content` +export const SIDECAR_TAB_CONTENT = (N: number) => `${SIDECAR(N)} .bx--tab-content:not([hidden]) .custom-content` export const SIDECAR_CUSTOM_CONTENT = (N: number) => `${SIDECAR_TAB_CONTENT(N)} .code-highlighting` // top nav sidecar export const SIDECAR_MODE_BUTTONS = (N: number) => `${SIDECAR(N)} .sidecar-bottom-stripe-mode-bits .sidecar-bottom-stripe-button` // all mode buttons in the bottom stripe export const _SIDECAR_MODE_BUTTON = (N: number, mode: string) => `${SIDECAR_MODE_BUTTONS(N)}[data-mode="${mode}"]` // specific mode button in the bottom stripe -export const SIDECAR_MODE_BUTTON = (N: number, mode: string) => `${_SIDECAR_MODE_BUTTON(N, mode)} > a` // clickable part of mode button +export const SIDECAR_MODE_BUTTON = (N: number, mode: string) => `${_SIDECAR_MODE_BUTTON(N, mode)} > button` // clickable part of mode button export const SIDECAR_MODE_BUTTON_SELECTED = (N: number, mode: string) => `${_SIDECAR_MODE_BUTTON(N, mode)}.bx--tabs--scrollable__nav-item--selected` @@ -288,7 +288,7 @@ export const COMMENTARY_EDITOR_BUTTON_REVERT = export const COMMENTARY_EDITOR = '.kui--commentary .kui--source-ref-editor' export const SIDECAR_LAST = `${OUTPUT_LAST} .kui--sidecar.visible:not(.minimized)` -export const SIDECAR_TOOLBAR_LAST = `${SIDECAR_LAST} .bx--tab-content[aria-hidden="false"] .sidecar-bottom-stripe-toolbar` +export const SIDECAR_TOOLBAR_LAST = `${SIDECAR_LAST} .bx--tab-content:not([hidden]) .sidecar-bottom-stripe-toolbar` export const SIDECAR_TOOLBAR_TEXT_LAST = (type: string) => `${SIDECAR_TOOLBAR_LAST} .sidecar-toolbar-text[data-type="${type}"] .sidecar-toolbar-text-content` export const SIDECAR_TOOLBAR_BUTTON_LAST = (mode: string) => diff --git a/packages/test/src/api/util.ts b/packages/test/src/api/util.ts index bdd160f8774..854f86b7991 100644 --- a/packages/test/src/api/util.ts +++ b/packages/test/src/api/util.ts @@ -173,7 +173,7 @@ export const expectArray = (expected: Array, failFast = true, subset = f /** get the monaco editor text */ export const getValueFromMonaco = async ( res: AppAndCount, - container = `${Selectors.PROMPT_BLOCK_N(res.count)} .bx--tab-content[aria-hidden="false"]` + container = `${Selectors.PROMPT_BLOCK_N(res.count)} .bx--tab-content:not([hidden])` ) => { const selector = `${container} .monaco-editor-wrapper` try { diff --git a/plugins/plugin-client-common/package.json b/plugins/plugin-client-common/package.json index ce3958330f3..4d9f688ca5e 100644 --- a/plugins/plugin-client-common/package.json +++ b/plugins/plugin-client-common/package.json @@ -20,15 +20,15 @@ "module": "mdist/index.js", "types": "mdist/index.d.ts", "dependencies": { - "@carbon/icons-react": "10.19.0", + "@carbon/icons-react": "10.20.0", "@patternfly/react-core": "4.50.2", - "carbon-components": "10.22.0", - "carbon-components-react": "7.22.0", + "carbon-components": "10.23.2", + "carbon-components-react": "7.23.2", "carbon-icons": "7.0.7", - "cli-spinners": "^2.4.0", + "cli-spinners": "2.5.0", "monaco-editor": "0.21.2", "monaco-editor-webpack-plugin": "2.0.0", - "react-markdown": "5.0.1", + "react-markdown": "5.0.2", "tmp": "0.2.1" }, "kui": { diff --git a/plugins/plugin-client-common/src/components/Views/Sidecar/ToolbarButton.tsx b/plugins/plugin-client-common/src/components/Views/Sidecar/ToolbarButton.tsx index 36ee144260c..784e6e11890 100644 --- a/plugins/plugin-client-common/src/components/Views/Sidecar/ToolbarButton.tsx +++ b/plugins/plugin-client-common/src/components/Views/Sidecar/ToolbarButton.tsx @@ -81,11 +81,11 @@ export default class ToolbarButton - + ) } diff --git a/plugins/plugin-client-common/src/components/Views/Sidecar/TopNavSidecarV2.tsx b/plugins/plugin-client-common/src/components/Views/Sidecar/TopNavSidecarV2.tsx index fe73590ba84..aaf0e06f294 100644 --- a/plugins/plugin-client-common/src/components/Views/Sidecar/TopNavSidecarV2.tsx +++ b/plugins/plugin-client-common/src/components/Views/Sidecar/TopNavSidecarV2.tsx @@ -194,7 +194,6 @@ export default class TopNavSidecar extends BaseSidecar {this.current.tabs.map((mode: MultiModalMode, idx: number) => ( .bx--tabs--scrollable, + .kui--sidecar-tabs-container .bx--tab-content, .bx--tab-content { /* TODO @extend .full-height; */ flex: 1; @@ -117,7 +117,8 @@ $focus-color: var(--color-brand-03); /* carbon override */ padding: 0; - &[aria-hidden='true'] { + &[aria-hidden='true'], + &[hidden] { display: none; } }