From 5c43945b949031d0f374da25bbad81bfecb728f5 Mon Sep 17 00:00:00 2001 From: Sag Date: Wed, 18 Oct 2023 14:03:35 -0300 Subject: [PATCH] Revert "Added Recommendations feature (#18664)" (#18694) refs https://github.com/TryGhost/Product/issues/3744 - this reverts GA commit 4e338114de20957535100bb6914cc0e4590312fd, as launch has been postponed by a week --- .../settings/advanced/labs/AlphaFeatures.tsx | 4 ++++ apps/admin-x-settings/test/utils/acceptance.ts | 1 + ghost/admin/app/templates/settings/labs.hbs | 14 ++++++++++++++ ghost/core/core/shared/labs.js | 4 ++-- .../admin/__snapshots__/settings.test.js.snap | 2 +- 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/apps/admin-x-settings/src/components/settings/advanced/labs/AlphaFeatures.tsx b/apps/admin-x-settings/src/components/settings/advanced/labs/AlphaFeatures.tsx index 9e990c582e..fef58eb0e4 100644 --- a/apps/admin-x-settings/src/components/settings/advanced/labs/AlphaFeatures.tsx +++ b/apps/admin-x-settings/src/components/settings/advanced/labs/AlphaFeatures.tsx @@ -47,6 +47,10 @@ const features = [{ title: 'Tips & donations', description: 'Enables publishers to collect one-time payments', flag: 'tipsAndDonations' +},{ + title: 'Recommendations', + description: 'Enables publishers to recommend sites to their audience', + flag: 'recommendations' }]; const AlphaFeatures: React.FC = () => { diff --git a/apps/admin-x-settings/test/utils/acceptance.ts b/apps/admin-x-settings/test/utils/acceptance.ts index 031b25251a..8205faf584 100644 --- a/apps/admin-x-settings/test/utils/acceptance.ts +++ b/apps/admin-x-settings/test/utils/acceptance.ts @@ -50,6 +50,7 @@ export const responseFixtures = { }; let defaultLabFlags = { + recommendations: false, audienceFeedback: false, collections: false, themeErrorsNotification: false, diff --git a/ghost/admin/app/templates/settings/labs.hbs b/ghost/admin/app/templates/settings/labs.hbs index 46dbf086fc..ae43c6a89b 100644 --- a/ghost/admin/app/templates/settings/labs.hbs +++ b/ghost/admin/app/templates/settings/labs.hbs @@ -351,6 +351,20 @@ + +
+
+
+

Recommendations

+

+ Enables publishers to recommend sites to their audience +

+
+
+ +
+
+
{{/if}} diff --git a/ghost/core/core/shared/labs.js b/ghost/core/core/shared/labs.js index ca7ae3d9b2..754a546323 100644 --- a/ghost/core/core/shared/labs.js +++ b/ghost/core/core/shared/labs.js @@ -20,8 +20,7 @@ const GA_FEATURES = [ 'outboundLinkTagging', 'announcementBar', 'signupForm', - 'lexicalEditor', - 'recommendations' + 'lexicalEditor' ]; // NOTE: this allowlist is meant to be used to filter out any unexpected @@ -42,6 +41,7 @@ const ALPHA_FEATURES = [ 'collectionsCard', 'tipsAndDonations', 'importMemberTier', + 'recommendations', 'lexicalIndicators' ]; diff --git a/ghost/core/test/e2e-api/admin/__snapshots__/settings.test.js.snap b/ghost/core/test/e2e-api/admin/__snapshots__/settings.test.js.snap index 4f51b3093c..89d8ddd453 100644 --- a/ghost/core/test/e2e-api/admin/__snapshots__/settings.test.js.snap +++ b/ghost/core/test/e2e-api/admin/__snapshots__/settings.test.js.snap @@ -758,7 +758,7 @@ exports[`Settings API Edit Can edit a setting 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "4303", + "content-length": "4278", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/,