-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs/UI to help users around keyboard shortcut settings/limitations #165
Comments
Got far enough with the splash stuff for 2.4.0, which already has some other features in it, so bumping this to a later release. |
* Generate a help.json file from help.html (not yet in the repo). * help.json is saved to src/static/ before the build script runs, so it's picked up as part of the repo. * Declare that file in web_accessible_resources and load it from the splash script. * First attempt at generating the HTML from that JSON and inserting it into the splash page. Next steps: * Refactor the JSON in the splash to use the same format as the JSON-to-HTML process (maybe even generate it as part of a build, though most of it is focused on the keyboard stuff, which can be dynamically generated. * Figure out the neatest way to attach custom event listeners after the HTML has been generated (e.g. just use known IDREFs and attach the event listeners after the HTML has been generated). * Include the help HTML & CSS in the extension. Should they go under meta/? How should change notes be incorporated (manually at first I think, as mentioned in #233). Partly addresses #165 and #233.
Wow, right... whilst it may not be possible to match content scripts on a bundled page, as the Tridactyl source shows, it is possible to simply include the content script directly in a bundled page. This is not something I thought of, and hadn't clocked in the docs. However, there is an MDN page about "extension pages". I haven't noticed an equivalent in the Chrome docs, but it does work on Chrome and Opera too. This meant that the changes introduced in #234 (which then started to be built upon in the "splash-docs" branch are way beyond what's needed. Was fun writing them though :-). Glad to be able to simplify things in #235 and now started work on bundling the help page with the extension, in line with the general approach outlined [or soon to be outlined] in #233. |
Add a new, HTML help page that explains how to use the extension, including reflecting keyboard shortcuts and providing links to go directly to the settings, for convenience. This was created by moving some content from the README and the techniques from the original “splash” content script. It also directly imports the main Landmarks content script so that the extension can itself be used to navigate this page. Refer to #165 for the details. Partly addresses #165 (provides the foundation for managing the keyboard shortcuts when another one is added).
Naughty! This really should’ve been split up into smaller PRs, though I think I am starting to get into this new commit style :-). Anyway, this does a couple of things: * Adds help page support for indicating to the user when a keyboard shortcut is not set (in support of #165). * Implements a keyboard shortcut that toggles the display of all landmarks (in support of #120). In support of this, it required splitting the ElementFocuser into an ElementFocuser and a BorderDrawer. A lot of API naming cleanup and code tidying was done too. A further PR will add UI to the pop-up that mouse users can use to access this feature.
Closed by 10691ee |
All browsers allow n commands to be defined. Chrome allows only four shortcut keys to be defined by the extension—more can be added by the user. This will stop Landmarks being useful out-of-the box for "show all landmarks" (#120) and heading navigation (#156).
I've tried bundling a "splash" page with the extension to show the user the current keyboard shortcuts they have, and prompt them to assign more, however, the content scripts won't work on one's own extension's pages, so users would be unable to navigate that page using Landmarks, which would seem very odd to them. Can understand one's content scripts not being allowed on browser/other extension pages, but it seems fine to run them on our own extension's pages. (Firefox does seem to allow this, but can't currently find a cross-browser way with bundled files.)
Anyway, I think it may be OK to take the current landing page (hosted) and extensively re-write it (assuming human reviewers are happy with that) using a specific content script.
This all needs to be addressed before any extra navigation features can be added.
The text was updated successfully, but these errors were encountered: