Guillaume Gomez
7b62d28cf2
Enforce search typed queries
2021-06-30 14:11:09 +02:00
bors
d08a4718a9
Auto merge of #85876 - jeanlucthumm:master, r=GuillaumeGomez
...
Add `go_to_first` query param to jump to first result
Fixes #84214
Note that while the issue initially wanted to navigate to an entry on exact match, the discussion settled on using a query parameter (`&go_to_first=true`) instead, regardless of exact or partial match.
Demonstration is attached
https://user-images.githubusercontent.com/4934853/120258768-7ff28980-c247-11eb-8c8f-1a2ceb242788.mp4
2021-06-28 03:43:39 +00:00
bors
3e9d7ecf78
Auto merge of #86589 - JohnTitor:add-triangle-to-summary, r=jsha
...
Show triangle on the "Details" disclosure element in all cases
Re-submission of #82805 , fixes the style issue by applying the same margin as `<p>`.
<details><summary>Before</summary>


</details>
<details><summary>After</summary>


</details>
r? `@GuillaumeGomez`
2021-06-27 22:57:34 +00:00
Jean-Luc Thumm
68e3c49cdf
Add go_to_first boolean query param to immeidately jump to the first search result
2021-06-27 10:59:53 -07:00
Yuki Okushi
14413ad539
Add FIXME comment
2021-06-27 16:18:52 +09:00
bors
481971978f
Auto merge of #86586 - Smittyvb:https-everywhere, r=petrochenkov
...
Use HTTPS links where possible
While looking at #86583 , I wondered how many other (insecure) HTTP links were in `rustc`. This changes most other `http` links to `https`. While most of the links are in comments or documentation, there are a few other HTTP links that are used by CI that are changed to HTTPS.
Notes:
- I didn't change any to or in licences
- Some links don't support HTTPS :(
- Some `http` links were dead, in those cases I upgraded them to their new places (all of which used HTTPS)
2021-06-26 08:24:31 +00:00
Yuki Okushi
385f079d8d
Show triangle on the "Details" disclosure element in all cases
...
Co-authored-by: Miguel Ojeda <ojeda@kernel.org>
2021-06-25 15:47:50 +09:00
Stefan Schindler
94c84bd72a
Migrate from custom elements to divs with classes to be compatible with safari
2021-06-24 16:46:15 +02:00
Stefan Schindler
cc9ef7d8a8
Hide Crate Version on narrow Screens
2021-06-24 16:46:15 +02:00
Stefan Schindler
6020c79dde
Implement Desktop and Mobile version with gridlayout
...
* implement sans-serif #85621
2021-06-24 16:46:14 +02:00
Smitty
bdfcb88e8b
Use HTTPS links where possible
2021-06-23 16:26:46 -04:00
Guillaume Gomez
c4023c6ca3
Fix search filter update
2021-06-23 10:09:26 +02:00
Yuki Okushi
fd96d55426
Rollup merge of #86402 - tspiteri:source-woff2, r=jsha
...
rustdoc: add optional woff2 versions of Source Serif and Source Code
This provides woff2 versions of Source Serif and Source Code similar to how #82545 provides woff2 versions of Fira Sans. The total byte count for the six files (three for each font family) is reduced by 25% from 476 KiB to 358 KiB.
2021-06-22 20:01:01 +09:00
Yuki Okushi
58e7411092
Rollup merge of #86274 - alexander-melentyev:spaces, r=bjorn3
...
Spaces
2021-06-22 00:00:38 +09:00
Alexander Melentyev
e84c9aed6d
Delete spaces
2021-06-21 12:11:37 +03:00
Yuki Okushi
41bf471950
Rollup merge of #86370 - matteo-briani:fix-rustdoc-stabilized-versions-layout, r=GuillaumeGomez
...
Fix rustdoc stabilized versions layout
Fixes #86342
r? `@GuillaumeGomez`
2021-06-19 10:14:09 +09:00
Trevor Spiteri
a7d20617cc
include reference to woff2 files in COPYRIGHT.txt
2021-06-17 17:52:09 +02:00
Trevor Spiteri
1738c7864c
rustdoc: add optional woff2 versions of Source Serif and Source Code
2021-06-17 17:36:42 +02:00
Matteo Briani
68f9172fc1
Fix rustdoc stabilized versions layout
2021-06-17 09:57:48 +02:00
Jacob Hoffman-Andrews
2ac5c1721a
Fix target highlighting in rustdoc.
...
Also factor out outer_version and const_outer_version into
render_rightside.
2021-06-16 22:48:23 -07:00
Jacob Hoffman-Andrews
5de1391b88
Factor out render_rightside
...
This covers rendering of stability_since and the srclink across methods
and trait implementations, so their DOM representation is consistent.
2021-06-16 22:46:53 -07:00
Jacob Hoffman-Andrews
593d6d1cb1
Make portability part of the summary.
...
That means it will be visible under "Implementors" on trait pages, and
under "Implementations" on struct/enum pages, even when all methods are
collapsed.
Switch to a float layout for rightside elements.
2021-06-16 22:20:25 -07:00
Jacob Hoffman-Andrews
ce6472987d
Remove methods under Implementors on trait pages
...
These were hidden by default, and duplicated information already on the
page anyhow.
Also remove the "Auto-hide trait implementors of a trait" setting,
which is not needed anymore.
2021-06-16 22:08:36 -07:00
Jacob Hoffman-Andrews
62658bfc22
Open trait implementations' toggles by default.
...
This makes it possible to use Ctrl-F to find methods defined in traits.
2021-06-16 10:24:59 -07:00
Guillaume Gomez
a8318e420d
Fix font-weight
2021-06-13 21:49:10 +02:00
Yuki Okushi
f99a892e6d
Rollup merge of #86095 - GuillaumeGomez:search-description-codeblock, r=jsha
...
Search description codeblock
The codeblocks are not displayed correctly:

