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 poll_widget.ts to web/src.

Shubham Padia9233ca70a868
diff --git a/tools/test-js-with-node b/tools/test-js-with-node
index b473bda5eab..25c6d3bd1f1 100755
--- a/tools/test-js-with-node
+++ b/tools/test-js-with-node
@@ -44,7 +44,6 @@ def make_set(files: list[str]) -> set[str]:
# We do not yet require 100% line coverage for these files:
EXEMPT_FILES = make_set(
[
- "web/shared/src/poll_data.ts",
"web/src/about_zulip.ts",
"web/src/add_group_members_pill.ts",
"web/src/add_stream_options_popover.ts",
@@ -187,6 +186,7 @@ EXEMPT_FILES = make_set(
"web/src/playground_links_popover.ts",
"web/src/pm_list.ts",
"web/src/pm_list_dom.ts",
+ "web/src/poll_data.ts",
"web/src/poll_widget.ts",
"web/src/popover_menus.ts",
"web/src/popover_menus_data.ts",
diff --git a/web/shared/src/poll_data.ts b/web/src/poll_data.ts
similarity index 100%
rename from web/shared/src/poll_data.ts
rename to web/src/poll_data.ts
diff --git a/web/src/poll_widget.ts b/web/src/poll_widget.ts
index 916a537d0b2..54949694c93 100644
--- a/web/src/poll_widget.ts
+++ b/web/src/poll_widget.ts
@@ -1,12 +1,5 @@
import $ from "jquery";
-import {PollData} from "../shared/src/poll_data.ts";
-import type {
- InboundData,
- NewOptionOutboundData,
- QuestionOutboundData,
- VoteOutboundData,
-} from "../shared/src/poll_data.ts";
import render_message_hidden_dialog from "../templates/message_hidden_dialog.hbs";
import render_widgets_poll_widget from "../templates/widgets/poll_widget.hbs";
import render_widgets_poll_widget_results from "../templates/widgets/poll_widget_results.hbs";
@@ -17,6 +10,13 @@ import * as keydown_util from "./keydown_util.ts";
import * as message_lists from "./message_lists.ts";
import type {Message} from "./message_store.ts";
import * as people from "./people.ts";
+import type {
+ InboundData,
+ NewOptionOutboundData,
+ QuestionOutboundData,
+ VoteOutboundData,
+} from "./poll_data.ts";
+import {PollData} from "./poll_data.ts";
export type Event = {sender_id: number; data: InboundData};
diff --git a/web/tests/poll_widget.test.cjs b/web/tests/poll_widget.test.cjs
index 69a6b39cc88..8efc6a725ee 100644
--- a/web/tests/poll_widget.test.cjs
+++ b/web/tests/poll_widget.test.cjs
@@ -12,7 +12,7 @@ mock_esm("../src/settings_data", {
user_can_access_all_other_users: () => true,
});
-const {PollData} = zrequire("../shared/src/poll_data");
+const {PollData} = zrequire("poll_data");
const poll_widget = zrequire("poll_widget");