From cfad0ded611149b2757baa19fbac587a7d4f210d Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Tue, 19 Apr 2016 06:57:45 +0100 Subject: Help dialog: increase size and make white background. --- background_scripts/main.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'background_scripts') diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 3e1cc0a3..272146cb 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -123,7 +123,7 @@ helpDialogHtmlForCommand = (html, isAdvanced, bindings, description, showCommand html.push "" if description html.push "", Utils.escapeHtml(bindings), "" - html.push "#{if description and bindings then ':' else ''}", description + html.push "#{if description and bindings then ':' else ''}", description html.push("(#{command})") if showCommandNames else html.push "", Utils.escapeHtml(bindings) -- cgit v1.2.3 From 3adae8c9a683955641fe1417c977a3a06356107b Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Tue, 19 Apr 2016 07:22:17 +0100 Subject: Help dialog: put keys in greyed-out box. --- background_scripts/main.coffee | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'background_scripts') diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 272146cb..9689dd79 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -106,11 +106,12 @@ helpDialogHtmlForCommandGroup = (group, commandsToKey, availableCommands, showUnboundCommands, showCommandNames) -> html = [] for command in Commands.commandGroups[group] - bindings = (commandsToKey[command] || [""]).join(", ") + keys = commandsToKey[command] || [] + bindings = ("#{Utils.escapeHtml key}" for key in keys).join ", " if (showUnboundCommands || commandsToKey[command]) isAdvanced = Commands.advancedCommands.indexOf(command) >= 0 description = availableCommands[command].description - if bindings.length < 12 + if keys.join(", ").length < 12 helpDialogHtmlForCommand html, isAdvanced, bindings, description, showCommandNames, command else # If the length of the bindings is too long, then we display the bindings on a separate row from the @@ -122,11 +123,11 @@ helpDialogHtmlForCommandGroup = (group, commandsToKey, availableCommands, helpDialogHtmlForCommand = (html, isAdvanced, bindings, description, showCommandNames, command) -> html.push "" if description - html.push "", Utils.escapeHtml(bindings), "" - html.push "#{if description and bindings then ':' else ''}", description + html.push "#{bindings}" + html.push "", description html.push("(#{command})") if showCommandNames else - html.push "", Utils.escapeHtml(bindings) + html.push "", bindings html.push("") # Cache "content_scripts/vimium.css" in chrome.storage.local for UI components. -- cgit v1.2.3 From 4a670aaa3d121834685a672acc904f9824721824 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Tue, 19 Apr 2016 13:07:43 +0100 Subject: Help dialog; better formatting of command names. This needs more work. --- background_scripts/main.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'background_scripts') diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 9689dd79..23b7ab48 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -124,8 +124,9 @@ helpDialogHtmlForCommand = (html, isAdvanced, bindings, description, showCommand html.push "" if description html.push "#{bindings}" - html.push "", description - html.push("(#{command})") if showCommandNames + html.push "", + "#{description}#{if showCommandNames then ":" else ""}" + html.push("#{command}") if showCommandNames else html.push "", bindings html.push("") -- cgit v1.2.3 From 740df9a23fa9a1e5b812584ce0702b813b226623 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Tue, 19 Apr 2016 13:32:39 +0100 Subject: Help dialog; do not offer hints outside of the help dialog. --- background_scripts/main.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'background_scripts') diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 23b7ab48..cb978db3 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -366,10 +366,10 @@ HintCoordinator = for own frameId, port of @tabState[tabId].ports @postMessage tabId, parseInt(frameId), messageType, port, request - prepareToActivateMode: (tabId, originatingFrameId, {modeIndex}) -> + prepareToActivateMode: (tabId, originatingFrameId, {modeIndex, isVimiumHelpDialog}) -> @tabState[tabId] = {frameIds: frameIdsForTab[tabId][..], hintDescriptors: {}, originatingFrameId, modeIndex} @tabState[tabId].ports = extend {}, portsForTab[tabId] - @sendMessage "getHintDescriptors", tabId, {modeIndex} + @sendMessage "getHintDescriptors", tabId, {modeIndex, isVimiumHelpDialog} # Receive hint descriptors from all frames and activate link-hints mode when we have them all. postHintDescriptors: (tabId, frameId, {hintDescriptors}) -> -- cgit v1.2.3 From a7446f09538e0b0314611c9d847016a85f735644 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Fri, 22 Apr 2016 16:55:02 +0100 Subject: Nicer styling of command names in help dialog. The commands names (in the help dialog) look nicer in italics. They also format better that way. --- background_scripts/main.coffee | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'background_scripts') diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index cb978db3..653b61e7 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -124,9 +124,8 @@ helpDialogHtmlForCommand = (html, isAdvanced, bindings, description, showCommand html.push "" if description html.push "#{bindings}" - html.push "", - "#{description}#{if showCommandNames then ":" else ""}" - html.push("#{command}") if showCommandNames + html.push "", description + html.push("(#{command})") if showCommandNames else html.push "", bindings html.push("") -- cgit v1.2.3 From 98ea279485fc456bbe4349559f9c08a24e2c4214 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 23 Apr 2016 06:53:55 +0100 Subject: Show tip re. clicking command names. It's pretty undiscoverable that you can click command names to yank them. So, this adds a tip to the bottom of the help dialog. Also, change the cursor to a pointer when hovering over command names. --- background_scripts/main.coffee | 1 + 1 file changed, 1 insertion(+) (limited to 'background_scripts') diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 653b61e7..5d1ab864 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -91,6 +91,7 @@ getHelpDialogHtml = ({showUnboundCommands, showCommandNames, customTitle}) -> replacementStrings = version: currentVersion title: customTitle || "Help" + tip: if showCommandNames then "Tip: click command names to yank them to the clipboard." else "" for own group of Commands.commandGroups replacementStrings[group] = -- cgit v1.2.3 From 9b7e9b6cc6fc5928adb202b1d8a63e78861200ca Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 25 Apr 2016 10:23:44 +0100 Subject: Help dialog; fix show-advanced-command button position. --- background_scripts/main.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'background_scripts') diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 5d1ab864..dca9df7e 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -91,7 +91,7 @@ getHelpDialogHtml = ({showUnboundCommands, showCommandNames, customTitle}) -> replacementStrings = version: currentVersion title: customTitle || "Help" - tip: if showCommandNames then "Tip: click command names to yank them to the clipboard." else "" + tip: if showCommandNames then "Tip: click command names to yank them to the clipboard." else " " for own group of Commands.commandGroups replacementStrings[group] = -- cgit v1.2.3 From 8449ad05ebc2b08e7575d6090a3d80daa6c466bc Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Tue, 26 Apr 2016 06:46:51 +0100 Subject: Help dialog; re-order and tweak command descriptions. - Re-order commands such that we keep like with like, and have the more important commands nearer the top. - Re-word some command descriptions such that we use the same words for the the same thing consistently. - Move "View Source" to the "Miscellaneous" category. - Make some commands "advanced commands". --- background_scripts/commands.coffee | 40 ++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 19 deletions(-) (limited to 'background_scripts') diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index 2999ebfc..184f3bb0 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -118,27 +118,26 @@ Commands = pageNavigation: ["scrollDown", "scrollUp", - "scrollLeft", - "scrollRight", "scrollToTop", "scrollToBottom", - "scrollToLeft", - "scrollToRight", "scrollPageDown", "scrollPageUp", "scrollFullPageUp", "scrollFullPageDown", + "scrollLeft", + "scrollRight", + "scrollToLeft", + "scrollToRight", "reload", - "toggleViewSource", "copyCurrentUrl", "openCopiedUrlInCurrentTab", "openCopiedUrlInNewTab", "goUp", "goToRoot", "enterInsertMode", - "passNextKey", "enterVisualMode", "enterVisualLineMode", + "passNextKey", "focusInput", "LinkHints.activateMode", "LinkHints.activateModeToOpenInNewTab", @@ -156,32 +155,33 @@ Commands = vomnibarCommands: ["Vomnibar.activate", "Vomnibar.activateInNewTab", - "Vomnibar.activateTabSelection", "Vomnibar.activateBookmarks", "Vomnibar.activateBookmarksInNewTab", + "Vomnibar.activateTabSelection", "Vomnibar.activateEditUrl", "Vomnibar.activateEditUrlInNewTab"] findCommands: ["enterFindMode", "performFind", "performBackwardsFind"] historyNavigation: ["goBack", "goForward"] tabManipulation: - ["nextTab", + ["createTab", "previousTab", + "nextTab", "visitPreviousTab", "firstTab", "lastTab", - "createTab", "duplicateTab", + "togglePinTab", "removeTab", "restoreTab", "moveTabToNewWindow", - "togglePinTab", "closeTabsOnLeft","closeTabsOnRight", "closeOtherTabs", "moveTabLeft", "moveTabRight"] misc: - ["showHelp"] + ["showHelp", + "toggleViewSource"] # Rarely used commands are not shown by default in the help dialog or in the README. The goal is to present # a focused, high-signal set of commands to the new and casual user. Only those truly hungry for more power @@ -192,12 +192,12 @@ Commands = "moveTabToNewWindow", "goUp", "goToRoot", - "focusInput", "LinkHints.activateModeWithQueue", "LinkHints.activateModeToDownloadLink", "Vomnibar.activateEditUrl", "Vomnibar.activateEditUrlInNewTab", "LinkHints.activateModeToOpenIncognito", + "LinkHints.activateModeToCopyLinkUrl", "goNext", "goPrevious", "Marks.activateCreateMode", @@ -207,6 +207,8 @@ Commands = "closeTabsOnLeft", "closeTabsOnRight", "closeOtherTabs", + "enterVisualLineMode", + "toggleViewSource", "passNextKey"] defaultKeyMappings = @@ -306,8 +308,8 @@ commandDescriptions = scrollToLeft: ["Scroll all the way to the left", { noRepeat: true }] scrollToRight: ["Scroll all the way to the right", { noRepeat: true }] - scrollPageDown: ["Scroll a page down"] - scrollPageUp: ["Scroll a page up"] + scrollPageDown: ["Scroll a half page down"] + scrollPageUp: ["Scroll a half page up"] scrollFullPageDown: ["Scroll a full page down"] scrollFullPageUp: ["Scroll a full page up"] @@ -323,7 +325,7 @@ commandDescriptions = enterVisualMode: ["Enter visual mode", { noRepeat: true }] enterVisualLineMode: ["Enter visual line mode", { noRepeat: true }] - focusInput: ["Focus the first text box on the page. Cycle between them using tab"] + focusInput: ["Focus the first text input on the page"] "LinkHints.activateMode": ["Open a link in the current tab"] "LinkHints.activateModeToOpenInNewTab": ["Open a link in a new tab"] @@ -370,16 +372,16 @@ commandDescriptions = moveTabLeft: ["Move tab to the left", { background: true }] moveTabRight: ["Move tab to the right", { background: true }] - "Vomnibar.activate": ["Open URL, bookmark, or history entry", { topFrame: true }] - "Vomnibar.activateInNewTab": ["Open URL, bookmark, history entry, in a new tab", { topFrame: true }] + "Vomnibar.activate": ["Open URL, bookmark or history entry", { topFrame: true }] + "Vomnibar.activateInNewTab": ["Open URL, bookmark or history entry in a new tab", { topFrame: true }] "Vomnibar.activateTabSelection": ["Search through your open tabs", { topFrame: true }] "Vomnibar.activateBookmarks": ["Open a bookmark", { topFrame: true }] "Vomnibar.activateBookmarksInNewTab": ["Open a bookmark in a new tab", { topFrame: true }] "Vomnibar.activateEditUrl": ["Edit the current URL", { topFrame: true }] "Vomnibar.activateEditUrlInNewTab": ["Edit the current URL and open in a new tab", { topFrame: true }] - nextFrame: ["Cycle forward to the next frame on the page", { background: true }] - mainFrame: ["Select the tab's main/top frame", { topFrame: true, noRepeat: true }] + nextFrame: ["Select the next frame on the page", { background: true }] + mainFrame: ["Select the page's main/top frame", { topFrame: true, noRepeat: true }] "Marks.activateCreateMode": ["Create a new mark", { noRepeat: true }] "Marks.activateGotoMode": ["Go to a mark", { noRepeat: true }] -- cgit v1.2.3