-
Notifications
You must be signed in to change notification settings - Fork 14k
rustdoc: quality of life changes #148466
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
base: master
Are you sure you want to change the base?
rustdoc: quality of life changes #148466
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -265,7 +265,7 @@ function preLoadCss(cssUrl) { | |
| aria-label="Run search in the documentation" | ||
| autocomplete="off" | ||
| spellcheck="false" | ||
| placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" | ||
| placeholder="Search API docs" | ||
| type="search"> | ||
| </form> | ||
| </nav><div class="search-switcher"></div>`; | ||
|
|
@@ -683,6 +683,7 @@ function preLoadCss(cssUrl) { | |
| break; | ||
|
|
||
| case "+": | ||
| case "=": | ||
| ev.preventDefault(); | ||
| expandAllDocs(); | ||
| break; | ||
|
|
@@ -1620,7 +1621,7 @@ function preLoadCss(cssUrl) { | |
| ["↓", "Move down in search results"], | ||
| ["← / →", "Switch result tab (when results focused)"], | ||
| ["⏎", "Go to active search result"], | ||
| ["+", "Expand all sections"], | ||
| ["+ / =", "Expand all sections"], | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We generally avoid adding new shortcuts to not overwrite existing browser/user's shortcuts.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the current
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. User press
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It works with just
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's not the case for me on firefox, what browser and keyboard layout are you using?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. qwerty and firefox
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Very strange, that's the same here, you don't happen to have any extensions or userscripts that could be changing that behavior, do you? What's your exact browser version?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only adblock. Version 143.0.3.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah ok, I understand the issue now. It's because I use the numpad. Well I guess |
||
| ["-", "Collapse all sections"], | ||
| // for the sake of brevity, we don't say "inherit impl blocks", | ||
| // although that would be more correct, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to keep it as is until we come up with a solution on how to tell people that this shortcut exists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already told to people by help button.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the current placeholder is a good idea at all.
In other words, I agree with the change in this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discovering a shortcut while using a feature is better than hiding it all the time. The help menu is not a good place to discover shortcuts sadly. Also, when the input is focused, as long as it's empty, the placeholder is displayed (at least on firefox).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This issue still remains though.