Skip to content

Commit cd6a673

Browse files
committed
Help dialog: fix long description breaking the layout of the dialog
1 parent b44dbff commit cd6a673

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

background_scripts/all_commands.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// - advanced: advanced commands are not shown in the help dialog by default.
55
// - background: whether this command has to be run by the background page.
66
// - desc: shown in the help dialog and command listing page.
7+
// - details: extra help information that will only be shown on the command listing page.
78
// - group: commands are displayed in groups in the help dialog and command listing.
89
// - noRepeat: whether this command can be used with a count key prefix.
910
// - repeatLimit: the number of allowed repetitions of this command before the user is prompted for
@@ -261,8 +262,8 @@ const allCommands = [
261262

262263
{
263264
name: "Marks.activateCreateMode",
264-
desc:
265-
"Create a new mark. Do this by typing the key bound to this command, and then a letter. " +
265+
desc: "Create a new mark",
266+
details: "Do this by typing the key bound to this command, and then a letter. " +
266267
"This will set a mark bound to that letter. Lowercase letters are local marks and uppercase " +
267268
"letters are global marks.",
268269
options: {

pages/command_listing.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ h3 code {
6868
margin-right: auto;
6969
}
7070

71-
p.desc {
71+
p.desc, p.details {
7272
margin-left: 1rem;
7373
}
7474

pages/command_listing.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ <h3>
3939
<span class="key-bindings"></span>
4040
</h3>
4141
<p class="desc">Example description.</p>
42+
<p class="details"></p>
4243
<div class="options">
4344
<p><strong>Options</strong></p>
4445
<ul></ul>

pages/command_listing.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ async function populatePage() {
5353
}
5454

5555
el.querySelector(".desc").textContent = command.desc;
56+
if (command.details) {
57+
el.querySelector(".details").textContent = command.details;
58+
}
5659

5760
if (command.options) {
5861
const ul = el.querySelector(".options ul");

0 commit comments

Comments
 (0)