From 8ffe22fc15e91593981b4a0dd08d795b2a361b7c Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Wed, 7 Jul 2021 12:50:46 +0000 Subject: [PATCH] slash commands: Remove /settings command. It's easy enough for power keyboard users to just use "g" to get to settings, and it's certainly easier for mouse users to just go to the menu. --- docs/subsystems/slash-commands.md | 1 - frontend_tests/node_tests/composebox_typeahead.js | 6 ------ static/js/composebox_typeahead.js | 4 ---- static/js/zcommand.js | 6 ------ 4 files changed, 17 deletions(-) diff --git a/docs/subsystems/slash-commands.md b/docs/subsystems/slash-commands.md index 95a9f13974..722c6e6ad0 100644 --- a/docs/subsystems/slash-commands.md +++ b/docs/subsystems/slash-commands.md @@ -10,7 +10,6 @@ Currently supported slash commands are: - `/ping` to ping to server and get back the time for the round trip. Mainly for testing. - `/fluid-width` and `/fixed-width` to toggle that setting -- `/settings` to open the settings page It is important to distinguish slash commands from the [widget system](/subsystems/widgets.md). Slash commands essentially diff --git a/frontend_tests/node_tests/composebox_typeahead.js b/frontend_tests/node_tests/composebox_typeahead.js index 195fd6de33..4562a79973 100644 --- a/frontend_tests/node_tests/composebox_typeahead.js +++ b/frontend_tests/node_tests/composebox_typeahead.js @@ -161,11 +161,6 @@ const my_slash = { text: "translated: /my (Test)", }; -const settings_slash = { - name: "settings", - text: "translated: /settings (Load settings menu)", -}; - const sweden_stream = { name: "Sweden", description: "Cold, mountains and home decor.", @@ -1522,7 +1517,6 @@ test("typeahead_results", () => { // Autocomplete by slash commands. assert_slash_matches("me", [me_slash]); - assert_slash_matches("settings", [settings_slash]); // Autocomplete stream by stream name or stream description. assert_stream_matches("den", [denmark_stream, sweden_stream]); diff --git a/static/js/composebox_typeahead.js b/static/js/composebox_typeahead.js index edf20b8fd3..d8edbe19d8 100644 --- a/static/js/composebox_typeahead.js +++ b/static/js/composebox_typeahead.js @@ -408,10 +408,6 @@ export const slash_commands = [ text: $t({defaultMessage: "/poll Where should we go to lunch today? (Create a poll)"}), name: "poll", }, - { - text: $t({defaultMessage: "/settings (Load settings menu)"}), - name: "settings", - }, { text: $t({defaultMessage: "/todo (Create a todo list)"}), name: "todo", diff --git a/static/js/zcommand.js b/static/js/zcommand.js index a663b6fdb1..d422ff950e 100644 --- a/static/js/zcommand.js +++ b/static/js/zcommand.js @@ -2,7 +2,6 @@ import $ from "jquery"; import marked from "../third/marked/lib/marked"; -import * as browser_history from "./browser_history"; import * as channel from "./channel"; import * as common from "./common"; import * as feedback_widget from "./feedback_widget"; @@ -189,11 +188,6 @@ export function process(message_content) { return true; } - if (content === "/settings") { - browser_history.go_to_location("settings/your-account"); - return true; - } - // It is incredibly important here to return false // if we don't see an actual zcommand, so that compose.js // knows this is a normal message.