Skip to content
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

Properly document hotkeys in generated documentation. #15037

Merged
merged 1 commit into from
Jun 19, 2014
Merged

Properly document hotkeys in generated documentation. #15037

merged 1 commit into from
Jun 19, 2014

Conversation

zzmp
Copy link
Contributor

@zzmp zzmp commented Jun 19, 2014

Continuing from #15012, this makes four changes to the rustdoc static files.

  • Change the placeholder text of the search bar to Click or press 'S' to search, '?' for more options... to make keyboard hotkeys more apparent (capitalizing the S to match the help text).
  • Change the main.js file to use browser-normalized key codes (e.which, from jQuery), instead of e.keyCode.
  • Change the key code for ? to be the correct 191 instead of 188, so that the hotkey works to bring up search information.
  • Change the search information to display tab and shift+tab instead of up and down, as those do not yet work outside of Firefox (see rustdoc: Arrow keys don't always work when searching #15011). Also, adjust the height so it does not cut off the help text.

I've also opened up #15038 about the non-functional up and down functionality, although this does nothing to fix it.

@zzmp zzmp changed the title Doc/hotkeys Properly document hotkeys in generated documentation. Jun 19, 2014
@@ -361,7 +361,7 @@
$(document).on('keypress.searchnav', function(e) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is dead code. See #15038.

UPDATE: This only works in Firefox, see #15011.

Updated search bar to match help text.
Used correct, normalized hotkeys in search.
Updated shortcut menu with working shortcuts (tabs).
Changed height of search help.
bors added a commit that referenced this pull request Jun 19, 2014
Continuing from #15012, this makes four changes to the `rustdoc` static files.

- Change the placeholder text of the search bar to `Click or press 'S' to search, '?' for more options...` to make keyboard hotkeys more apparent (capitalizing the `S` to match the help text).
- Change the `main.js` file to use browser-normalized key codes (`e.which`, from `jQuery`), instead of `e.keyCode`.
- Change the key code for `?` to be the correct `191` instead of `188`, so that the hotkey works to bring up search information.
- Change the search information to display `tab` and `shift+tab` instead of `up` and `down`, as those do not yet work outside of Firefox (see #15011). Also, adjust the height so it does not cut off the help text.

<s>I've also opened up #15038 about the non-functional `up` and `down` functionality, although this does nothing to fix it.</s>
@bors bors closed this Jun 19, 2014
@bors bors merged commit 677e6ed into rust-lang:master Jun 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants