Repository: zulip/zulip

Issue:
Rename Recent topics to Recent conversations
Once #19449 has been resolved, we should rename Recent topics to Recent conversations across the board. This includes the left sidebar, documentation, settings menus, marketing pages, and anywhere else this term may be used.


Discussion:
Hello @zulip/server-misc, @zulip/server-sidebars, @zulip/server-user-docs members, this issue was labeled with the "area: left-sidebar", "area: documentation (user)", "area: portico" labels, so you may want to check it out!

<!-- areaLabelAddition -->

@zulipbot claim

Hello @akarsh-jain-790!

Thanks for your interest in Zulip! You have attempted to claim an issue without the label "help wanted". You can only claim and submit pull requests for issues with the [help wanted](https://github.com/zulip/zulip/issues?q=is%3Aopen+is%3Aissue+no%3Aassignee+label%3A%22help+wanted%22) label.

If this is your first time here, we recommend reading our [guide for new contributors](https://zulip.readthedocs.io/en/latest/overview/contributing.html) before getting started.

@laurynmm adding this one to your list.
Just to clarify as I start prep work for these updates, is the URL hash of `#recent_topics` part of this task/issue, see screenshot below? Or is this just updating the text instances of "Recent topics" as user-facing text in the web-app and documentation?

I feel like doing the URL hash change will be more involved than just the text updates after reading through [this part](https://zulip.readthedocs.io/en/latest/subsystems/hashchange-system.html) of the subsystems documentation.

---

**Recent topics URL screenshot**:

![Screenshot from 2022-10-10 14-36-17](https://user-images.githubusercontent.com/63245456/194867667-db4f1d03-b271-4698-bebd-875f795f908d.png)

I think we probably do want to change that. My proposal would be to change it to just `#recent`, with semi-permanent `hashchange.js` code (with a TODO/compatibility comment noting that making the `reload.js` logic work after upgrades for self-hosted systems means we need to keep this logic for a couple years) for treating the old `#recent_topics` as `#recent` and then rewriting the URL. And then we'll likely need a database migration to change `#recent_topics` to `#recent` in the "default view" columns in both UserProfile and RealmUserDefault, since that stores the default views as strings.

That hashchange logic change probably makes sense to be its own commit.
@laurynmm one thought I had is that I think we don't want to deploy the Recent topics addition of private messages to Zulip Cloud or include in a beta before we change the "Recent topics" strings to "Recent conversations"; but changing the URL is probably not a blocker. So maybe it makes sense to do this in the form of two PRs, first one to just change the strings and a second to change the less visible (but more complex to change) details.
Sounds great to me!

Resolving patch:
diff --git a/zerver/lib/onboarding.py b/zerver/lib/onboarding.py
--- a/zerver/lib/onboarding.py
+++ b/zerver/lib/onboarding.py
@@ -154,7 +154,7 @@ def select_welcome_bot_response(human_response_lower: str) -> str:
                 )
                 + "\n\n",
                 _(
-                    "Check out [Recent conversations](#recent_topics) to see what's happening! "
+                    "Check out [Recent conversations](#recent) to see what's happening! "
                     'You can return to this conversation by clicking "Private messages" in the upper left.'
                 ),
             ]


Test patch:
diff --git a/frontend_tests/node_tests/hashchange.js b/frontend_tests/node_tests/hashchange.js
--- a/frontend_tests/node_tests/hashchange.js
+++ b/frontend_tests/node_tests/hashchange.js
@@ -205,6 +205,19 @@ run_test("hash_interactions", ({override}) => {
         [floating_recipient_bar, "update"],
     ]);
 
+    // Test old "#recent_topics" hash redirects to "#recent".
+    recent_topics_ui_shown = false;
+    window.location.hash = "#recent_topics";
+
+    helper.clear_events();
+    $window_stub.trigger("hashchange");
+    assert.equal(recent_topics_ui_shown, true);
+    helper.assert_events([
+        [overlays, "close_for_hash_change"],
+        [message_viewport, "stop_auto_scrolling"],
+    ]);
+    assert.equal(window.location.hash, "#recent");
+
     window.location.hash = "#narrow/stream/Denmark";
 
     helper.clear_events();
diff --git a/zerver/tests/test_tutorial.py b/zerver/tests/test_tutorial.py
--- a/zerver/tests/test_tutorial.py
+++ b/zerver/tests/test_tutorial.py
@@ -98,7 +98,7 @@ def test_response_to_pm_for_topic(self) -> None:
             expected_response = (
                 "In Zulip, topics [tell you what a message is about](/help/streams-and-topics). "
                 "They are light-weight subjects, very similar to the subject line of an email.\n\n"
-                "Check out [Recent conversations](#recent_topics) to see what's happening! "
+                "Check out [Recent conversations](#recent) to see what's happening! "
                 'You can return to this conversation by clicking "Private messages" in the upper left.'
             )
             self.assertEqual(most_recent_message(user).content, expected_response)