diff --git a/web/src/hash_parser.ts b/web/src/hash_parser.ts index 84fd3efb98..2a4ad27e84 100644 --- a/web/src/hash_parser.ts +++ b/web/src/hash_parser.ts @@ -119,7 +119,11 @@ export function is_spectator_compatible(hash: string): boolean { "keyboard-shortcuts", "message-formatting", "search-operators", + // TODO/compatibility: #all_messages was renamed to #feed + // in 2024. We should support the old URL fragment at least + // until one cannot directly upgrade from Zulip 8.x. "all_messages", + "feed", "about-zulip", ]; diff --git a/web/src/hashchange.js b/web/src/hashchange.js index 237b4d205e..4895cb0684 100644 --- a/web/src/hashchange.js +++ b/web/src/hashchange.js @@ -76,6 +76,10 @@ export function set_hash_to_home_view() { home_view_hash = "#recent"; } + if (home_view_hash === "#all_messages") { + home_view_hash = "#feed"; + } + if (window.location.hash !== home_view_hash) { // We want to set URL with no hash here. It is not possible // to do so with `window.location.hash` since it will set an empty @@ -197,6 +201,14 @@ function do_hashchange_normal(from_reload) { inbox_ui.show(); break; case "#all_messages": + // "#all_messages" was renamed to "#feed" in 2024. Unlike + // the recent hash rename, there are likely few links that + // would break if this compatibility code was removed, but + // there's little cost to keeping it. + show_all_message_view(); + window.location.replace("#feed"); + break; + case "#feed": show_all_message_view(); break; case "#keyboard-shortcuts": diff --git a/web/src/hotkey.js b/web/src/hotkey.js index 642d846304..0071db5beb 100644 --- a/web/src/hotkey.js +++ b/web/src/hotkey.js @@ -172,7 +172,8 @@ const keypress_mappings = { 83: {name: "toggle_stream_subscription", message_view_only: true}, // 'S' 85: {name: "mark_unread", message_view_only: true}, // 'U' 86: {name: "view_selected_stream", message_view_only: false}, // 'V' - 97: {name: "all_messages", message_view_only: true}, // 'a' + // The shortcut "a" dates from when this was called "All messages". + 97: {name: "open_combined_feed", message_view_only: true}, // 'a' 99: {name: "compose", message_view_only: true}, // 'c' 100: {name: "open_drafts", message_view_only: true}, // 'd' 101: {name: "edit_message", message_view_only: true}, // 'e' @@ -972,8 +973,8 @@ export function process_hotkey(e, hotkey) { case "open_inbox": browser_history.go_to_location("#inbox"); return true; - case "all_messages": - browser_history.go_to_location("#all_messages"); + case "open_combined_feed": + browser_history.go_to_location("#feed"); return true; case "toggle_topic_visibility_policy": if (recent_view_ui.is_in_focus()) { diff --git a/web/templates/left_sidebar.hbs b/web/templates/left_sidebar.hbs index ebff80e735..02a5fc4c96 100644 --- a/web/templates/left_sidebar.hbs +++ b/web/templates/left_sidebar.hbs @@ -22,7 +22,7 @@