From 1b465f647f8abf3a727a1581eba4b7e2a600a562 Mon Sep 17 00:00:00 2001 From: Lev Chelyadinov Date: Sat, 20 Jul 2024 03:02:01 +0200 Subject: [PATCH] fix: drop the GA and Hotjar spyware (#696) --- .env.sample | 2 - .github/workflows/deploy.yml | 2 - .github/workflows/testing.yml | 2 - config/docusaurus/extensions.js | 25 +----- config/docusaurus/footer.js | 1 - config/docusaurus/index.js | 3 +- config/docusaurus/routes.js | 1 - docusaurus.config.js | 5 +- global.d.ts | 17 ---- i18n/en/code.json | 12 --- .../current/privacy.md | 17 ---- i18n/en/docusaurus-theme-classic/footer.json | 4 - i18n/ru/code.json | 12 --- .../current/privacy.md | 17 ---- i18n/ru/docusaurus-theme-classic/footer.json | 4 - i18n/uz/code.json | 12 --- .../current/privacy.md | 17 ---- i18n/uz/docusaurus-theme-classic/footer.json | 4 - package.json | 3 - pnpm-lock.yaml | 84 ++++++++++--------- src/entities/example/index.tsx | 17 ---- src/entities/exp/index.ts | 18 ---- src/features/cookie-consent/index.tsx | 27 ------ .../cookie-consent/styles.module.scss | 33 -------- src/shared/lib/ga/ga.ts | 25 ------ src/shared/lib/ga/index.ts | 1 - src/shared/ui/nav-card/index.tsx | 12 +-- src/theme/Root.js | 18 ---- 28 files changed, 50 insertions(+), 345 deletions(-) delete mode 100644 global.d.ts delete mode 100644 i18n/en/docusaurus-plugin-content-docs/current/privacy.md delete mode 100644 i18n/ru/docusaurus-plugin-content-docs/current/privacy.md delete mode 100644 i18n/uz/docusaurus-plugin-content-docs/current/privacy.md delete mode 100644 src/entities/exp/index.ts delete mode 100644 src/features/cookie-consent/index.tsx delete mode 100644 src/features/cookie-consent/styles.module.scss delete mode 100644 src/shared/lib/ga/ga.ts delete mode 100644 src/shared/lib/ga/index.ts delete mode 100644 src/theme/Root.js diff --git a/.env.sample b/.env.sample index c986685eb3..2b5184551b 100644 --- a/.env.sample +++ b/.env.sample @@ -1,5 +1,3 @@ ALGOLIA_KEY= ALGOLIA_ID= -GA_ID= -HOTJAR_ID= OG_EXP= diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9cc1edbbcd..c58276e110 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,8 +12,6 @@ jobs: env: ALGOLIA_KEY: ${{ secrets.ALGOLIA_KEY }} ALGOLIA_ID: ${{ secrets.ALGOLIA_ID }} - GA_ID: ${{ secrets.GA_ID }} - HOTJAR_ID: ${{ secrets.HOTJAR_ID }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index c4dd6ea47e..76a1efdc02 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -10,8 +10,6 @@ jobs: env: ALGOLIA_KEY: ${{ secrets.ALGOLIA_KEY }} ALGOLIA_ID: ${{ secrets.ALGOLIA_ID }} - GA_ID: ${{ secrets.GA_ID }} - HOTJAR_ID: ${{ secrets.HOTJAR_ID }} steps: - uses: actions/checkout@v4 diff --git a/config/docusaurus/extensions.js b/config/docusaurus/extensions.js index ffd8eec99b..5afd55e07d 100644 --- a/config/docusaurus/extensions.js +++ b/config/docusaurus/extensions.js @@ -9,24 +9,6 @@ const DOCUSAURUS_PLUGIN_OG = [ }, ]; -// We use metrics only for analyze and refinement website discovery experience -// @see Privacy -const metrics = { - gtag: { - trackingID: process.env.GA_ID, // the Google Analytics Tracking ID - anonymizeIP: true, // Should IPs be anonymized? - }, - googleAnalytics: { - trackingID: process.env.GA_ID, // the Google Analytics Tracking ID - anonymizeIP: true, // Should IPs be anonymized? - }, - // to integrate Hotjar feedback - // @see https://github.com/symblai/docusaurus-plugin-hotjar - hotjar: { - applicationId: process.env.HOTJAR_ID, - }, -}; - /** * Hide category index pages from sidebar () * TODO: Remove custom generator after issue fix @@ -78,10 +60,6 @@ const presets = [ changefreq: "weekly", priority: 0.5, }, - gtag: process.env.GA_ID ? metrics.gtag : undefined, - googleAnalytics: process.env.GA_ID - ? metrics.googleAnalytics - : undefined, }, ], ]; @@ -129,7 +107,6 @@ const plugins = [ }, ], "plugin-image-zoom", - process.env.HOTJAR_ID && "docusaurus-plugin-hotjar", // For preventing crashing // FIXME: Docusaurus Open Graph Plugin Experimental. process.env.OG_EXP && DOCUSAURUS_PLUGIN_OG, ].filter(Boolean); @@ -142,4 +119,4 @@ const algolia = { contextualSearch: true, }; -module.exports = { presets, plugins, algolia, metrics }; +module.exports = { presets, plugins, algolia }; diff --git a/config/docusaurus/footer.js b/config/docusaurus/footer.js index bbf956dbf0..cef2fd23a9 100644 --- a/config/docusaurus/footer.js +++ b/config/docusaurus/footer.js @@ -45,7 +45,6 @@ const footer = { label: "License", href: `${GITHUB_DOCS}/blob/master/LICENSE`, }, - { label: "Privacy", href: "/docs/privacy" }, ], }, ], diff --git a/config/docusaurus/index.js b/config/docusaurus/index.js index c4d5b77061..02ba50d692 100644 --- a/config/docusaurus/index.js +++ b/config/docusaurus/index.js @@ -4,7 +4,7 @@ const { footer } = require("./footer"); const consts = require("./consts"); const { metadata } = require("./metadata"); const { i18n } = require("./i18n"); -const { presets, plugins, algolia, metrics } = require("./extensions"); +const { presets, plugins, algolia } = require("./extensions"); const { LEGACY_ROUTES, REDIRECTS } = require("./routes"); module.exports = { @@ -17,7 +17,6 @@ module.exports = { presets, plugins, algolia, - metrics, LEGACY_ROUTES, REDIRECTS, }; diff --git a/config/docusaurus/routes.js b/config/docusaurus/routes.js index a8e464d2d5..9051a065ec 100644 --- a/config/docusaurus/routes.js +++ b/config/docusaurus/routes.js @@ -318,7 +318,6 @@ const _TOTAL_ROUTES = [ "/docs/guides/migration/from-v1", "/docs/guides/tech/with-nextjs", "/docs/", - "/docs/privacy", "/docs/reference", ]; // from: "/en/docs/*" to "/docs/*" diff --git a/docusaurus.config.js b/docusaurus.config.js index 279a5196a5..22d833e19a 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -46,7 +46,7 @@ module.exports = { footer: cfg.footer, algolia: cfg.algolia, metadata: cfg.metadata, - hotjar: cfg.metrics.hotjar, + imageZoom: { options: { background: "rgb(255 255 255 / 0.3)", @@ -63,6 +63,3 @@ module.exports = { if (!process.env.ALGOLIA_KEY || !process.env.ALGOLIA_ID) { delete module.exports.themeConfig.algolia; } -if (!process.env.HOTJAR_ID) { - delete module.exports.themeConfig.hotjar; -} diff --git a/global.d.ts b/global.d.ts deleted file mode 100644 index 5691cb5b3f..0000000000 --- a/global.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -declare global { - interface Window { - essss: string; - ga: ( - eventType: string, - options: { - hitType: string; - eventCategory: string; - eventAction: string; - eventLabel: string; - eventValue: number; - }, - ) => void; - } -} - -export {}; diff --git a/i18n/en/code.json b/i18n/en/code.json index 645ef1f28e..64379880c6 100644 --- a/i18n/en/code.json +++ b/i18n/en/code.json @@ -127,18 +127,6 @@ "message": "But there are redirects from old links for compatibility", "description": "NavPage section=legacy subdetails" }, - "features.cookie-consent.alert": { - "message": "🍰 We use cookies for analytics", - "description": "Cookie Consent alert" - }, - "features.cookie-consent.accept": { - "message": "OK", - "description": "Cookie Consent accept label" - }, - "features.cookie-consent.reason": { - "message": "why?", - "description": "Cookie Consent reason label" - }, "features.feedback-badge.label": { "message": "Share your feedback about documentation πŸ€™", "description": "Feedback share button label" diff --git a/i18n/en/docusaurus-plugin-content-docs/current/privacy.md b/i18n/en/docusaurus-plugin-content-docs/current/privacy.md deleted file mode 100644 index 270de2b194..0000000000 --- a/i18n/en/docusaurus-plugin-content-docs/current/privacy.md +++ /dev/null @@ -1,17 +0,0 @@ -# Privacy - -**We use cookies to collect data about documentation usage (only for further analytics and improvement of the site, and for no other purpose)** - -The only plugins this site relies on are [@docusaurus/plugin-google-analytics](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-google-analytics) and [docusaurus-plugin-hotjar](https://github.com/symblai/docusaurus-plugin-hotjar). We only use the traffic data provided by [Google Analytics](https://analytics.google.com/) and [Hotjar](https://www.hotjar.com/) to collect feedback from you and refine your user experience. - -:::warning NOTE -This page is not a legal notice, please refer to [Google Analytics](https://analytics.google.com/) and [Hotjar](https://www.hotjar.com/) for more details -::: - -**Who will have access to this metrics data?** - -- Core-team of methodology -- Google Analytics, which we rely on for analyze service usage [(more...)](https://www.google.com/analytics/terms/us.html) -- Hotjar, which we rely on for collect usage feedback [(more...)](https://help.hotjar.com/hc/en-us/categories/360003405813) - -![feature-sliced-banner](/img/banner.jpg) diff --git a/i18n/en/docusaurus-theme-classic/footer.json b/i18n/en/docusaurus-theme-classic/footer.json index 90c89dc818..7d915c2ff8 100644 --- a/i18n/en/docusaurus-theme-classic/footer.json +++ b/i18n/en/docusaurus-theme-classic/footer.json @@ -31,10 +31,6 @@ "message": "License", "description": "The label of footer link with label=License linking to LICENSE" }, - "link.item.label.Privacy": { - "message": "Privacy", - "description": "The label of footer link with label=Privacy linking to /docs/privacy" - }, "link.item.label.Contribution Guide (RU)": { "message": "Contribution Guide (RU)", "description": "The label of footer link with label=Contribution Guide (RU) linking to CONTRIBUTING.md" diff --git a/i18n/ru/code.json b/i18n/ru/code.json index 66bc8b7cf6..44ec1891f6 100644 --- a/i18n/ru/code.json +++ b/i18n/ru/code.json @@ -127,18 +127,6 @@ "message": "Но для совмСстимости Π΅ΡΡ‚ΡŒ Ρ€Π΅Π΄ΠΈΡ€Π΅ΠΊΡ‚Ρ‹ со старых ссылок", "description": "NavPage section=legacy subdetails" }, - "features.cookie-consent.alert": { - "message": "🍰 ΠœΡ‹ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅ΠΌ ΠΊΡƒΠΊΠΈ для Π°Π½Π°Π»ΠΈΡ‚ΠΈΠΊΠΈ", - "description": "Cookie Consent alert" - }, - "features.cookie-consent.accept": { - "message": "Π₯ΠΎΡ€ΠΎΡˆΠΎ", - "description": "Cookie Consent accept label" - }, - "features.cookie-consent.reason": { - "message": "Π·Π°Ρ‡Π΅ΠΌ?", - "description": "Cookie Consent reason label" - }, "features.feedback-badge.label": { "message": "ПодСлись Ρ„ΠΈΠ΄Π±Π΅ΠΊΠΎΠΌ ΠΏΠΎ Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚Π°Ρ†ΠΈΠΈ πŸ€™", "description": "Feedback share button label" diff --git a/i18n/ru/docusaurus-plugin-content-docs/current/privacy.md b/i18n/ru/docusaurus-plugin-content-docs/current/privacy.md deleted file mode 100644 index d2bcfd5f76..0000000000 --- a/i18n/ru/docusaurus-plugin-content-docs/current/privacy.md +++ /dev/null @@ -1,17 +0,0 @@ -# ΠšΠΎΠ½Ρ„ΠΈΠ΄Π΅Π½Ρ†ΠΈΠ°Π»ΡŒΠ½ΠΎΡΡ‚ΡŒ - -**ΠœΡ‹ ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅ΠΌ ΠΊΡƒΠΊΠΈ, для сбора Π΄Π°Π½Π½Ρ‹Ρ… ΠΏΠΎ использованию Π΄ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚Π°Ρ†ΠΈΠΈ (для дальнСйшСй Π°Π½Π°Π»ΠΈΡ‚ΠΈΠΊΠΈ ΠΈ ΡƒΠ»ΡƒΡ‡ΡˆΠ΅Π½ΠΈΡ сайта, ΠΈ Π½ΠΈ для ΠΊΠ°ΠΊΠΈΡ… ΠΈΠ½Ρ‹Ρ… Ρ†Π΅Π»Π΅ΠΉ)** - -ЕдинствСнныС ΠΏΠ»Π°Π³ΠΈΠ½Ρ‹ для сбора ΠΌΠ΅Ρ‚Ρ€ΠΈΠΊ это [@docusaurus/plugin-google-analytics](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-google-analytics) ΠΈ [docusaurus-plugin-hotjar](https://github.com/symblai/docusaurus-plugin-hotjar). ΠœΡ‹ Π°Π½Π°Π»ΠΈΠ·ΠΈΡ€ΡƒΠ΅ΠΌ Ρ‚ΠΎΠ»ΡŒΠΊΠΎ Ρ‚Π΅ Π΄Π°Π½Π½Ρ‹Π΅, Ρ‡Ρ‚ΠΎ ΠΏΡ€Π΅Π΄ΠΎΡΡ‚Π°Π²Π»ΡΡŽΡ‚ΡΡ с ΠΏΠΎΠΌΠΎΡ‰ΡŒΡŽ [Google Analytics](https://analytics.google.com/) ΠΈ [Hotjar](https://www.hotjar.com/) - Ρ‡Ρ‚ΠΎΠ±Ρ‹ ΡΠΎΠ±Ρ€Π°Ρ‚ΡŒ Ρ„ΠΈΠ΄Π±Π΅ΠΊ ΠΈ ΡƒΠ»ΡƒΡ‡ΡˆΠΈΡ‚ΡŒ ваш ΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Ρ‚Π΅Π»ΡŒΡΠΊΠΈΠΉ ΠΎΠΏΡ‹Ρ‚. - -:::warning NOTE -Π­Ρ‚Π° страница Π½Π΅ являСтся ΡŽΡ€ΠΈΠ΄ΠΈΡ‡Π΅ΡΠΊΠΈ ΠΏΠΎΠ»Π½ΠΎΡ†Π΅Π½Π½ΠΎΠΉ, поэтому Π·Π° Π΄Ρ€ΡƒΠ³ΠΈΠΌΠΈ подробностями ΠΎΠ±Ρ€Π°Ρ‚ΠΈΡ‚Π΅ΡΡŒ поТалуйста ΠΊ ΠΎΡ„ΠΈΡ†.сайтам [Google Analytics](https://analytics.google.com/) ΠΈ [Hotjar](https://www.hotjar.com/) -::: - -**ΠšΡ‚ΠΎ ΠΈΠΌΠ΅Π΅Ρ‚ доступ ΠΊ ΠΌΠ΅Ρ‚Ρ€ΠΈΠΊΠ°ΠΌ?** - -- Core-team ΠΌΠ΅Ρ‚ΠΎΠ΄ΠΎΠ»ΠΎΠ³ΠΈΠΈ -- Google Analytics, Π½Π° ΠΊΠΎΡ‚ΠΎΡ€ΡƒΡŽ ΠΌΡ‹ опираСмся для Π°Π½Π°Π»ΠΈΠ·Π° использования сСрвиса [(см. ΠΏΠΎΠ΄Ρ€ΠΎΠ±Π½Π΅Π΅)](https://www.google.com/analytics/terms/us.html) -- Hotjar, Π½Π° ΠΊΠΎΡ‚ΠΎΡ€Ρ‹ΠΉ ΠΌΡ‹ опираСмся ΠΏΡ€ΠΈ сборС Ρ„ΠΈΠ΄Π±Π΅ΠΊΠ° ΠΏΠΎ Π²Π·Π°ΠΈΠΌΠΎΠ΄Π΅ΠΉΡΡ‚Π²ΠΈΡŽ [(см. ΠΏΠΎΠ΄Ρ€ΠΎΠ±Π½Π΅Π΅)](https://help.hotjar.com/hc/en-us/categories/360003405813) - -![feature-sliced-banner](/img/banner.jpg) diff --git a/i18n/ru/docusaurus-theme-classic/footer.json b/i18n/ru/docusaurus-theme-classic/footer.json index b19df1d4a9..791c5280e6 100644 --- a/i18n/ru/docusaurus-theme-classic/footer.json +++ b/i18n/ru/docusaurus-theme-classic/footer.json @@ -31,10 +31,6 @@ "message": "ЛицСнзия", "description": "The label of footer link with label=License linking to LICENSE" }, - "link.item.label.Privacy": { - "message": "ΠšΠΎΠ½Ρ„ΠΈΠ΄Π΅Π½Ρ†ΠΈΠ°Π»ΡŒΠ½ΠΎΡΡ‚ΡŒ", - "description": "The label of footer link with label=Privacy linking to /docs/privacy" - }, "link.item.label.Contribution Guide (RU)": { "message": "Π“Π°ΠΉΠ΄Π»Π°ΠΉΠ½Ρ‹ ΠΏΠΎ ΠΊΠΎΠ½Ρ‚Ρ€ΠΈΠ±ΡŒΡŽΡ‚ΠΈΠ½Π³Ρƒ (RU)", "description": "The label of footer link with label=Contribution Guide (RU) linking to CONTRIBUTING.md" diff --git a/i18n/uz/code.json b/i18n/uz/code.json index ea890f5640..3364620055 100644 --- a/i18n/uz/code.json +++ b/i18n/uz/code.json @@ -127,18 +127,6 @@ "message": "Lekin moslik uchun eski havolalardan qayta yo'naltirishlar mavjud", "description": "NavPage section=legacy subdetails" }, - "features.cookie-consent.alert": { - "message": "🍰 Biz tahlil qilish uchun cookie-fayllardan foydalanamiz", - "description": "Cookie Consent alert" - }, - "features.cookie-consent.accept": { - "message": "Yaxshi", - "description": "Cookie Consent accept label" - }, - "features.cookie-consent.reason": { - "message": "nimaga?", - "description": "Cookie Consent reason label" - }, "features.feedback-badge.label": { "message": "Hujjatlar bo'yicha fikr-mulohazalaringizni baham ko'ring πŸ€™", "description": "Feedback share button label" diff --git a/i18n/uz/docusaurus-plugin-content-docs/current/privacy.md b/i18n/uz/docusaurus-plugin-content-docs/current/privacy.md deleted file mode 100644 index 12f7977b51..0000000000 --- a/i18n/uz/docusaurus-plugin-content-docs/current/privacy.md +++ /dev/null @@ -1,17 +0,0 @@ -# Maxfiylik - -**Hujjatlardan foydalanish bo'yicha ma'lumotlarni to'plash uchun cookie-fayllardan foydalanamiz (faqatgina keyingi tahlillar va saytni yaxshilash maqsadida)** - -Ko'rsatkichlarni yig'ish uchun yagona plaginlar [@docusaurus/plugin-google-analytics](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-google-analytics) va [docusaurus-plugin-hotjar](https://github.com/symblai/docusaurus-plugin-hotjar). Biz faqat [Google Analytics](https://analytics.google.com/) orqali taqdim etilgan ma'lumotlarni tahlil qilamiz, fikr-mulohazalarni yig'ish va foydalanuvchi tajribangizni yaxshilash uchun esa [Hotjar](https://www.hotjar.com/) dan. - -:::warning NOTE -Ushbu sahifa qonuniy jihatdan to'liq emas, shuning uchun boshqa tafsilotlar uchun rasmiy veb-saytlar [Google Analytics](https://analytics.google.com/) va [Hotjar](https://www.hotjar.com/) murojaat qiling. -::: - -**Kimning materiallarga ruhsati bor?** - -- Core-team metodologiyasi -- Xizmatdan foydalanish tahlilini biz Google Analytics ga suyanamiz [(ko'proq korish)](https://www.google.com/analytics/terms/us.html) -- Biz o'zaro aloqalar bo'yicha fikr-mulohazalarni yig'ishda Hotjar dan foydalaniz [(ko'proq korish)](https://help.hotjar.com/hc/en-us/categories/360003405813) - -![feature-sliced-banner](/img/banner.jpg) diff --git a/i18n/uz/docusaurus-theme-classic/footer.json b/i18n/uz/docusaurus-theme-classic/footer.json index 67d27f8212..f0b5db7840 100644 --- a/i18n/uz/docusaurus-theme-classic/footer.json +++ b/i18n/uz/docusaurus-theme-classic/footer.json @@ -31,10 +31,6 @@ "message": "Litsenziya", "description": "The label of footer link with label=License linking to LICENSE" }, - "link.item.label.Privacy": { - "message": "Foydalanuvchi shartnomasi", - "description": "The label of footer link with label=Privacy linking to /docs/privacy" - }, "link.item.label.Contribution Guide (RU)": { "message": "Hissa qoΚ»shish boΚ»yicha qoΚ»llanma (RU)", "description": "The label of footer link with label=Contribution Guide (RU) linking to CONTRIBUTING.md" diff --git a/package.json b/package.json index c523c8a3e6..5a896b5bb8 100644 --- a/package.json +++ b/package.json @@ -36,10 +36,8 @@ "@svgr/webpack": "^8.1.0", "@types/lodash-es": "^4.17.12", "clsx": "^2.1.0", - "docusaurus-plugin-hotjar": "^0.0.2", "dotenv": "^16.3.1", "file-loader": "^6.2.0", - "js-cookie": "^3.0.5", "lodash-es": "^4.17.21", "picocolors": "^1.0.0", "plugin-image-zoom": "^1.2.0", @@ -47,7 +45,6 @@ "pushfeedback": "^0.1.40", "pushfeedback-react": "^0.1.40", "react": "^18.3.1", - "react-cookie-consent": "^8.0.1", "react-dom": "^18.3.1", "react-fast-marquee": "^1.6.2", "sha1": "^1.1.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 08577bc7b7..b29b41a0ab 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -41,18 +41,12 @@ importers: clsx: specifier: ^2.1.0 version: 2.1.0 - docusaurus-plugin-hotjar: - specifier: ^0.0.2 - version: 0.0.2 dotenv: specifier: ^16.3.1 version: 16.3.1 file-loader: specifier: ^6.2.0 version: 6.2.0(webpack@5.91.0) - js-cookie: - specifier: ^3.0.5 - version: 3.0.5 lodash-es: specifier: ^4.17.21 version: 4.17.21 @@ -74,9 +68,6 @@ importers: react: specifier: ^18.3.1 version: 18.3.1 - react-cookie-consent: - specifier: ^8.0.1 - version: 8.0.1(react@18.3.1) react-dom: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) @@ -3225,9 +3216,6 @@ packages: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} engines: {node: '>=6.0.0'} - docusaurus-plugin-hotjar@0.0.2: - resolution: {integrity: sha512-Jsdxa6k4YQm4SBiY5mv9h/6sKUrQs6lC6mRoPUfjiPVtnhURE3d0dj4Vnrpy/tRVSAbywAqA0F/PGn5RKHtVaw==} - docusaurus-plugin-sass@0.2.5: resolution: {integrity: sha512-Z+D0fLFUKcFpM+bqSUmqKIU+vO+YF1xoEQh5hoFreg2eMf722+siwXDD+sqtwU8E4MvVpuvsQfaHwODNlxJAEg==} peerDependencies: @@ -4445,13 +4433,6 @@ packages: joi@17.13.1: resolution: {integrity: sha512-vaBlIKCyo4FCUtCm7Eu4QZd/q02bWcxfUO6YSXAZOWF6gzcLBeba8kwotUdYJjDLW8Cz8RywsSOqiNJZW0mNvg==} - js-cookie@2.2.1: - resolution: {integrity: sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==} - - js-cookie@3.0.5: - resolution: {integrity: sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==} - engines: {node: '>=14'} - js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -5683,12 +5664,6 @@ packages: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true - react-cookie-consent@8.0.1: - resolution: {integrity: sha512-4A2jzPQDFfBhtxIz4hYX+vJ0QnOknGdOXpEoetXzgwUrMtxVJVow8YgBsGerNt5rJI7WhKkHwr8LmxekxgVejg==} - engines: {node: '>=10'} - peerDependencies: - react: '>=16' - react-dev-utils@12.0.1: resolution: {integrity: sha512-84Ivxmr17KjUupyqzFode6xKhjwuEJDROWKJy/BthkL7Wn6NJ8h4WE6k/exAv6ImS+0oZLRRW5j/aINMHyeGeQ==} engines: {node: '>=14'} @@ -9766,34 +9741,66 @@ snapshots: dependencies: '@babel/core': 7.23.7 + '@svgr/babel-plugin-add-jsx-attribute@8.0.0(@babel/core@7.24.5)': + dependencies: + '@babel/core': 7.24.5 + '@svgr/babel-plugin-remove-jsx-attribute@8.0.0(@babel/core@7.23.7)': dependencies: '@babel/core': 7.23.7 + '@svgr/babel-plugin-remove-jsx-attribute@8.0.0(@babel/core@7.24.5)': + dependencies: + '@babel/core': 7.24.5 + '@svgr/babel-plugin-remove-jsx-empty-expression@8.0.0(@babel/core@7.23.7)': dependencies: '@babel/core': 7.23.7 + '@svgr/babel-plugin-remove-jsx-empty-expression@8.0.0(@babel/core@7.24.5)': + dependencies: + '@babel/core': 7.24.5 + '@svgr/babel-plugin-replace-jsx-attribute-value@8.0.0(@babel/core@7.23.7)': dependencies: '@babel/core': 7.23.7 + '@svgr/babel-plugin-replace-jsx-attribute-value@8.0.0(@babel/core@7.24.5)': + dependencies: + '@babel/core': 7.24.5 + '@svgr/babel-plugin-svg-dynamic-title@8.0.0(@babel/core@7.23.7)': dependencies: '@babel/core': 7.23.7 + '@svgr/babel-plugin-svg-dynamic-title@8.0.0(@babel/core@7.24.5)': + dependencies: + '@babel/core': 7.24.5 + '@svgr/babel-plugin-svg-em-dimensions@8.0.0(@babel/core@7.23.7)': dependencies: '@babel/core': 7.23.7 + '@svgr/babel-plugin-svg-em-dimensions@8.0.0(@babel/core@7.24.5)': + dependencies: + '@babel/core': 7.24.5 + '@svgr/babel-plugin-transform-react-native-svg@8.1.0(@babel/core@7.23.7)': dependencies: '@babel/core': 7.23.7 + '@svgr/babel-plugin-transform-react-native-svg@8.1.0(@babel/core@7.24.5)': + dependencies: + '@babel/core': 7.24.5 + '@svgr/babel-plugin-transform-svg-component@8.0.0(@babel/core@7.23.7)': dependencies: '@babel/core': 7.23.7 + '@svgr/babel-plugin-transform-svg-component@8.0.0(@babel/core@7.24.5)': + dependencies: + '@babel/core': 7.24.5 + '@svgr/babel-preset@8.1.0(@babel/core@7.23.7)': dependencies: '@babel/core': 7.23.7 @@ -9806,10 +9813,22 @@ snapshots: '@svgr/babel-plugin-transform-react-native-svg': 8.1.0(@babel/core@7.23.7) '@svgr/babel-plugin-transform-svg-component': 8.0.0(@babel/core@7.23.7) + '@svgr/babel-preset@8.1.0(@babel/core@7.24.5)': + dependencies: + '@babel/core': 7.24.5 + '@svgr/babel-plugin-add-jsx-attribute': 8.0.0(@babel/core@7.24.5) + '@svgr/babel-plugin-remove-jsx-attribute': 8.0.0(@babel/core@7.24.5) + '@svgr/babel-plugin-remove-jsx-empty-expression': 8.0.0(@babel/core@7.24.5) + '@svgr/babel-plugin-replace-jsx-attribute-value': 8.0.0(@babel/core@7.24.5) + '@svgr/babel-plugin-svg-dynamic-title': 8.0.0(@babel/core@7.24.5) + '@svgr/babel-plugin-svg-em-dimensions': 8.0.0(@babel/core@7.24.5) + '@svgr/babel-plugin-transform-react-native-svg': 8.1.0(@babel/core@7.24.5) + '@svgr/babel-plugin-transform-svg-component': 8.0.0(@babel/core@7.24.5) + '@svgr/core@8.1.0(typescript@5.5.3)': dependencies: - '@babel/core': 7.23.7 - '@svgr/babel-preset': 8.1.0(@babel/core@7.23.7) + '@babel/core': 7.24.5 + '@svgr/babel-preset': 8.1.0(@babel/core@7.24.5) camelcase: 6.3.0 cosmiconfig: 8.3.6(typescript@5.5.3) snake-case: 3.0.4 @@ -11260,8 +11279,6 @@ snapshots: dependencies: esutils: 2.0.3 - docusaurus-plugin-hotjar@0.0.2: {} - docusaurus-plugin-sass@0.2.5(@docusaurus/core@3.3.2(@docusaurus/types@3.3.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(eslint@7.32.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3))(sass@1.69.7)(webpack@5.91.0): dependencies: '@docusaurus/core': 3.3.2(@docusaurus/types@3.3.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(eslint@7.32.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(typescript@5.5.3) @@ -12734,10 +12751,6 @@ snapshots: '@sideway/formula': 3.0.1 '@sideway/pinpoint': 2.0.0 - js-cookie@2.2.1: {} - - js-cookie@3.0.5: {} - js-tokens@4.0.0: {} js-yaml@3.14.1: @@ -14199,11 +14212,6 @@ snapshots: minimist: 1.2.8 strip-json-comments: 2.0.1 - react-cookie-consent@8.0.1(react@18.3.1): - dependencies: - js-cookie: 2.2.1 - react: 18.3.1 - react-dev-utils@12.0.1(eslint@7.32.0)(typescript@5.5.3)(webpack@5.91.0): dependencies: '@babel/code-frame': 7.24.2 diff --git a/src/entities/example/index.tsx b/src/entities/example/index.tsx index 2fff516e19..f954cc564f 100644 --- a/src/entities/example/index.tsx +++ b/src/entities/example/index.tsx @@ -1,7 +1,6 @@ import React, { useCallback } from "react"; import clsx from "clsx"; import Image from "@theme/IdealImage"; -import { ga } from "@site/src/shared/lib/ga"; import { date } from "@site/src/shared/lib/date"; import styles from "./styles.module.scss"; @@ -22,20 +21,6 @@ type Props = { export const ExampleCard: React.FC = ({ className, data }) => { const isNew = date.getDiffDays(new Date(data.updatedAt), new Date()) <= 14; - const handleWebsiteClick = useCallback(() => { - ga.sendEvent({ - category: ga.CATEGORIES.full, - action: "Example:Click", - label: `${data.title} [website]`, - }); - }, []); - const handleSourceClick = useCallback(() => { - ga.sendEvent({ - category: ga.CATEGORIES.full, - action: "Example:Click", - label: `${data.title} [source]`, - }); - }, []); return (
@@ -78,7 +63,6 @@ export const ExampleCard: React.FC = ({ className, data }) => { href={data.website} target="_blank" rel="noreferrer noopener" - onClick={handleWebsiteClick} > Website @@ -89,7 +73,6 @@ export const ExampleCard: React.FC = ({ className, data }) => { href={data.source} target="_blank" rel="noreferrer noopener" - onClick={handleSourceClick} > Source diff --git a/src/entities/exp/index.ts b/src/entities/exp/index.ts deleted file mode 100644 index ab5e11a1d7..0000000000 --- a/src/entities/exp/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -import cookies from "js-cookie"; - -/** - * Inner lib for silent deployment of new features - * @remark For example - for "checking on production", before global deployment - * @module - */ - -const EXP_COOKIE_KEY = "exp_flag"; - -/** - * @ticket FEEDBACK-309 - */ -export const DOC_FEEDBACK_WIDGET = "doc_feedback_widget"; - -export const hasExp = (expFlag: string) => { - return cookies.get(EXP_COOKIE_KEY, expFlag); -}; diff --git a/src/features/cookie-consent/index.tsx b/src/features/cookie-consent/index.tsx deleted file mode 100644 index 19dc0221cc..0000000000 --- a/src/features/cookie-consent/index.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import React from "react"; -import ReactCookieConsent from "react-cookie-consent"; -import Link from "@docusaurus/Link"; -import { translate } from "@docusaurus/Translate"; - -import styles from "./styles.module.scss"; - -export const CookieConsent = () => { - return ( - - {translate({ id: "features.cookie-consent.alert" })} - - {" "} - ({translate({ id: "features.cookie-consent.reason" })}) - - - ); -}; diff --git a/src/features/cookie-consent/styles.module.scss b/src/features/cookie-consent/styles.module.scss deleted file mode 100644 index c8dbaa302a..0000000000 --- a/src/features/cookie-consent/styles.module.scss +++ /dev/null @@ -1,33 +0,0 @@ -/* !important overridings because of react-cookie-consent selectors-specifity */ - -.root { - color: var(--ifm-font-color-base) !important; - background-color: var(--ifm-background-surface-color) !important; - box-shadow: 0 4px 8px 0 rgb(0 0 0 / 30%); -} - -.button { - padding: var(--ifm-button-padding-vertical) - var(--ifm-button-padding-horizontal) !important; - margin: 8px !important; - color: var(--ifm-button-color) !important; - background: var(--ifm-color-primary-dark) !important; - border-radius: var(--ifm-button-border-radius) !important; - transition: 0.25s; - - &:hover { - opacity: 0.7; - } -} - -@media (width <= 460px) { - .buttonWrapper { - flex-grow: 1; - text-align: center; - } - - .content { - margin-bottom: 4px !important; - text-align: center; - } -} diff --git a/src/shared/lib/ga/ga.ts b/src/shared/lib/ga/ga.ts deleted file mode 100644 index 54d16c8132..0000000000 --- a/src/shared/lib/ga/ga.ts +++ /dev/null @@ -1,25 +0,0 @@ -type EventOptions = { - category: string; - action?: string; - label: string; - value?: number; -}; - -export const sendEvent = ({ category, action, label, value }: EventOptions) => { - if (typeof window === undefined) return; - if (!window.ga) return; - - return window.ga("send", { - hitType: "event", - eventCategory: category, - eventAction: action, - eventLabel: label, - eventValue: value, - }); -}; - -export const CATEGORIES = { - full: "Feedback 1.2 (full)", - mixed: "Feedback 1.2 (mixed)", - short: "Feedback 1.2 (short)", -}; diff --git a/src/shared/lib/ga/index.ts b/src/shared/lib/ga/index.ts deleted file mode 100644 index 4d5303778f..0000000000 --- a/src/shared/lib/ga/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * as ga from "./ga"; diff --git a/src/shared/ui/nav-card/index.tsx b/src/shared/ui/nav-card/index.tsx index 68483c7fa4..e69b9d2aa5 100644 --- a/src/shared/ui/nav-card/index.tsx +++ b/src/shared/ui/nav-card/index.tsx @@ -1,8 +1,7 @@ -import React, { useCallback } from "react"; +import React from "react"; import clsx from "clsx"; import Link from "@docusaurus/Link"; -import { ga } from "@site/src/shared/lib/ga"; import styles from "./styles.module.scss"; type Props = { @@ -31,14 +30,6 @@ export const NavCard: React.FC = (props) => { disabled, theme = "default", } = props; - const handleClick = useCallback(() => { - ga.sendEvent({ - category: ga.CATEGORIES.full, - // FIXME: get later from props - action: "NavRow:Click", - label: to, - }); - }, [to]); return ( = (props) => { styles[`${theme}Theme`], )} to={to} - onClick={handleClick} >
diff --git a/src/theme/Root.js b/src/theme/Root.js deleted file mode 100644 index db88b17537..0000000000 --- a/src/theme/Root.js +++ /dev/null @@ -1,18 +0,0 @@ -import React from "react"; -import { CookieConsent } from "@site/src/features/cookie-consent"; - -// Default implementation, that you can customize -// https://docusaurus.io/docs/using-themes#wrapper-your-site-with-root - -function Root({ children }) { - return ( - <> - {children} - {/* NOTE: exp with HotJar feedback widget (FEEDBACK-325) */} - {/* */} - - - ); -} - -export default Root;