summary refs log tree commit diff
path: root/src/librustdoc/html/static
AgeCommit message (Collapse)AuthorLines
2020-07-10rustdoc: Fix doc aliases with crate filteringOliver Middleton-6/+7
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.
2020-05-31Rollup merge of #72691 - GuillaumeGomez:escape-key-handling, r=kinnisonDylan DPC-4/+12
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
2020-05-31Put input timeout clearance inside a functionGuillaume Gomez-13/+11
2020-05-28Fix escape key handlingGuillaume Gomez-3/+13
2020-05-27Rollup merge of #72610 - GuillaumeGomez:revert-unwanted-css-changes, r=Dylan-DPCDylan DPC-9/+0
Remove font-display settings Since for the moment, the result isn't as expected since #72092 when not using docs locally, let's revert them. r? @Dylan-DPC
2020-05-26Improve formattingGuillaume Gomez-2/+2
2020-05-26Remove font-display settingsGuillaume Gomez-9/+0
2020-05-26Fix eslint lintsGuillaume Gomez-34/+34
2020-05-26Reexported functions are now declared directly as "windows" fieldGuillaume Gomez-11/+6
2020-05-26Move "global" code into anonymous functionsGuillaume Gomez-248/+258
2020-05-26Move focusSearchBar and defocusSearchBar functions to the top of the file ↵Guillaume Gomez-10/+11
with other functions
2020-05-24Rollup merge of #72092 - workingjubilee:patch-2, r=GuillaumeGomezDylan DPC-0/+9
Unblock font loading in rustdoc.css rustdoc's font loading defaults to "auto", so browsers may block render. But rustdoc's case prefers a faster TTI for scrolling, this means the strictest font-display in use should be "swap". rustdoc's fonts do provide notable legibility improvements but first-time users will have little trouble reading without. This means "optional" is preferred. The one exception is Source Serif Pro: it's a big difference for body text, so "fallback" is preferred over "optional" to cause a (tiny) block. This follows up on (but does not resolve) #20962, taking PageSpeed Insight's rec fairly directly. Supporting reading material: https://drafts.csswg.org/css-fonts-4/#font-display-desc
2020-05-21Rollup merge of #72421 - GuillaumeGomez:fix-impl-hover-anchor, r=kinnisonRalf Jung-1/+1
Fix anchor display when hovering impl A little gif for the fixed behaviour: ![hover-anchor](https://user-images.githubusercontent.com/3050060/82549808-cfdf4080-9b5d-11ea-9495-2b1d90b2a791.gif) r? @kinnison
2020-05-21Rollup merge of #72272 - ↵Ralf Jung-0/+6
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
2020-05-21Fix anchor display when hovering implGuillaume Gomez-1/+1
2020-05-19Fix going back in history to a search result page on firefoxGuillaume Gomez-0/+6
2020-05-14* Update aliases data struct from HashMap to BTreeMap to have more ↵Guillaume Gomez-3/+4
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)
2020-05-14Make current crate aliases go firstGuillaume Gomez-6/+14
2020-05-14Move doc alias discovery into the Attributes struct and some code improvementsGuillaume Gomez-1/+1
2020-05-10Unblock font loading in rustdoc.cssJubilee-0/+9
rustdoc's font loading defaults to "auto", so browsers may block render. But rustdoc's case prefers a faster TTI for scrolling, this means the strictest font-display in use should be "swap". rustdoc's fonts do provide notable legibility improvements but first-time users will have little trouble reading without. This means "optional" is preferred. The one exception is Source Serif Pro: it's a big difference for body text, so "fallback" is preferred over "optional" to cause a (tiny) block.
2020-05-07Merge aliases and search-indexGuillaume Gomez-39/+87
2020-05-07Improve doc alias JS codeGuillaume Gomez-23/+50
2020-05-05Replace title "Methods" with "Implementations"Guillaume Gomez-1/+1
2020-04-07Extend sidebar scrollbar changes to all scrollbarsGuillaume Gomez-13/+41
2020-04-07Improve scrollbar display in rustdocGuillaume Gomez-0/+36
2020-03-28Fix rustdoc.css CSS tab-size property0xd4d-2/+2
2020-03-19Auto merge of #69402 - GuillaumeGomez:extend-search, r=kinnisonbors-64/+66
Extend search I realized that when looking for "struct:String" in the rustdoc search for example, the "in arguments" and "returned" tabs were always empty. After some investigation, I realized it was because we only provided the name, and not the type, making it impossible to pass the "type filtering" check. To resolve this, I added the type alongside the name. Note for the future: we could improve this by instead only registering the path id and use the path dictionary directly. The only problem with that solution (which I already tested) is that it becomes complicated for types in other crates. It'd force us to handle both case with an id and a case with `(name, type)`. I found the current PR big enough to not want to provide it directly. However, I think this is definitely worth it to make it work this way in the future. About the two tests I added: they don't have much interest except checking that we actually have something returned in the search in the cases of a type filtering with and without literal search. I also had to update a bit the test script to add the new locally global (haha) variable I created (`NO_TYPE_FILTER`). I added this variable to make the code easier to read than just "-1". r? @kinnison cc @ollie27
2020-03-16Update src/librustdoc/html/static/main.js Guillaume Gomez-1/+1
Fix variable name Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
2020-03-16formattingGuillaume Gomez-6/+4
2020-03-16Support type search for arguments and returned typesGuillaume Gomez-62/+66
2020-03-14Make ignore and compile fail signs more visibleGuillaume Gomez-13/+21
2020-02-27Remove "important traits" featureGuillaume Gomez-187/+3
2020-02-15Auto merge of #68668 - GuillaumeGomez:struct-variant-field-search, r=ollie27bors-8/+22
Struct variant field search Fixes #16017. Reopening of #64724. cc @tomjakubowski cc @ollie27 r? @kinnison
2020-02-11[ImgBot] Optimize imagesImgBotApp-3/+3
*Total -- 10.65kb -> 8.44kb (20.82%) /src/etc/installer/gfx/rust-logo.png -- 5.71kb -> 3.82kb (33.11%) /src/librustdoc/html/static/down-arrow.svg -- 0.63kb -> 0.50kb (20.44%) /src/librustdoc/html/static/wheel.svg -- 3.86kb -> 3.68kb (4.66%) /src/librustdoc/html/static/brush.svg -- 0.47kb -> 0.44kb (4.61%) Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-01-30rustdoc: emit JS paths for struct-like variantsTom Jakubowski-8/+22
On the backend, rustdoc now emits `paths` entries to a crate's search index for struct-like enum variants, and index items of type structfield which belong to such variants point to their variant parents in the `paths` table, rather than their enum grandparents. The path entry for a variant is the fully qualified module path plus the enum name. On the frontend, the search code recognizes structfields belonging to structlike variants in the `paths` table and re-constructs the URL to the field's anchor on the enum documentation page. closes #16017
2020-01-29Rollup merge of #68598 - GuillaumeGomez:fix-null-synthetic_implementors, ↵Yuki Okushi-14/+16
r=ollie27 Fix null synthetic_implementors error Fixes #68584. r? @ollie27 cc @kinnison
2020-01-28Fix null synthetic_implementors errorGuillaume Gomez-14/+16
2020-01-26Fix run button positionning in case of scrollingGuillaume Gomez-1/+3
2020-01-20Remove usage of global variable "inlined_types"Guillaume Gomez-2/+18
2020-01-14Rollup merge of #68166 - ollie27:rustdoc_help_escape, r=GuillaumeGomezYuki Okushi-2/+2
rustdoc: HTML escape arrows on help popup r? @GuillaumeGomez
2020-01-12rustdoc: HTML escape arrows on help popupOliver Middleton-2/+2
2020-01-09rustdoc: use another stability mark arrow, no rotate.Liigo Zhuang-3/+2
2020-01-09rustdoc: improve stability mark arrowsLiigo Zhuang-4/+9
2019-12-22Fix invalid results showing backGuillaume Gomez-0/+4
2019-12-22Improve code readabilityGuillaume Gomez-43/+37
2019-12-22Improve JS code a bit by avoid erasing all event handlersGuillaume Gomez-4/+5
2019-12-15Fix JS error when loading page with searchGuillaume Gomez-1/+1
2019-12-02Add missing checkGuillaume Gomez-1/+1
2019-11-25Rollup merge of #65613 - Mark-Simulacrum:rustdoc-preserve-ws, r=GuillaumeGomezPietro Albini-1/+1
Preserve whitespace inside one-backtick codeblocks Previously this was only done inside short docblocks (e.g., summary lines), but we should also do so in general. Fixes #65555
2019-11-21Revert "Update Source Code Pro and include italics"Guillaume Gomez-10/+3
This reverts commit ea9519bf16f0be137a814a49c9fbaf232ba49a43.