From 44446afe584f8b996c70c2b3be9e9480692651e8 Mon Sep 17 00:00:00 2001 From: Martin Brennan Date: Wed, 7 Jun 2023 11:11:39 +1000 Subject: [PATCH] FEATURE: Use new hashtag autocomplete system on all sites (#21788) Followup to: * 7c975481597c46ba1064b37f8f4627da82c5b689 * 0b3cf83e3c7d03c2dcd54f86de60efe32f385a44 * eae47d82e22189646ce1b29ea2f3b5b2f8b64312 This commit enables the no-longer-experimental hashtag autocomplete changes for all sites. It is now at a point where it is ready to be promoted to the only way, and following this commit all old hashtag code will be deleted c.f. https://meta.discourse.org/t/hashtags-are-getting-a-makeover/248866 --- config/site_settings.yml | 1 + ...tal_hashtag_autocomplete_true_for_all_sites.rb | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 db/migrate/20230528134326_enable_experimental_hashtag_autocomplete_true_for_all_sites.rb diff --git a/config/site_settings.yml b/config/site_settings.yml index b4cefc973c9..1fb0855f63e 100644 --- a/config/site_settings.yml +++ b/config/site_settings.yml @@ -2090,6 +2090,7 @@ developer: enable_experimental_hashtag_autocomplete: default: true client: true + hidden: true experimental_hashtag_search_result_limit: default: 20 client: true diff --git a/db/migrate/20230528134326_enable_experimental_hashtag_autocomplete_true_for_all_sites.rb b/db/migrate/20230528134326_enable_experimental_hashtag_autocomplete_true_for_all_sites.rb new file mode 100644 index 00000000000..7e40e260a4f --- /dev/null +++ b/db/migrate/20230528134326_enable_experimental_hashtag_autocomplete_true_for_all_sites.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class EnableExperimentalHashtagAutocompleteTrueForAllSites < ActiveRecord::Migration[7.0] + def up + DB.exec(<<~SQL) + UPDATE site_settings + SET value = 't' + WHERE name = 'enable_experimental_hashtag_autocomplete' + SQL + end + + def down + raise ActiveRecord::IrreversibleMigration + end +end