| Age | Commit message (Collapse) | Author | Lines |
|
Fix selected crate search filter
Fixes #62929.
r? @kinnison
|
|
rustdoc: fixes #64305: disable search field instead of hidding it
The result seems to be ok but I wasn't entirely sure how to get there. I tried to stay generic a bit but maybe it's not required at all.
@GuillaumeGomez
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
|
|
r=GuillaumeGomez
Update Source Code Pro and include italics
Fixes #65502.
A few notes:
* As stated in #65502, this does increase the download size.
* Since this PR changes the font set, I think docs.rs would have to be updated if this PR is merged.
* The fonts have a double extension (.ttf.woff); this is to keep the names consistent with the upstream font release which does that to distinguish these from the .otf.woff files ([Source Code Pro otf renders poorly on older Windows system apps](https://github.com/adobe-fonts/source-code-pro/issues/25#issuecomment-9019600)).
|
|
|
|
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
|
|
r=GuillaumeGomez
[doc] Fix the source code highlighting on source comments
The code would always forget the previous selection.
r? @GuillaumeGomez
|
|
|
|
|
|
|
|
Also move the declaration outside the loop since they accumulate state with each iteration
|
|
|
|
No more hidden elements
Fixes #66046.
Follow-up of #66082.
r? @kinnison
|
|
[rustdoc] add sub settings
This PR is to give a finer control over what types are automatically expanded or not as well as the possibility to add sub-settings in the settings page.

r? @Mark-Simulacrum
|
|
|
|
|
|
|
|
|
|
|
|
r=Mark-Simulacrum
Move help popup generation code
The first commit is just a small cleanup.
The idea behind this PR is to reduce a bit more the generated HTML files by moving the duplicated code into one place instead.
r? @kinnison
|
|
Prevent help popup to disappear when clicking on it
Fixes #65736.
r? @kinnison
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Previously this was only done inside short docblocks (e.g., summary
lines), but we should also do so in general.
|
|
r=Mark-Simulacrum
Fix rustdoc display with js disabled
Fixes #64988.
Currently, all sections are collapsed when the page is loading, and then is displayed once done. However, if js is disabled, they never get expanded. Therefore, they need to be shown by default.
r? @Mark-Simulacrum
|
|
|
|
|
|
r=Mark-Simulacrum
Unify escape usage
Fixes #63443.
I chose to keep the search text when pressing escape so when we focus on the search bar, we got the results again without needing to load them again. I also unified a bit a few things (maybe I should have done it in another commit, sorry...).
r? @Mark-Simulacrum
|
|
|
|
Fix regex replacement in theme detection
Fixes #64061.
This is sadly a lot of bad luck: after making the changes and re-build the docs, I just forgot to force reload the page. Hence having the old (working) version with two replacements instead of the failing regex. Sorry again about that...
cc @fenhl
r? @Mark-Simulacrum
|
|
Improve searching in rustdoc and add tests
👋 I have made searching in rustdoc more intuitive, added a couple more tests and made a little shell script to aid testing. Closes #63005.
It took me quite a while to figure out how to run the tests for rustdoc (instead of running tests for other crates with rustdoc); the only pointer I found was [hidden in the rustc book](https://rust-lang.github.io/rustc-guide/rustdoc.html#cheat-sheet). Maybe this could be better documented? I shall be delighted to help if it is desirable.
|
|
Fix `window.hashchange is not a function`
Closes #63707.
|
|
|
|
|
|
[rustdoc] Fix system theme detection
Fixes #63830
The problem is that it returns the property "entirely" (so with the quotes in our case). Removing them fixes the issue.
cc @fenhl
r? @kinnison
|
|
Hide trait default methods
Fixes #62499.
However, the question remains: do we want to extend it to this point or not?
r? @QuietMisdreavus
|
|
Save crate filtering on rustdoc
Fixes #62929.
I added a hashmap and a hash encoding for the current crate list in case you have multiple crates handling on a same website (who talked about docs.rs?!). Like that, for each context, you have the filter crate selected.
r? @QuietMisdreavus
|
|
|
|
|
|
Fix confusion in theme picker functions
To reproduce the bug currently: click on the theme picker button twice (to show it then hide it). Then click anywhere else: the dropdown menu appears again.
The problem was coming from a confusion of what the `hideThemeButtonState` and `showThemeButtonState` were supposed to do. I switched their codes and updated the `switchThemeButtonState` function. It now works as expected.
r? @kinnison
|
|
|
|
|
|
|
|
|
|
|