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.

widgets: Remove author tip for polls without question.

Harshdd45c3221d00
diff --git a/web/src/poll_widget.ts b/web/src/poll_widget.ts
index 21654a93d9d..7526a2f53e7 100644
--- a/web/src/poll_widget.ts
+++ b/web/src/poll_widget.ts
@@ -62,7 +62,6 @@ export function activate({
const can_edit = is_my_poll && !input_mode;
const has_question = question.trim() !== "";
const waiting = !is_my_poll && !has_question;
- const author_help = is_my_poll && !has_question;
$elem.find(".poll-question-header").toggle(!input_mode);
$elem.find(".poll-question-header").text(question);
@@ -73,8 +72,6 @@ export function activate({
$elem.find(".poll-option-bar").show();
$elem.find(".poll-please-wait").toggle(waiting);
-
- $elem.find(".poll-author-help").toggle(author_help);
}
function start_editing(): void {
diff --git a/web/templates/widgets/poll_widget.hbs b/web/templates/widgets/poll_widget.hbs
index 902c745dac4..cba63b805d1 100644
--- a/web/templates/widgets/poll_widget.hbs
+++ b/web/templates/widgets/poll_widget.hbs
@@ -11,9 +11,6 @@
<div class="poll-please-wait">
{{t 'We are about to have a poll. Please wait for the question.'}}
</div>
- <div class="poll-author-help">
- {{t 'Tip: You can also send "/poll Some question"'}}
- </div>
<ul class="poll-widget">
</ul>
<div class="poll-option-bar">
diff --git a/web/tests/poll_widget.test.cjs b/web/tests/poll_widget.test.cjs
index 887b5f55941..9ce84eb6504 100644
--- a/web/tests/poll_widget.test.cjs
+++ b/web/tests/poll_widget.test.cjs
@@ -253,7 +253,6 @@ run_test("activate another person poll", ({mock_template}) => {
const $poll_vote_button = set_widget_find_result("button.poll-vote");
const $poll_please_wait = set_widget_find_result(".poll-please-wait");
- const $poll_author_help = set_widget_find_result(".poll-author-help");
set_widget_find_result("button.poll-question-remove");
set_widget_find_result("input.poll-question");
@@ -267,7 +266,6 @@ run_test("activate another person poll", ({mock_template}) => {
assert.ok(!$poll_question_submit.visible());
assert.ok(!$poll_edit_question.visible());
assert.ok(!$poll_please_wait.visible());
- assert.ok(!$poll_author_help.visible());
assert.equal($widget_elem.html(), "widgets/poll_widget");
assert.equal($widget_option_container.html(), "widgets/poll_widget_results");
@@ -367,7 +365,6 @@ run_test("activate own poll", ({mock_template}) => {
set_widget_find_result("button.poll-vote");
const $poll_please_wait = set_widget_find_result(".poll-please-wait");
- const $poll_author_help = set_widget_find_result(".poll-author-help");
set_widget_find_result("button.poll-question-remove");
@@ -377,7 +374,6 @@ run_test("activate own poll", ({mock_template}) => {
assert.ok(!$poll_question_container.visible());
assert.ok($poll_edit_question.visible());
assert.ok(!$poll_please_wait.visible());
- assert.ok(!$poll_author_help.visible());
}
poll_widget.activate(opts);