message_formatting: Reorder items to prioritize more useful ones.

Fixes #25743.
This commit is contained in:
Satyam Bansal 2023-05-25 01:24:14 +05:30 committed by Tim Abbott
parent 07a6a85cf8
commit 856329bb45
1 changed files with 70 additions and 70 deletions

View File

@ -21,38 +21,28 @@ import * as util from "./util";
export let toggler; export let toggler;
const markdown_help_rows = [ const markdown_help_rows = [
{
markdown: "*italic*",
usage_html: "(or <kbd>Ctrl</kbd>+<kbd>I</kbd>)",
},
{ {
markdown: "**bold**", markdown: "**bold**",
usage_html: "(or <kbd>Ctrl</kbd>+<kbd>B</kbd>)", usage_html: "(or <kbd>Ctrl</kbd>+<kbd>B</kbd>)",
}, },
{
markdown: "*italic*",
usage_html: "(or <kbd>Ctrl</kbd>+<kbd>I</kbd>)",
},
{ {
markdown: "~~strikethrough~~", markdown: "~~strikethrough~~",
}, },
{
markdown: ":heart:",
},
{ {
markdown: "[Zulip website](https://zulip.org)", markdown: "[Zulip website](https://zulip.org)",
usage_html: "(or <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>L</kbd>)", usage_html: "(or <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>L</kbd>)",
}, },
{ {
markdown: `\ markdown: "#**streamName**",
* Milk output_html: "<p><a>#streamName</a></p>",
* Tea effect_html: "(links to a stream)",
* Green tea
* Black tea
* Oolong tea
* Coffee`,
},
{
markdown: `\
1. Milk
1. Tea
1. Coffee`,
},
{
markdown: ":heart:",
}, },
{ {
markdown: "@**Joe Smith**", markdown: "@**Joe Smith**",
@ -71,45 +61,34 @@ const markdown_help_rows = [
effect_html: "(notifies all recipients)", effect_html: "(notifies all recipients)",
}, },
{ {
markdown: "#**streamName**", markdown: `\
output_html: "<p><a>#streamName</a></p>", * Milk
effect_html: "(links to a stream)", * Tea
* Green tea
* Black tea
* Oolong tea
* Coffee`,
}, },
{ {
markdown: "/me is busy working", markdown: `\
output_html: '<p><span class="sender_name-in-status">Iago</span> is busy working</p>', 1. Milk
1. Tea
1. Coffee`,
}, },
{ {
markdown: `/poll What did you drink this morning? markdown: "> Quoted",
Milk },
Tea {
Coffee`, markdown: `\
output_html: `\ \`\`\`quote
<div class="poll-widget"> Quoted block
<h4 class="poll-question-header reduced-font-size">What did you drink this morning?</h4> \`\`\``,
<i class="fa fa-pencil poll-edit-question"></i> },
<ul class="poll-widget"> {
<li> markdown: `\
<button class="poll-vote"> \`\`\`spoiler Always visible heading
0 This text won't be visible until the user clicks.
</button> \`\`\``,
<span>Milk</span>
</li>
<li>
<button class="poll-vote">
0
</button>
<span>Tea</span>
</li>
<li>
<button class="poll-vote">
0
</button>
<span>Coffee</span>
</li>
</ul>
</div>
`,
}, },
{ {
markdown: "Some inline `code`", markdown: "Some inline `code`",
@ -145,21 +124,6 @@ def zulip():
}, },
), ),
}, },
{
markdown: "> Quoted",
},
{
markdown: `\
\`\`\`quote
Quoted block
\`\`\``,
},
{
markdown: `\
\`\`\`spoiler Always visible heading
This text won't be visible until the user clicks.
\`\`\``,
},
{ {
markdown: "Some inline math $$ e^{i \\pi} + 1 = 0 $$", markdown: "Some inline math $$ e^{i \\pi} + 1 = 0 $$",
}, },
@ -168,6 +132,42 @@ This text won't be visible until the user clicks.
\`\`\`math \`\`\`math
\\int_{0}^{1} f(x) dx \\int_{0}^{1} f(x) dx
\`\`\``, \`\`\``,
},
{
markdown: "/me is busy working",
output_html: '<p><span class="sender_name-in-status">Iago</span> is busy working</p>',
},
{
markdown: `/poll What did you drink this morning?
Milk
Tea
Coffee`,
output_html: `\
<div class="poll-widget">
<h4 class="poll-question-header reduced-font-size">What did you drink this morning?</h4>
<i class="fa fa-pencil poll-edit-question"></i>
<ul class="poll-widget">
<li>
<button class="poll-vote">
0
</button>
<span>Milk</span>
</li>
<li>
<button class="poll-vote">
0
</button>
<span>Tea</span>
</li>
<li>
<button class="poll-vote">
0
</button>
<span>Coffee</span>
</li>
</ul>
</div>
`,
}, },
{ {
markdown: "---", markdown: "---",