aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-04-22Help dialog; set maximum width.Stephen Blott
2016-04-22Help dialog: put keys in greyed-out box.Stephen Blott
2016-04-22Help dialog: increase size and make white background.Stephen Blott
2016-04-22Place help dialog in darkend frame.Stephen Blott
This mimics the look of Google Inbox or Github. The background colour is from Google Inbox, Github uses a slightly lighter colour.
2016-04-22Fix help-dialog links.Stephen Blott
It's not clear when -- possibly when we moved the help dialog to an iframe -- the links at the bottom of the help dialog stopped working. Here, we reinstate them by opening the referenced page in a new tab. This is consistent with the behaviour of the links at the top of the help dialog. Also, the "please review us" link now points to the "reviews" tab on the Chrome store.
2016-04-22Merge pull request #2108 from smblott-github/prime-focus-input-on-options-pageStephen Blott
Prime focus input on the Vimium options page.
2016-04-22Simplify 618d66bbd57d7709f211149305ebc41f1b6941f9.Stephen Blott
2016-04-21Prime focus input on the Vimium options page.Stephen Blott
This is a bit of a hack, and pertains to focusInput (`gf`). The problem... On the options page, there are *lots* of inputs (specifically, for every exclusion rule there are two inputs). This makes `gf` almost unusable. It's impossibly to `Tab` through them all. Here, on the options page, we prime the pre-selected input to be the key-mappings input: - arguably, this is the most frequently used input, and - other inputs (such as custom search engines) are just one `Tab` away.
2016-04-21Reinstate Vomnibar init on load.Stephen Blott
This effectively reverts 4b564e8517dd3415cb8e2209ce019fa024e88770. Reinstate pre-initialization of the Vomnibar. Without pre-initialization, there is a small but noticable sluggishness the first time the Vomnibar is opened.
2016-04-21Help dialog; remove ability to blur the dialog.Stephen Blott
Previously, you could blur the help dialog on the options page (to read and type command names). With the reinstated help-dialog styling (whereby the help-dialog iframe extends across the entire window), this doesn't make sense. So it's removed.
2016-04-21Revert "Rework the help dialog styling."Stephen Blott
This reverts commit 86470f13d853b33cda8cb006ae24aeb2dcec0c9c.
2016-04-21Revert "Reinstate help dialog shadow."Stephen Blott
This reverts commit d95f811a8bc32803bfaec69e4853c5d48500905e.
2016-04-18Reinstate help dialog shadow.Stephen Blott
2016-04-18Rework the help dialog styling.Stephen Blott
We make the help dialog iframe cover most of the height of the window, but only be as wide as it needs to be. Like this, the user can click to the side of the dialog (on the options page) to enter bindings in the custom ley mapping input, with the help dialog open.
2016-04-18Ensure help dialog is scrollable.Stephen Blott
When we open the help dialog, scroll it, close it then open it again, the scroller loses track of the scrollable element. This is because the scroller is still referenceing the old scrollable content as its "activated element". Here, we click the dialog element to get the scroller back in sync. (Note: This is a more general problem which we need to look into.)
2016-04-18Tweak max height of help dialog.Stephen Blott
Apart from looking better (ie. symmetric), this also ensures that the help dialog does not overlap the footer on the options page (which is ugly).
2016-04-18Revert "Fix options page when help-dialog showing."Stephen Blott
This reverts commit f0911e52f0e71c6d2539bdc74a09ff2dbd5ab125. Conflicts: content_scripts/vimium.css Revert previous change to help-dialog styling.
2016-04-18Cache content_scripts/vimium.css in chrome.storage.local.Stephen Blott
Previously, we had two different approaches. This seems like a simpler approach. We simply cache the Vimium CSS in chrome.storage.local (in the background page) and fetch it from there (in UI components). There is also a minor change in the we no longer cache the CSS in memory. This seems to be the right thing to do. Caching the CSS in memory consumes a small amount of memory. However, it can only speed up the fastest loads. It cannot speed up the first load -- which is likely the one that matters most. So caching the CSS in memory seems to make little sense.
2016-04-18Revert "Cache content_scripts/vimium.css in chrome.storage.local."Stephen Blott
This reverts commit 0a49cc45732175c65651b5f054c677d6c42a28c0.
2016-04-18Cache content_scripts/vimium.css in chrome.storage.local.Stephen Blott
Previously, we had two different approaches. This seems like a simpler approach. We simply cache the Vimium CSS in chrome.storage.local (in the background page) and fetch it from there (in UI components). There is also a minor change in the we no longer cache the CSS in memory. This seems to be the right thing to do. Caching the CSS in memory consumes a small amount of memory. However, it can only speed up the fastest loads. It cannot speed up the first load -- which is likely the one that matters most. So caching the CSS in memory seems to make little sense.
2016-04-18Remove unused message data.Stephen Blott
The raw query is not used by this message handler, so don't send it.
2016-04-18Simplify find-mode exit event.Stephen Blott
Previously, we were transferring a "transferable event" from the HUD UI component to the content script (when find mode exits). In addition to being unnecessary, this was triggering a warning in the console because we were reading *all* of the events keys, including one which triggers a "this is being deprecated" warning. The approach here is simpler, transfers less data and avoids triggering the warning.
2016-04-18Fix tests.Stephen Blott
When the implementation of windowIsFocused() changed, the tests started failing. (It's not clear how I didn't spot this sooner. I've run the tests countless times - and they passed - since that change was made.
2016-04-18Abandon HUD on help-dialog close.Stephen Blott
If the help dialog loses the focus and closes, then we abandon any HUD which is being displayed. This ensures that - when the help dialog is reopenned - we're not displaying an old, out-of-date HUD message.
2016-04-18Wait for documentReady() when whoeing ui components.Stephen Blott
Previously, requests (like opening the Vomnibar) would be silently discarded if they arrive before the document is ready. Here, we queue them instead.
2016-04-18Require documentReady for all UI components.Stephen Blott
This replaces c01d7eea8675f9a7d84999777e8de72244d687b6. All UI components require the document to be ready. So, here the constructor waits for DomUtils.documentReady(). The diff looks big, but mainly it's a result of changes in indentation in the constructor and in hide(). Also, hide() now uses @postMessage() to post a null message. This forces hide to use @iframePort.use(), which ensures that hide()s cannot overtake activate()s. This continues #2100.
2016-04-18Revert "UI-compnent commands must wait for the document to be ready."Stephen Blott
This reverts commit c01d7eea8675f9a7d84999777e8de72244d687b6. Preparatory to implementing an alternative approach.
2016-04-17UI-compnent commands must wait for the document to be ready.Stephen Blott
2016-04-17Merge pull request #2101 from smblott-github/rework-help-dialogStephen Blott
Move help dialog to top frame
2016-04-17Only Vomnibar.init() when the Vomnibar is needed.Stephen Blott
The Vomnibar isn't needed on most tabs, so don't init it. I cannot detect any sluggishness as a result of this.
2016-04-17Do not init() the HUD until it's needed.Stephen Blott
This avoids initializing around 15 (almost all unused) HUDs on sites like GMail and Google inbox. Because the HUD is small, there is not noticable flicker.
2016-04-17Make showHelp a top-frame command.Stephen Blott
Replaces #2037.
2016-04-17Make showHelp not a background command.Stephen Blott
2016-04-17Fix 5c3e4bda2968486e23f8cc3410e776de67fec849.Stephen Blott
In 5c3e4bda2968486e23f8cc3410e776de67fec849, I omitted to observe that we need to know whether the window has the focus *before* the DOM is ready when checking whether Vimium is enabled. This fixes that.
2016-04-17Merge pull request #2089 from smblott-github/do-not-show-javascript-URLsStephen Blott
Simplify javascript: URLs in vomnibar.
2016-04-17Merge pull request #2100 from smblott-github/rework-ui-component-focus-handlingStephen Blott
Rework ui component focus handling
2016-04-17Better window focus handling.Stephen Blott
This fixes two issues: - We cannot set windowHasFocus until the DOM is ready (because document.hasFocus isn't set until then. - We should use windowhasFocus in prefernce to document.hasFocus because, for framesets, document.hasFocus is true for both the frameset and a focused contained frame.
2016-04-17More code review of UI-component focus handling.Stephen Blott
2016-04-17Use register/unregister frame in help dialog.Stephen Blott
Remove special-purpose code from `gf`. Instead, register the help dialog frame when it launches, and unregister it when it's hidden. This way, when the helpd-dialog frame is hidden, it simply isn't available for `gf` and for link hints.
2016-04-17There's no need for a new suggestion property...Stephen Blott
We do not need "displayUrl", we can re-use "shortUrl" instead. It does what we need already.
2016-04-17Do not deduplicate javascript: URLs.Stephen Blott
2016-04-17For javascript URLs, do not match javascript content.Stephen Blott
We only match the text "javascript:...". The affects only the bookmark completer.
2016-04-16Minor code review.Stephen Blott
2016-04-16Do not focus a hidden help dialog.Stephen Blott
When the help dialog UI component has been created but subsequently hidden, `gf` was nevertheless selecting it.
2016-04-16Reinstate vomnibar from within help dialog.Stephen Blott
2016-04-16Self code review re. ui-component focus handling.Stephen Blott
2016-04-16We cannot wait for nextTick() here...Stephen Blott
It interferes with the HUD's timing.
2016-04-16Remove dead code from the HUD initialization.Stephen Blott
2016-04-16Rework UI component focus handling.Stephen Blott
The code to handle the focus for UI components has been tweaked and adapted over time, and has become quite complicated (and brittle). This reworks it from scratch, and co-locates similar code which does related things. Fixes #2099.
2016-04-14Note #2093 in README.md.Stephen Blott