search: Add setting to control whether search pills are enabled.

This setting isn't intended to exist long term, but instead to make it
possible to merge our search pills code before we're ready to cut over
production environments to use it.
This commit is contained in:
Tim Abbott 2018-07-14 15:02:08 +05:30
parent 5e93922a7d
commit 8dca8f1087
4 changed files with 7 additions and 0 deletions

View File

@ -162,6 +162,7 @@ class HomeTest(ZulipTestCase):
"realm_waiting_period_threshold",
"root_domain_uri",
"save_stacktraces",
"search_pills_enabled",
"server_generation",
"server_inline_image_preview",
"server_inline_url_embed_preview",

View File

@ -198,6 +198,7 @@ def home_real(request: HttpRequest) -> HttpResponse:
password_min_length = settings.PASSWORD_MIN_LENGTH,
password_min_guesses = settings.PASSWORD_MIN_GUESSES,
jitsi_server_url = settings.JITSI_SERVER_URL,
search_pills_enabled = settings.SEARCH_PILLS_ENABLED,
# Misc. extra data.
have_initial_messages = user_has_messages,

View File

@ -89,3 +89,5 @@ SENDFILE_BACKEND = 'sendfile.backends.development'
ALWAYS_SEND_ALL_HOTSPOTS = False # type: bool
THUMBOR_URL = 'http://127.0.0.1:9995'
SEARCH_PILLS_ENABLED = os.getenv('SEARCH_PILLS_ENABLED', False)

View File

@ -221,6 +221,9 @@ DEFAULT_SETTINGS = {
# in development mode.
'ALWAYS_SEND_ALL_HOTSPOTS': False,
# In-development search pills feature.
'SEARCH_PILLS_ENABLED': False,
# We use SubMessage for now-experimental features like
# slash commands.
'ALLOW_SUB_MESSAGES': DEVELOPMENT,