This PR interprets the HTML correctly (and still prevent invalid HTML because of how it inserts it):

r? ```@jsha```
2021-06-08 13:26:35 +09:00
Yuki Okushi
c783e28905
Rollup merge of #86078 - GuillaumeGomez:type-page-font-weight, r=jsha
...
Type page font weight
Fixes https://github.com/rust-lang/rust/issues/86069 .
r? ```@jsha```
2021-06-08 13:26:32 +09:00
Guillaume Gomez
4ca7a1119e
Fix integration of codeblocks in search result description
2021-06-07 11:12:39 +02:00
Guillaume Gomez
570ba09cbe
Fix invalid weight for type pages
2021-06-06 23:06:01 +02:00
Guillaume Gomez
c01bd560e2
Fix display for search results
2021-06-05 23:03:54 +02:00
bors
19579c6564
Auto merge of #84834 - GuillaumeGomez:sidebar-unification, r=jsha
...
Sidebar unification
This PR does a few things:
* Put crates list at all levels (before, it was only on the "top" items)
* Fix bug in module sidebar: the list of items was from the parent module.
The other changes (on bootstrap mostly) were to allow to generate multiple crates in a same folder so that we can ensure that clicking on the crates in the sidebar works as expected.
I added a rustdoc-gui test to ensure everything is where it should be.
r? `@jyn514`
2021-06-03 02:31:44 +00:00
Guillaume Gomez
0daf8ac41f
Replace h3 for notable traits with div
2021-06-02 21:16:33 +02:00
Jacob Hoffman-Andrews
fab6814ff3
Remove data-level selectors from CSS.
2021-06-02 20:30:17 +02:00
Guillaume Gomez
93389b5568
Remove invalid usage of aria-level
2021-06-01 21:19:28 +02:00
Guillaume Gomez
9077d540da
Replace h3 and h4 containing invalid DOM
2021-06-01 21:19:28 +02:00
Ivan Tham
2970479412
Fix details rustdoc toggle for blanket impl
...
In the meantime, allow all of the details to have the same top.
2021-05-31 23:18:53 +08:00
Guillaume Gomez
9b637fa72e
Improve display of the separation between page items and siblings in the sidebar
2021-05-31 15:20:45 +02:00
Guillaume Gomez
a2ba9ef1ff
Only list crates on the crate page
2021-05-31 15:20:45 +02:00
Guillaume Gomez
e081cd48f4
Remove unneeded file to load sidebar items at crate level
2021-05-31 10:30:36 +02:00
Guillaume Gomez
dab01a05fb
* Put crates list at all levels
...
* Fix bug in module sidebar: the list of items was from the parent module
2021-05-31 10:30:16 +02:00
Guillaume Gomez
9c873c1240
Rollup merge of #85285 - GuillaumeGomez:eslint-check, r=jsha,Mark-Simulacrum
...
Add eslint checks to CI
It also allowed me to fix some potential issues that went unnoticed. Having this process automated will hopefully prevent us to add more errors. :)
cc `@Mark-Simulacrum` (for the add in the CI).
r? `@jsha`
2021-05-30 21:06:43 +02:00
Guillaume Gomez
558b073c4c
Fix eslint error in sidebar-items.js
2021-05-30 20:20:59 +02:00
bors
ff5522fc1a
Auto merge of #85540 - GuillaumeGomez:better-result-dom-generation, r=jsha
...
Better result dom generation
First commit is from https://github.com/rust-lang/rust/pull/85506 .
We realized in https://github.com/rust-lang/rust/pull/85506#issuecomment-844984162 thanks to `@dns2utf8` that in some cases, the generated search result DOM was invalid. This was not strict enough and the DOM was inserted as a big string, which wasn't great.
r? `@jsha`
2021-05-29 16:27:14 +00:00
Yuki Okushi
0264f4fe4a
Rollup merge of #84048 - konan8205:master, r=jsha
...
Avoid CJK legacy fonts in Windows
As metioned in #84035 , the default serif CJK font in Windows is meh-looking.
To avoid this, we should use sans-serif font or provide CJK glyph supported font in `rustdoc.css`.
2021-05-26 13:30:54 +09:00
Guillaume Gomez
e4067a30c7
Fix more search results CSS rules
2021-05-25 17:18:04 +02:00
Guillaume Gomez
61c47ba880
Generate DOM more securely
2021-05-25 17:05:51 +02:00
Guillaume Gomez
706aa31a2d
Move extra search result information for keywords and primitives from CSS to DOM
2021-05-25 10:44:05 +02:00
Guillaume Gomez
9d3b9cdb2c
Rollup merge of #85621 - jsha:serif-in-table, r=GuillaumeGomez
...
Restore sans-serif font for module items.
This was broke in #84462 by modifying a style that applied both to
searches and to module items (and other tables).
Fixes #85616 .
Fixes https://github.com/rust-lang/rust/issues/85545 .
r? `@camelid`
2021-05-24 18:53:36 +02:00
Guillaume Gomez
30f4486ee4
Rollup merge of #85551 - GuillaumeGomez:fix-search-result-overflow, r=jsha
...
Fix search results display
Fixes https://github.com/rust-lang/rust/issues/85544 .
cc `@dns2utf8`
r? `@jsha`
2021-05-24 18:53:35 +02:00
Jacob Hoffman-Andrews
c1c6175e62
Restore sans-serif font for module items.
...
This was broke in #84462 by modifying a style that applied both to
searches and to module items (and other tables).
2021-05-23 22:28:19 -07:00