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

Rollup of 7 pull requests #85443

Merged
merged 15 commits into from
May 18, 2021
Merged

Rollup of 7 pull requests #85443

merged 15 commits into from
May 18, 2021

Conversation

RalfJung
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

BoxyUwU and others added 15 commits May 13, 2021 11:37
Rather than keeping track of highlighted element inside the JS, take
advantage of `.focus()` and the :focus CSS pseudo-class.

This required wrapping each row of results in one big <a> tag (because
anchors can be focused, but table rows cannot). That in turn required
moving from a table layout to a div layout with float.

This makes it so Ctrl+Enter opens links in new tabs, and using the arrow
keys to navigate off the bottom of the page scrolls the rest of the page
into view. It also simplifies the keyboard event handling. It eliminates
the need for click handlers on the search results, and for tracking
mouse movements.

This changes the UI treatment of mouse hovering. A hovered element now
gets a light grey background, but does not change the focused element.
It's possible to have two highlighted search results: one that is
focused (via keyboard) and one that is hovered (via mouse). Pressing
enter will activate the focused link; clicking will activate the hovered
link. This matches up with how Firefox and Chrome handle suggestions in
their URL bar, and avoids stray mouse movements changing the focus.

Selecting tabs is now done with left/right arrows while any search
result is focused. The visibility of results on each search tab is
controlled with the "active" class, rather than by setting display: none
directly. Note that the old code kept track of highlighted search
element when tabbing back and forth. The new code doesn't.
Previously, setting `download-ci-llvm = true` when cmake wasn't
installed would give the following error:

```
failed to execute command: "cmake" "--help"
error: The system cannot find the file specified. (os error 2)
```
This change adds pre-setup instructions that outline how x.py requires
python to be setup and how to work around the problem of x.py failing to
locate python, especially now that Ubuntu 20.04's dropped default python
command is causing people to encounter this issue regularly.

See also: rust-lang#71818
…aumeGomez

rustdoc: use focus for search navigation

Rather than keeping track of highlighted element inside the JS, take advantage of `.focus()` and the :focus CSS pseudo-class.

This required wrapping each row of results in one big `<a>` tag (because anchors can be focused, but table rows cannot). That in turn required moving from a table layout to a div layout with float.

This makes it so Ctrl+Enter opens links in new tabs, and using the arrow keys to navigate off the bottom of the page scrolls the rest of the page into view. It also simplifies the keyboard event handling. It eliminates the need for click handlers on the search results, and for tracking mouse movements.

This changes the UI treatment of mouse hovering. A hovered element now gets a light grey background, but does not change the focus. It's possible to have two highlighted search results: one that is focused (via keyboard) and one that is hovered (via mouse). Pressing enter will activate the focused link; clicking will activate the hovered link. This matches up with how Firefox and Chrome handle suggestions in their URL bar, and avoids stray mouse movements changing the focus.

Selecting tabs is now done with left/right arrows while any search result is focused. The visibility of results on each search tab is
controlled with the "active" class, rather than by setting display: none directly. Note that the old code kept track of highlighted search element when tabbing back and forth. The new code doesn't.

Demo at https://hoffman-andrews.com/rust/focus-search-results2/std/?search=fn

Fixes rust-lang#84384
Fixes rust-lang#79962
Fixes rust-lang#79872
Make `const_generics_defaults` not an incomplete feature

r? `@lcnr`
…k-Simulacrum

Backport 1.52.1 release notes

This PR backports the 1.52.1 release notes to master, fixing rust-lang#85235.

r? `@Mark-Simulacrum`
`@rustbot` modify-labels: beta-accepted beta-nominated T-release
Don't require cmake on Windows when LLVM isn't being built

Previously, setting `download-ci-llvm = true` when cmake wasn't
installed would give the following error:

```
failed to execute command: "cmake" "--help"
error: The system cannot find the file specified. (os error 2)
```
…tions, r=Mark-Simulacrum

Add x.py pre-setup instructions

This change adds pre-setup instructions that outline how x.py requires
python to be setup and how to work around the problem of x.py failing to
locate python, especially now that Ubuntu 20.04's dropped default python
command is causing people to encounter this issue regularly.

See also: rust-lang#71818
@rustbot rustbot added the rollup A PR which is a rollup label May 18, 2021
@RalfJung
Copy link
Member Author

@bors r+ p=5

@bors
Copy link
Contributor

bors commented May 18, 2021

📌 Commit 7389843 has been approved by RalfJung

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 18, 2021
@bors
Copy link
Contributor

bors commented May 18, 2021

⌛ Testing commit 7389843 with merge 491cf55...

@bors
Copy link
Contributor

bors commented May 18, 2021

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing 491cf55 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 18, 2021
@bors bors merged commit 491cf55 into rust-lang:master May 18, 2021
@rustbot rustbot added this to the 1.54.0 milestone May 18, 2021
@RalfJung RalfJung deleted the rollup-d9gd64t branch May 19, 2021 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants