From 83ee649e8295c080a3974e6a7ced2d45a47244d0 Mon Sep 17 00:00:00 2001 From: Kevin Ansfield Date: Thu, 13 Jun 2024 17:21:52 +0100 Subject: [PATCH] Added improved search into internal linking beta closes https://linear.app/tryghost/issue/MOM-117 closes https://linear.app/tryghost/issue/MOM-70 - updated flag handling to move the improved search into the `internalLinking` beta flag - removed now-unused `internalLinkingSearchImprovements` flag --- .../src/components/settings/advanced/labs/AlphaFeatures.tsx | 4 ---- ghost/admin/app/services/feature.js | 1 - ghost/admin/app/services/search.js | 2 +- ghost/admin/tests/acceptance/search-test.js | 2 +- ghost/admin/tests/integration/services/search-test.js | 2 +- ghost/core/core/shared/labs.js | 1 - 6 files changed, 3 insertions(+), 9 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 cb68ffec8b..3256fc4474 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 @@ -63,10 +63,6 @@ const features = [{ title: 'Internal Linking @-links (internal alpha)', description: 'Adds internal URL search when typing @ in the editor', flag: 'internalLinkingAtLinks' -},{ - title: 'Internal Linking search improvements (internal alpha)', - description: 'Replaces Admin\'s search with flexsearch indexes', - flag: 'internalLinkingSearchImprovements' },{ title: 'ActivityPub', description: '(Highly) Experimental support for ActivityPub.', diff --git a/ghost/admin/app/services/feature.js b/ghost/admin/app/services/feature.js index c03ea86c3a..f9c6010f5d 100644 --- a/ghost/admin/app/services/feature.js +++ b/ghost/admin/app/services/feature.js @@ -84,7 +84,6 @@ export default class FeatureService extends Service { @feature('ActivityPub') ActivityPub; @feature('internalLinking') internalLinking; @feature('internalLinkingAtLinks') internalLinkingAtLinks; - @feature('internalLinkingSearchImprovements') internalLinkingSearchImprovements; @feature('editorExcerpt') editorExcerpt; @feature('newsletterExcerpt') newsletterExcerpt; diff --git a/ghost/admin/app/services/search.js b/ghost/admin/app/services/search.js index c90b6bef02..2ba14e6367 100644 --- a/ghost/admin/app/services/search.js +++ b/ghost/admin/app/services/search.js @@ -15,7 +15,7 @@ export default class SearchService extends Service { isContentStale = true; get provider() { - return this.feature.internalLinkingSearchImprovements + return this.feature.internalLinking ? this.searchProviderBeta : this.searchProvider; } diff --git a/ghost/admin/tests/acceptance/search-test.js b/ghost/admin/tests/acceptance/search-test.js index cadd463cf0..3e025285be 100644 --- a/ghost/admin/tests/acceptance/search-test.js +++ b/ghost/admin/tests/acceptance/search-test.js @@ -17,7 +17,7 @@ const suites = [{ }, { name: 'Acceptance: Search (beta)', beforeEach() { - enableLabsFlag(this.server, 'internalLinkingSearchImprovements'); + enableLabsFlag(this.server, 'internalLinking'); } }]; diff --git a/ghost/admin/tests/integration/services/search-test.js b/ghost/admin/tests/integration/services/search-test.js index a3a53aa255..ce453fdeda 100644 --- a/ghost/admin/tests/integration/services/search-test.js +++ b/ghost/admin/tests/integration/services/search-test.js @@ -12,7 +12,7 @@ const suites = [{ }, { name: 'Integration: Service: Search (beta)', beforeEach() { - enableLabsFlag(this.server, 'internalLinkingSearchImprovements'); + enableLabsFlag(this.server, 'internalLinking'); } }]; diff --git a/ghost/core/core/shared/labs.js b/ghost/core/core/shared/labs.js index 924d56f5ff..9bad63298c 100644 --- a/ghost/core/core/shared/labs.js +++ b/ghost/core/core/shared/labs.js @@ -55,7 +55,6 @@ const ALPHA_FEATURES = [ 'lexicalIndicators', 'adminXDemo', 'internalLinkingAtLinks', - 'internalLinkingSearchImprovements', 'contentVisibility' ];