From 57be30b62ff49537ac59c8b52d9c9074e4a216a3 Mon Sep 17 00:00:00 2001 From: Mateusz Wisniewski Date: Thu, 4 Jan 2024 08:21:19 +0100 Subject: [PATCH] remove snow feature (#2713) * remove snow feature * bump --- package-lock.json | 31 ----------------------- package.json | 1 - public/defaultConfig.yaml | 2 -- resources/backend/deployment.yaml | 2 +- resources/web/deployment.yaml | 2 +- src/components/App/Snow/Snow.js | 42 ------------------------------- src/index.js | 2 -- 7 files changed, 2 insertions(+), 80 deletions(-) delete mode 100644 src/components/App/Snow/Snow.js diff --git a/package-lock.json b/package-lock.json index b4763814d5..6466ffcc85 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,7 +56,6 @@ "react-dom": "^17.0.2", "react-i18next": "^11.18.6", "react-router-dom": "^6.3.0", - "react-snowfall": "^1.2.1", "react-tippy": "^1.4.0", "recoil": "^0.7.5", "resize-observer-polyfill": "^1.5.1", @@ -24857,11 +24856,6 @@ "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==", "dev": true }, - "node_modules/react-fast-compare": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz", - "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==" - }, "node_modules/react-i18next": { "version": "11.18.6", "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-11.18.6.tgz", @@ -26899,18 +26893,6 @@ "react": "^16.0.0 || ^17.0.0 || ^18.0.0" } }, - "node_modules/react-snowfall": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/react-snowfall/-/react-snowfall-1.2.1.tgz", - "integrity": "sha512-d2UR3nDq3F0DJGaTfJ0QNbBo76UZHtT9wHFj+ePxAl4FgSxWBhxB/Bjn06f5iDBwhgwiZ7CZmv3lwfNvjo6a+w==", - "dependencies": { - "react-fast-compare": "^3.2.0" - }, - "peerDependencies": { - "react": "^16.8 || 17.x || 18.x", - "react-dom": "^16.8 || 17.x || 18.x" - } - }, "node_modules/react-table": { "version": "7.8.0", "resolved": "https://registry.npmjs.org/react-table/-/react-table-7.8.0.tgz", @@ -49845,11 +49827,6 @@ "integrity": "sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg==", "dev": true }, - "react-fast-compare": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz", - "integrity": "sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==" - }, "react-i18next": { "version": "11.18.6", "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-11.18.6.tgz", @@ -51343,14 +51320,6 @@ "react-is": "^16.12.0 || ^17.0.0 || ^18.0.0" } }, - "react-snowfall": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/react-snowfall/-/react-snowfall-1.2.1.tgz", - "integrity": "sha512-d2UR3nDq3F0DJGaTfJ0QNbBo76UZHtT9wHFj+ePxAl4FgSxWBhxB/Bjn06f5iDBwhgwiZ7CZmv3lwfNvjo6a+w==", - "requires": { - "react-fast-compare": "^3.2.0" - } - }, "react-table": { "version": "7.8.0", "resolved": "https://registry.npmjs.org/react-table/-/react-table-7.8.0.tgz", diff --git a/package.json b/package.json index 4f48b1df89..2a8910473e 100644 --- a/package.json +++ b/package.json @@ -94,7 +94,6 @@ "react-dom": "^17.0.2", "react-i18next": "^11.18.6", "react-router-dom": "^6.3.0", - "react-snowfall": "^1.2.1", "react-tippy": "^1.4.0", "recoil": "^0.7.5", "resize-observer-polyfill": "^1.5.1", diff --git a/public/defaultConfig.yaml b/public/defaultConfig.yaml index 35d13364ee..8e62b50549 100644 --- a/public/defaultConfig.yaml +++ b/public/defaultConfig.yaml @@ -76,5 +76,3 @@ config: FEEDBACK: isEnabled: true link: https://sapinsights.eu.qualtrics.com/jfe/form/SV_d3UPNymSgUHAb9Y?product=SAP%20BTP,%20Kyma%20Runtime&product_filter=Kyma - SNOW: - isEnabled: false diff --git a/resources/backend/deployment.yaml b/resources/backend/deployment.yaml index 789a634562..efb7857ca2 100644 --- a/resources/backend/deployment.yaml +++ b/resources/backend/deployment.yaml @@ -20,7 +20,7 @@ spec: spec: containers: - name: backend - image: europe-docker.pkg.dev/kyma-project/dev/busola-backend:PR-2711 + image: europe-docker.pkg.dev/kyma-project/dev/busola-backend:PR-2713 imagePullPolicy: Always resources: limits: diff --git a/resources/web/deployment.yaml b/resources/web/deployment.yaml index 727d318fa6..e8cb3d5fbd 100644 --- a/resources/web/deployment.yaml +++ b/resources/web/deployment.yaml @@ -16,7 +16,7 @@ spec: spec: containers: - name: busola - image: europe-docker.pkg.dev/kyma-project/dev/busola-web:PR-2711 + image: europe-docker.pkg.dev/kyma-project/dev/busola-web:PR-2713 imagePullPolicy: Always resources: requests: diff --git a/src/components/App/Snow/Snow.js b/src/components/App/Snow/Snow.js deleted file mode 100644 index f4ece036ff..0000000000 --- a/src/components/App/Snow/Snow.js +++ /dev/null @@ -1,42 +0,0 @@ -import Snowfall from 'react-snowfall'; -import { useRecoilState } from 'recoil'; -import { themeState } from '../../../state/preferences/themeAtom'; -import { useFeature } from '../../../hooks/useFeature'; - -const WHITE_SNOW = 'white'; -const LIGHT_BLUE_SNOW = '#d4e8ff'; - -function Snow() { - const [theme] = useRecoilState(themeState); - const feature = useFeature('SNOW') || {}; - - if (!feature.isEnabled) { - return null; - } - - let snowColor = LIGHT_BLUE_SNOW; - switch (theme) { - case 'sap_horizon_dark': - case 'sap_horizon_hcb': - snowColor = WHITE_SNOW; - break; - case 'sap_horizon': - case 'sap_horizon_hcw': { - break; - } - default: { - if (isSystemThemeDark()) { - snowColor = WHITE_SNOW; - } - break; - } - } - - return ; -} - -const isSystemThemeDark = () => { - return window.matchMedia('(prefers-color-scheme: dark)').matches; -}; - -export default Snow; diff --git a/src/index.js b/src/index.js index 12603ff9ec..5347271a64 100644 --- a/src/index.js +++ b/src/index.js @@ -25,7 +25,6 @@ import './styles/sapIllus-Fills.css'; import './styles/sapIllus-Layout.css'; import './styles/index.scss'; import './styles/fiori-helpers.scss'; -import Snow from './components/App/Snow/Snow'; i18next .use(initReactI18next) @@ -63,7 +62,6 @@ ReactDOM.render( -