From f31a50270d438e5f080748f1e684366a63026e87 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Tue, 20 Sep 2022 14:18:05 +0100 Subject: [PATCH] Removed search labs flag - the search helper was promoted to GA and we no longer need the feature flag --- ghost/admin/app/services/feature.js | 1 - ghost/admin/app/templates/settings/labs.hbs | 13 ------------- ghost/core/core/frontend/helpers/search.js | 16 +--------------- .../test/unit/frontend/helpers/search.test.js | 4 ---- 4 files changed, 1 insertion(+), 33 deletions(-) diff --git a/ghost/admin/app/services/feature.js b/ghost/admin/app/services/feature.js index fafa015b96..36759a6966 100644 --- a/ghost/admin/app/services/feature.js +++ b/ghost/admin/app/services/feature.js @@ -62,7 +62,6 @@ export default class FeatureService extends Service { @feature('freeTrial') freeTrial; @feature('compExpiring') compExpiring; @feature('memberAttribution') memberAttribution; - @feature('searchHelper') searchHelper; @feature('emailAlerts') emailAlerts; @feature('emailClicks') emailClicks; @feature('sourceAttribution') sourceAttribution; diff --git a/ghost/admin/app/templates/settings/labs.hbs b/ghost/admin/app/templates/settings/labs.hbs index 35f1e2707f..a6090031b6 100644 --- a/ghost/admin/app/templates/settings/labs.hbs +++ b/ghost/admin/app/templates/settings/labs.hbs @@ -239,19 +239,6 @@ -
-
-
-

Search helper

-

- Enable the {{search}} handlebars helper. -

-
-
- -
-
-
diff --git a/ghost/core/core/frontend/helpers/search.js b/ghost/core/core/frontend/helpers/search.js index 477a3c9c7e..5ad60a9a5b 100644 --- a/ghost/core/core/frontend/helpers/search.js +++ b/ghost/core/core/frontend/helpers/search.js @@ -1,9 +1,8 @@ // # search helper const {SafeString} = require('../services/handlebars'); -const {labs} = require('../services/proxy'); -function search() { +module.exports = function search() { // We want this to output as one line, but splitting for readability const svg = ''; return new SafeString(svg); -} - -module.exports = function searchLabsWrapper() { - let self = this; - let args = arguments; - - return labs.enabledHelper({ - flagKey: 'searchHelper', - flagName: 'Search helper', - helperName: 'search' - }, () => { - return search.apply(self, args); // eslint-disable-line camelcase - }); }; diff --git a/ghost/core/test/unit/frontend/helpers/search.test.js b/ghost/core/test/unit/frontend/helpers/search.test.js index 2bfc6ae0d2..cf549bb4e7 100644 --- a/ghost/core/test/unit/frontend/helpers/search.test.js +++ b/ghost/core/test/unit/frontend/helpers/search.test.js @@ -9,10 +9,6 @@ describe('Search helper', function () { handlebars.registerHelper('search', searchHelper); }); - beforeEach(function () { - sinon.stub(labs, 'isSet').returns(true); - }); - afterEach(function () { sinon.restore(); });