From e2d4f889f91bb621758098fe81f9fd36cb02daa0 Mon Sep 17 00:00:00 2001 From: Martin Marosi Date: Wed, 14 Aug 2024 13:02:36 +0200 Subject: [PATCH 01/11] Add missing scalprum core to shared scope. --- config/webpack.plugins.js | 1 + 1 file changed, 1 insertion(+) diff --git a/config/webpack.plugins.js b/config/webpack.plugins.js index 742efdb7d..b28d07268 100644 --- a/config/webpack.plugins.js +++ b/config/webpack.plugins.js @@ -47,6 +47,7 @@ const plugins = (dev = false, beta = false, restricted = false) => { { '@openshift/dynamic-plugin-sdk': { singleton: true, requiredVersion: deps['@openshift/dynamic-plugin-sdk'] } }, { '@patternfly/quickstarts': { singleton: true, requiredVersion: deps['@patternfly/quickstarts'] } }, { '@redhat-cloud-services/chrome': { singleton: true, requiredVersion: deps['@redhat-cloud-services/chrome'] } }, + { '@scalprum/core': { singleton: true, requiredVersion: deps['@scalprum/core'] } }, { '@scalprum/react-core': { singleton: true, requiredVersion: deps['@scalprum/react-core'] } }, { '@unleash/proxy-client-react': { singleton: true, requiredVersion: deps['@unleash/proxy-client-react'] } }, getDynamicModules(process.cwd()), From d6da3d227b3cf964e54b2c3b71f5f990fcdefdea Mon Sep 17 00:00:00 2001 From: Martin Marosi Date: Thu, 15 Aug 2024 09:52:53 +0200 Subject: [PATCH 02/11] Add option to disable PF4 styling. --- docs/disablingPf4.md | 11 +++++++++++ src/index.ejs | 2 +- src/index.ts | 6 ++++++ src/utils/debugFunctions.ts | 3 +++ src/utils/removePf4Styles.ts | 8 ++++++++ 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 docs/disablingPf4.md create mode 100644 src/utils/removePf4Styles.ts diff --git a/docs/disablingPf4.md b/docs/disablingPf4.md new file mode 100644 index 000000000..66b7b0892 --- /dev/null +++ b/docs/disablingPf4.md @@ -0,0 +1,11 @@ +# Disabling PF4 styling + +> Note: This flag is mean to be used for debugging purposes to help visually identify usage of outdated PF version + +## To remove PF4 styling support follow these steps + +1. Open your browser developer tool and access the "console" tab +2. Run this command: `window.insights.chrome.enable.disabledPf4()` +3. Refresh the browser page + +> Note: The flag uses localStorage for storage. The browser will remember the flag until the local storage is cleared. To remove the flag run `localStorage.clear()` command in you console and refresh the page. diff --git a/src/index.ejs b/src/index.ejs index 3c965890d..c5ad192f0 100644 --- a/src/index.ejs +++ b/src/index.ejs @@ -12,7 +12,7 @@ - +