Skip to content

Commit

Permalink
entirely remove pf4 from build
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyperkid123 committed Oct 2, 2024
1 parent 633b056 commit 61bfae9
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 59 deletions.
4 changes: 0 additions & 4 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ const PFGenerator = asGenerator((item, ...rest) => {
const defaultTuples = [...defaultJoinGenerator(item, ...rest)];
if (item.uri.includes('./assets')) {
return defaultTuples.map(([base]) => {
if (base.includes('pf-4-styles')) {
return [base, path.relative(base, path.resolve(__dirname, '../node_modules/pf-4-styles', item.uri))];
}
if (base.includes('@patternfly/patternfly')) {
return [base, path.relative(base, path.resolve(__dirname, '../node_modules/@patternfly/patternfly', item.uri))];
}
Expand Down Expand Up @@ -192,7 +189,6 @@ const commonConfig = ({ dev }) => {
/** @type { import("webpack").Configuration } */
const pfConfig = {
entry: {
'pf4-v4': path.resolve(__dirname, '../src/sass/pf-4-assets.scss'),
'pf4-v5': path.resolve(__dirname, '../src/sass/pf-5-assets.scss'),
},
output: {
Expand Down
3 changes: 0 additions & 3 deletions config/webpack.cy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ const PFGenerator = asGenerator((item, ...rest) => {
const defaultTuples = [...defaultJoinGenerator(item, ...rest)];
if (item.uri.includes('./assets')) {
return defaultTuples.map(([base]) => {
if (base.includes('pf-4-styles')) {
return [base, path.relative(base, path.resolve(__dirname, '../node_modules/pf-4-styles', item.uri))];
}
if (base.includes('@patternfly/patternfly')) {
return [base, path.relative(base, path.resolve(__dirname, '../node_modules/@patternfly/patternfly', item.uri))];
}
Expand Down
1 change: 0 additions & 1 deletion cypress/support/component-index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="/apps/chrome/js/pf/pf4-v4.css" />
<link rel="stylesheet" type="text/css" href="/apps/chrome/js/pf/pf4-v5.css" />

<title>Components App</title>
Expand Down
7 changes: 0 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@
"localforage": "^1.10.0",
"lodash": "^4.17.21",
"oidc-client-ts": "^2.4.0",
"pf-4-styles": "npm:@patternfly/patternfly@^4.224.5",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-intl": "^6.6.8",
Expand Down
15 changes: 0 additions & 15 deletions src/components/RootApp/PF4Root.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions src/components/RootApp/RootApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { activeModuleAtom } from '../../state/atoms/activeModuleAtom';
import { scalprumConfigAtom } from '../../state/atoms/scalprumConfigAtom';
import { isDebuggerEnabledAtom } from '../../state/atoms/debuggerModalatom';
import { addQuickstartToAppAtom, clearQuickstartsAtom, populateQuickstartsAppAtom, quickstartsAtom } from '../../state/atoms/quickstartsAtom';
import PF4Root from './PF4Root';

const NotEntitledModal = lazy(() => import('../NotEntitledModal'));
const Debugger = lazy(() => import('../Debugger'));
Expand Down Expand Up @@ -109,8 +108,6 @@ const RootApp = memo(({ accountId }: { accountId?: string }) => {
<HistoryRouter history={chromeHistory as unknown as HistoryRouterProps['history']}>
<SegmentProvider>
<FeatureFlagsProvider>
{/* until PF 4 is fully removed from build */}
<PF4Root />
{/* <CrossRequestNotifier /> */}
<Suspense fallback={null}>
<NotEntitledModal />
Expand Down
6 changes: 0 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import './sass/chrome.scss';
import { chunkLoadErrorRefreshKey } from './utils/common';
import { CHROME_PF4_DEBUG } from './utils/debugFunctions';
import removePf4Styles from './utils/removePf4Styles';

if (localStorage.getItem(CHROME_PF4_DEBUG)) {
removePf4Styles();
}

Object.keys(localStorage).map((key) => {
if (key.includes(chunkLoadErrorRefreshKey)) {
Expand Down
1 change: 0 additions & 1 deletion src/indexRes.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" type="image/png" href="https://access.redhat.com/webassets/avalon/g/favicon.ico">
<link rel="stylesheet" type="text/css" href="<%= pf4styles %>">
<link rel="stylesheet" type="text/css" href="<%= pf5styles %>">
<script type="text/javascript">
window.insights = {
Expand Down
7 changes: 0 additions & 7 deletions src/sass/pf-4-assets.scss

This file was deleted.

3 changes: 0 additions & 3 deletions src/utils/debugFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ const functionBuilder = (key: string, value: boolean | number | string) => {
return () => window.localStorage && window.localStorage.removeItem(key);
};

export const CHROME_PF4_DEBUG = 'chrome:pf4:disabled';

const debugFunctions = {
iqe: () => functionBuilder('iqe:chrome:init', true),
remediationsDebug: () => functionBuilder('remediations:debug', true),
Expand All @@ -25,7 +23,6 @@ const debugFunctions = {
segmentDev: () => functionBuilder('chrome:analytics:dev', true),
intlDebug: () => functionBuilder('chrome:intl:debug', true),
sentryDebug: () => functionBuilder('chrome:sentry:debug', true),
disabledPf4: () => functionBuilder(CHROME_PF4_DEBUG, true),
};

export default debugFunctions;
8 changes: 0 additions & 8 deletions src/utils/removePf4Styles.ts

This file was deleted.

0 comments on commit 61bfae9

Please sign in to comment.