Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

shared: Move resolved_topic.ts to web/src.

Shubham Padia784b84cd7fca
diff --git a/web/src/compose_setup.ts b/web/src/compose_setup.ts
index e74ecec82ff..3d3877ce2f1 100644
--- a/web/src/compose_setup.ts
+++ b/web/src/compose_setup.ts
@@ -3,7 +3,6 @@ import _ from "lodash";
import assert from "minimalistic-assert";
import * as z from "zod/mini";
-import {unresolve_name} from "../shared/src/resolved_topic.ts";
import render_add_poll_modal from "../templates/add_poll_modal.hbs";
import render_add_todo_list_modal from "../templates/add_todo_list_modal.hbs";
@@ -31,6 +30,7 @@ import * as onboarding_steps from "./onboarding_steps.ts";
import {page_params} from "./page_params.ts";
import * as popovers from "./popovers.ts";
import * as resize from "./resize.ts";
+import {unresolve_name} from "./resolved_topic.ts";
import * as rows from "./rows.ts";
import * as scheduled_messages from "./scheduled_messages.ts";
import * as stream_data from "./stream_data.ts";
diff --git a/web/src/compose_validate.ts b/web/src/compose_validate.ts
index da435798b82..7cb7bf209dd 100644
--- a/web/src/compose_validate.ts
+++ b/web/src/compose_validate.ts
@@ -2,7 +2,6 @@ import $ from "jquery";
import _ from "lodash";
import type {ReferenceElement} from "tippy.js";
-import * as resolved_topic from "../shared/src/resolved_topic.ts";
import render_compose_banner from "../templates/compose_banner/compose_banner.hbs";
import render_compose_mention_group_warning from "../templates/compose_banner/compose_mention_group_warning.hbs";
import render_guest_in_dm_recipient_warning from "../templates/compose_banner/guest_in_dm_recipient_warning.hbs";
@@ -28,6 +27,7 @@ import * as peer_data from "./peer_data.ts";
import * as people from "./people.ts";
import * as reactions from "./reactions.ts";
import * as recent_senders from "./recent_senders.ts";
+import * as resolved_topic from "./resolved_topic.ts";
import * as settings_data from "./settings_data.ts";
import {current_user, realm} from "./state_data.ts";
import * as stream_data from "./stream_data.ts";
diff --git a/web/src/filter.ts b/web/src/filter.ts
index 8ba5e7a4bc6..369eb30f70e 100644
--- a/web/src/filter.ts
+++ b/web/src/filter.ts
@@ -1,7 +1,6 @@
import _ from "lodash";
import assert from "minimalistic-assert";
-import * as resolved_topic from "../shared/src/resolved_topic.ts";
import render_search_description from "../templates/search_description.hbs";
import * as blueslip from "./blueslip.ts";
@@ -15,6 +14,7 @@ import * as muted_users from "./muted_users.ts";
import {page_params} from "./page_params.ts";
import type {User} from "./people.ts";
import * as people from "./people.ts";
+import * as resolved_topic from "./resolved_topic.ts";
import type {UserPillItem} from "./search_suggestion.ts";
import {current_user, narrow_term_schema} from "./state_data.ts";
import type {NarrowTerm} from "./state_data.ts";
diff --git a/web/src/message_edit.ts b/web/src/message_edit.ts
index 07fa3236bd2..814ea8f2ecd 100644
--- a/web/src/message_edit.ts
+++ b/web/src/message_edit.ts
@@ -5,7 +5,6 @@ import assert from "minimalistic-assert";
import * as tippy from "tippy.js";
import * as z from "zod/mini";
-import * as resolved_topic from "../shared/src/resolved_topic.ts";
import render_wildcard_mention_not_allowed_error from "../templates/compose_banner/wildcard_mention_not_allowed_error.hbs";
import render_confirm_edit_messages from "../templates/confirm_dialog/confirm_edit_messages.hbs";
import render_confirm_merge_topics_with_rename from "../templates/confirm_dialog/confirm_merge_topics_with_rename.hbs";
@@ -48,6 +47,7 @@ import type {Message} from "./message_store.ts";
import * as message_viewport from "./message_viewport.ts";
import * as onboarding_steps from "./onboarding_steps.ts";
import * as resize from "./resize.ts";
+import * as resolved_topic from "./resolved_topic.ts";
import * as rows from "./rows.ts";
import * as saved_snippets_ui from "./saved_snippets_ui.ts";
import {current_user, realm} from "./state_data.ts";
diff --git a/web/src/message_events.ts b/web/src/message_events.ts
index 899a27d4f44..381ec3a938f 100644
--- a/web/src/message_events.ts
+++ b/web/src/message_events.ts
@@ -3,8 +3,6 @@ import _ from "lodash";
import assert from "minimalistic-assert";
import * as z from "zod/mini";
-import * as resolved_topic from "../shared/src/resolved_topic.ts";
-
import * as activity from "./activity.ts";
import * as alert_words from "./alert_words.ts";
import * as channel from "./channel.ts";
@@ -41,6 +39,7 @@ import * as pm_list from "./pm_list.ts";
import * as recent_senders from "./recent_senders.ts";
import * as recent_view_ui from "./recent_view_ui.ts";
import * as recent_view_util from "./recent_view_util.ts";
+import * as resolved_topic from "./resolved_topic.ts";
import type {UpdateMessageEvent} from "./server_event_types.ts";
import {message_edit_history_visibility_policy_values} from "./settings_config.ts";
import * as starred_messages from "./starred_messages.ts";
diff --git a/web/src/message_list_view.ts b/web/src/message_list_view.ts
index 8d9ac92f31b..74965c2b18c 100644
--- a/web/src/message_list_view.ts
+++ b/web/src/message_list_view.ts
@@ -3,7 +3,6 @@ import $ from "jquery";
import _ from "lodash";
import assert from "minimalistic-assert";
-import * as resolved_topic from "../shared/src/resolved_topic.ts";
import render_bookend from "../templates/bookend.hbs";
import render_login_to_view_image_button from "../templates/login_to_view_image_button.hbs";
import render_message_group from "../templates/message_group.hbs";
@@ -34,6 +33,7 @@ import * as people from "./people.ts";
import * as popovers from "./popovers.ts";
import * as reactions from "./reactions.ts";
import * as rendered_markdown from "./rendered_markdown.ts";
+import * as resolved_topic from "./resolved_topic.ts";
import * as rows from "./rows.ts";
import * as sidebar_ui from "./sidebar_ui.ts";
import * as stream_color from "./stream_color.ts";
diff --git a/web/src/popover_menus_data.ts b/web/src/popover_menus_data.ts
index 84d82a4fb46..f03339b678c 100644
--- a/web/src/popover_menus_data.ts
+++ b/web/src/popover_menus_data.ts
@@ -3,8 +3,6 @@
import assert from "minimalistic-assert";
-import * as resolved_topic from "../shared/src/resolved_topic.ts";
-
import * as buddy_data from "./buddy_data.ts";
import * as gear_menu_util from "./gear_menu_util.ts";
import * as hash_util from "./hash_util.ts";
@@ -16,6 +14,7 @@ import * as muted_users from "./muted_users.ts";
import * as narrow_state from "./narrow_state.ts";
import {page_params} from "./page_params.ts";
import * as people from "./people.ts";
+import * as resolved_topic from "./resolved_topic.ts";
import * as settings_config from "./settings_config.ts";
import type {ColorSchemeValues} from "./settings_config.ts";
import * as settings_data from "./settings_data.ts";
diff --git a/web/shared/src/resolved_topic.ts b/web/src/resolved_topic.ts
similarity index 100%
rename from web/shared/src/resolved_topic.ts
rename to web/src/resolved_topic.ts
diff --git a/web/src/stream_topic_history.ts b/web/src/stream_topic_history.ts
index efcd8562dd8..eb28aa81508 100644
--- a/web/src/stream_topic_history.ts
+++ b/web/src/stream_topic_history.ts
@@ -1,10 +1,9 @@
import assert from "minimalistic-assert";
-import * as resolved_topics from "../shared/src/resolved_topic.ts";
-
import * as echo_state from "./echo_state.ts";
import {FoldDict} from "./fold_dict.ts";
import * as message_util from "./message_util.ts";
+import * as resolved_topics from "./resolved_topic.ts";
import * as sub_store from "./sub_store.ts";
import * as unread from "./unread.ts";
diff --git a/web/src/topic_list_data.ts b/web/src/topic_list_data.ts
index 6598c796ae3..e4c060ffacc 100644
--- a/web/src/topic_list_data.ts
+++ b/web/src/topic_list_data.ts
@@ -1,9 +1,8 @@
import assert from "minimalistic-assert";
-import * as resolved_topic from "../shared/src/resolved_topic.ts";
-
import * as hash_util from "./hash_util.ts";
import * as narrow_state from "./narrow_state.ts";
+import * as resolved_topic from "./resolved_topic.ts";
import * as stream_topic_history from "./stream_topic_history.ts";
import * as sub_store from "./sub_store.ts";
import * as unread from "./unread.ts";
diff --git a/web/tests/compose_validate.test.cjs b/web/tests/compose_validate.test.cjs
index 6a1d390b453..e8f98d9ac86 100644
--- a/web/tests/compose_validate.test.cjs
+++ b/web/tests/compose_validate.test.cjs
@@ -20,7 +20,7 @@ const compose_state = zrequire("compose_state");
const compose_validate = zrequire("compose_validate");
const peer_data = zrequire("peer_data");
const people = zrequire("people");
-const resolved_topic = zrequire("../shared/src/resolved_topic");
+const resolved_topic = zrequire("resolved_topic");
const {set_current_user, set_realm} = zrequire("state_data");
const stream_data = zrequire("stream_data");
const compose_recipient = zrequire("/compose_recipient");
diff --git a/web/tests/filter.test.cjs b/web/tests/filter.test.cjs
index 2e773b31661..21011de9f35 100644
--- a/web/tests/filter.test.cjs
+++ b/web/tests/filter.test.cjs
@@ -14,7 +14,7 @@ const {page_params} = require("./lib/zpage_params.cjs");
const message_store = mock_esm("../src/message_store");
const user_topics = mock_esm("../src/user_topics");
-const resolved_topic = zrequire("../shared/src/resolved_topic");
+const resolved_topic = zrequire("resolved_topic");
const stream_data = zrequire("stream_data");
const people = zrequire("people");
const {Filter} = zrequire("../src/filter");
diff --git a/web/tests/narrow_local.test.cjs b/web/tests/narrow_local.test.cjs
index ed89f8ef5ed..609f30fbfcb 100644
--- a/web/tests/narrow_local.test.cjs
+++ b/web/tests/narrow_local.test.cjs
@@ -16,7 +16,7 @@ const {MessageListData} = zrequire("../src/message_list_data");
const narrow_state = zrequire("narrow_state");
const message_view = zrequire("message_view");
const message_lists = zrequire("message_lists");
-const resolved_topic = zrequire("../shared/src/resolved_topic");
+const resolved_topic = zrequire("resolved_topic");
function verify_fixture(fixture, override_rewire) {
const msg_list = make_message_list(fixture.filter_terms);
diff --git a/web/tests/resolved_topic.test.cjs b/web/tests/resolved_topic.test.cjs
index 5f6f15ab467..15be3bcf240 100644
--- a/web/tests/resolved_topic.test.cjs
+++ b/web/tests/resolved_topic.test.cjs
@@ -5,7 +5,7 @@ const assert = require("node:assert/strict");
const {zrequire} = require("./lib/namespace.cjs");
const {run_test} = require("./lib/test.cjs");
-const resolved_topic = zrequire("../shared/src/resolved_topic");
+const resolved_topic = zrequire("resolved_topic");
const topic_name = "asdf";
const resolved_name = "✔ " + topic_name;