-
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
rustdoc: quality of life changes #148466
Conversation
|
Some changes occurred in HTML/CSS/JS. |
|
r? @notriddle rustbot has assigned @notriddle. Use |
| autocomplete="off" | ||
| spellcheck="false" | ||
| placeholder="Type ‘S’ or ‘/’ to search, ‘?’ for more options…" | ||
| placeholder="Search API docs" |
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.
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.
- It's shown auto-focused, which is confusing just like liigo says.
- It's telling you how to open search mode after search mode is already open, which is too late to be useful.
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.
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.
The issue metioned by @GuillaumeGomez exists and could be improved in later PR, without necessarily blocking 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.
Then revert this change and I'll r+ the 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.
done
| ["← / →", "Switch result tab (when results focused)"], | ||
| ["⏎", "Go to active search result"], | ||
| ["+", "Expand all sections"], | ||
| ["+ / =", "Expand all sections"], |
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.
We generally avoid adding new shortcuts to not overwrite existing browser/user's shortcuts.
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.
the current + shortcut is not just only +, it's really shift+=.
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.
User press - (no shift needed), it works. But if he press + (without shift), it not works, this is a bit weird, or not convenient.
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.
It works with just + for me without shift.
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.
That's not the case for me on firefox, what browser and keyboard layout are you using?
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.
qwerty and 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.
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?
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.
Only adblock. Version 143.0.3.
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.
Ah ok, I understand the issue now. It's because I use the numpad. Well I guess = is fine then.
|
Requested reviewer is already assigned to this pull request. Please choose another assignee. |
|
Please squash your commits then r+ time. |
Essentially, `=` is "`+` without shift". Current `+` shortcut requires an extra `shift`, unless you use numpad `+`.
995675b to
9f3d84b
Compare
|
Thanks! @bors r+ rollup |
|
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 95aeb46 (parent) -> 2fcbda6 (this PR) Test differencesShow 1 test diff1 doctest diff were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 2fcbda6c1a70606bdb09857e01d01fc6229da712 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (2fcbda6): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 1.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 3.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 474.976s -> 474.886s (-0.02%) |
=shortcut (alongside+) to expand all sections. Already supportsandS,Shiftor not.Fix search-input's placeholder. The input is auto focused, any key press will be accepted as input not shortcut, current placeholder is missleading.