| Age | Commit message (Collapse) | Author | Lines |
|
Rollup of 5 pull requests
Successful merges:
- #78916 (extend const generics test suite)
- #78921 (Improve the page title switch handling between search and doc)
- #78933 (Don't print thread ids and names in `tracing` logs)
- #78960 (Test default values for const parameters.)
- #78971 (Update books)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
|
|
|
|
Most of the code in mod.rs should be code that really needs to have
the list of available themes inlined into it.
|
|
|
|
Currently, storage.js and main.js have many open-coded calls to
getCurrentValue for "rustdoc-" values, but these are settings and
should be handled by getSettingValue.
So make getSettingValue part of storage.js (where everyone can call
it) and use it everywhere.
No functional change yet. We are going to make getSettingValue do
something more sophisticated in a moment.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
|
|
|
|
|
|
aszenz:GH-66816_removes_disable_attribute_before_return, r=GuillaumeGomez
GH-66816: Remove disable attr before return
Passing --disable-per-crate-search removes the create search inputs so moved code around so that the search input is enabled
first before the function returns.
Fixes #66816
|
|
Clean up rustdoc front-end source code
r? @jyn514
|
|
|
|
|
|
Passing --disable-per-crate-search removes the create search
inputs so moved code around so that the search input is enabled
first before the function returns
|
|
|
|
Improve help popup
Fixes #75623.
The second commit is just a slight improvement: the help popup won't be created until someone presses "?" or ESC. Not a big improvement in itself but considering the low amount of code required, I think it was worth the shot.
r? @jyn514
|
|
|
|
|
|
|
|
|
|
|
|
Add help button
Part of #75197.
Here is a screenshot of the result:

r? @jyn514
|
|
|
|
* Rename it in the UI
* Rename the CSS classes
|
|
|
|
This makes the spotlight show on hover instead of click. Clicks can be
used to persist it, which is also what's used on mobile.
|
|
This reverts commit 1244ced9580b942926afc06815e0691cf3f4a846.
|
|
r=Manishearth
Add option to collapse automatically implementors
Fixes #73403
It adds an option (enabled by default) which collapses all implementors impl blocks.
r? @kinnison
cc @rust-lang/rustdoc
|
|
|
|
|
|
|
|
|
|
|
|
Don't move cursor in search box when using arrows to navigate results
## What happens
- Go to https://doc.rust-lang.org/stable/std/index.html
- Press 's' to focus the search box
- Type a query like 'test'
- Press the down arrow one or more times to change which search result is highlighted
- Press the up arrow once to go up one search result
- Notice the cursor in the search box is now at the beginning of your query, such that if you now typed 'a' the search box would contain 'atest', when it would be expected that the cursor would have remained where it was and if you typed 'a' at this point it would result in 'testa'
- Press the down arrow once to go down one search result
- Now notice the cursor is at the end of your query again
## What I expected
I expected that changing which search result was highlighted using the up and down arrows would have no effect on where the cursor was in the search box.
## The fix
This PR prevents the default action of the up and down arrows when the custom keydown events are happening during a search.
|
|
Fix a crash when searching for an alias contained in the currently selected filter crate.
Also remove alias search results for crates that should be filtered out.
The test suite needed to be fixed to actually take into account the crate filtering and check that there are no results when none are expected.
|
|
Only highlight doc search results via mouseover if mouse has moved
## What happens
- Go to https://doc.rust-lang.org/stable/std/index.html
- Put your mouse cursor somewhere in the middle where search results will appear and then don't move the mouse
- Press 's' to focus the search box
- Type a query that brings up enough search results to go under where your mouse cursor is
- Press the down arrow
- The search result that is one below where your mouse cursor is will be highlighted.
## What I expected
When not currently using the mouse, I expect doing a search and then pressing the down arrow to always highlight the first search result immediately below the search box.
## The fix
This feels a bit hacky to me; I'm open to other solutions. This introduces a global JS var that keeps track of whether the person searching has moved their mouse after doing a search or not, and only uses the mouse position to highlight search results if the person HAS moved the mouse AFTER doing a search.
|
|
doc: make impl block collapsible if it has an associated constant
Fixes #71822.
|
|
|
|
|
|
Fix escape key handling
Fixes #72647.
The problem was that you could have a timeout just after the moment you press "escape", putting back the results.
r? @kinnison
|
|
|
|
|
|
Fixes #71822.
|
|
|
|
|
|
|
|
|
|
with other functions
|
|
GuillaumeGomez:fix-back-on-page-with-search-behaviour, r=kinnison
Fix going back in history to a search result page on firefox
This bug was actually firefox not re-running JS script when you go back in history. To trigger it on the current docs:
* Make a search
* Pick an element (which isn't on the same page as the current element!)
* Go back in history
Instead of having the search results, you'll see the normal doc page. You can find a small explanation about it [here](http://web.archive.org/web/20100428053932/http://www.firefoxanswer.com/firefox/672-firefoxanswer.html).
r? @kinnison
cc @ollie27
|
|
|
|
deterministic results
* Update Javascript to take this change into account
* Update CrateData::aliases field to take a reference instead (it allowed to remove a conversion loop)
|