Guillaume Gomez
5748b4ce95
Add missing check
2019-12-02 10:25:36 +01:00
Mazdak Farrokhzad
4bd9168d7f
Rollup merge of #66514 - GuillaumeGomez:fix-search-filter-save, r=kinnison
...
Fix selected crate search filter
Fixes #62929 .
r? @kinnison
2019-11-20 18:32:10 +01:00
Mazdak Farrokhzad
00cbc75c74
Rollup merge of #66298 - Ppjet6:disable-search-field, r=GuillaumeGomez
...
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>
2019-11-20 18:32:06 +01:00
Maxime “pep” Buquet
5cbd406a14
rustdoc: fixes #64305 : disable search field instead of hidding it
...
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2019-11-20 11:32:58 +01:00
Mazdak Farrokhzad
95b9766e0a
Rollup merge of #66430 - dns2utf8:fix_code_selection_click_handler, r=GuillaumeGomez
...
[doc] Fix the source code highlighting on source comments
The code would always forget the previous selection.
r? @GuillaumeGomez
2019-11-19 13:10:15 +01:00
Guillaume Gomez
00ef5c1b98
Fix selected crate search filter
2019-11-18 14:15:00 +01:00
Stefan Schindler
1bbb8168ec
Prevent jumps when selecting one or many lines
2019-11-15 02:30:44 +01:00
Stefan Schindler
71cf364c3c
Fix the source code highlighting on source comments
2019-11-15 02:02:09 +01:00
Stefan Schindler
cee0403b5c
Code cleanup to remove douplacte var definition
...
Also move the declaration outside the loop since they accumulate state with each iteration
2019-11-15 00:45:08 +01:00
Stefan Schindler
e3afe6ac23
Remove unused argument
2019-11-15 00:27:53 +01:00
Yuki Okushi
392ebad5c6
Rollup merge of #66123 - GuillaumeGomez:no-more-hidden-elements, r=Dylan-DPC
...
No more hidden elements
Fixes #66046 .
Follow-up of #66082 .
r? @kinnison
2019-11-08 13:42:19 +09:00
Mazdak Farrokhzad
59e79ff137
Rollup merge of #64696 - GuillaumeGomez:rustdoc-sub-settings, 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
2019-11-07 14:27:21 +01:00
Guillaume Gomez
d4527b7e00
Only call onHashChange instead of both functions
2019-11-07 10:39:53 +01:00
Guillaume Gomez
24e093c5c3
Remove old isHidden function
2019-11-07 10:13:44 +01:00
Guillaume Gomez
f66a331335
When a URL hash refers to a hidden element, it makes the element visible
2019-11-06 10:10:56 +01:00
Guillaume Gomez
1c78af7de2
clean highlightSourceLines code
2019-11-04 13:28:50 +01:00
bors
0d5264a03c
Auto merge of #65780 - GuillaumeGomez:move-help-popup-generation-code, 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
2019-11-03 21:55:48 +00:00
Tyler Mandry
c4960c2602
Rollup merge of #65741 - GuillaumeGomez:help-popup, r=Dylan-DPC
...
Prevent help popup to disappear when clicking on it
Fixes #65736 .
r? @kinnison
2019-10-29 12:01:37 -07:00
Guillaume Gomez
79956b96e8
add sub settings in rustdoc
2019-10-29 13:54:11 +01:00
Guillaume Gomez
91ef9600db
reduce size of generated HTML files by moving the popup helper code to the JS
2019-10-27 11:42:38 +01:00
Guillaume Gomez
1d2808341a
Cleanup search element getter
2019-10-27 11:40:47 +01:00
Guillaume Gomez
863796be7d
Improve help popup detection
2019-10-25 13:43:25 +02:00
Guillaume Gomez
e836b1b9d0
Prevent help popup to disappear when clicking on it
2019-10-24 22:52:54 +02:00
Guillaume Gomez
01a1bcb7f9
Fix default "disable-shortcuts" feature value
2019-10-24 00:25:04 +02:00
Guillaume Gomez
87744841c8
Add option to disable keyboard shortcuts in docs
2019-10-21 11:36:52 +02:00
Mazdak Farrokhzad
f7ee13040b
Rollup merge of #64312 - GuillaumeGomez:rustdoc-better-esc-handling, 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
2019-09-09 17:42:29 +02:00
Guillaume Gomez
0d34fe42f7
Unify escape usage
2019-09-09 17:04:28 +02:00
Mazdak Farrokhzad
ab75a1713a
Rollup merge of #64094 - kawa-yoiko:rustdoc-search, r=GuillaumeGomez
...
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.
2019-09-06 09:36:38 +02:00
Mazdak Farrokhzad
6da74a2605
Rollup merge of #63774 - chocol4te:fix_63707, r=GuillaumeGomez
...
Fix `window.hashchange is not a function`
Closes #63707 .
2019-09-05 12:11:05 +02:00
Shiqing
cb84aa4744
Improve searching in rustdoc and add tests
2019-09-04 21:27:13 +08:00
Mazdak Farrokhzad
1ea8fc587c
Rollup merge of #62734 - GuillaumeGomez:hide-default-methods, r=Mark-Simulacrum
...
Hide trait default methods
Fixes #62499 .
However, the question remains: do we want to extend it to this point or not?
r? @QuietMisdreavus
2019-08-29 17:13:57 +02:00
bors
0414dfa0aa
Auto merge of #62941 - GuillaumeGomez:save-crate-filter, r=Mark-Simulacrum
...
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
2019-08-28 21:42:52 +00:00
Guillaume Gomez
06228d33ca
Save crate filtering on rustdoc
2019-08-28 11:56:21 +02:00
Guillaume Gomez
3375b05cd0
Fix confusion in theme picker functions
2019-08-21 13:10:06 +02:00
Ferdia McKeogh
5a446c1ea9
Fix window.hashchange is not a function
2019-08-21 09:13:51 +01:00
Guillaume Gomez
cb873c5a87
code formatting
2019-07-16 18:32:40 +02:00
Guillaume Gomez
8ca3887439
Fix lines highlighting in rustdoc source view
2019-05-21 14:49:53 +02:00
bors
963184bbb6
Auto merge of #60093 - GuillaumeGomez:fix-attrs-pos, r=Manishearth
...
Fix attrs pos
Fixes #60042 .
Screenshot:
<img width="438" alt="Screenshot 2019-05-12 at 15 02 25" src="https://user-images.githubusercontent.com/3050060/57582606-1455ec00-74c7-11e9-9d4e-5ec4da4de7dd.png ">
r? @rust-lang/rustdoc
2019-05-18 20:49:22 +00:00
Dmitry Murzin
b6cfcd363b
Fix default value for setting "Auto-hide item methods' documentation"
2019-04-28 04:25:22 +03:00
Guillaume Gomez
5971266301
Fixes attributes position in types decl
2019-04-18 00:02:12 +02:00
bors
876a3bcb15
Auto merge of #59622 - GuillaumeGomez:improve-one-char-search, r=QuietMisdreavus
...
Ensure that exact matches come first in rustdoc search
Fixes #59287 .
cc @scottmcm
r? @QuietMisdreavus
2019-04-12 08:59:03 +00:00
Guillaume Gomez
19073676bf
Ensure that exact matches come first in rustdoc search
2019-04-02 00:09:27 +02:00
Mazdak Farrokhzad
ca14c56563
Rollup merge of #59534 - laurmaedje:collapse-blanket-impls, r=GuillaumeGomez
...
rustdoc: collapse blanket impls in the same way as normal impls
If the rustdoc setting _Auto-hide trait implementations documentation_ is activated (on by default), normal trait implementations are collapsed by default.
Blanket impls on the other hand are not collapsed. I'm not sure whether this is intended, but considering that the blanket impls for `From`, `Into`, `TryFrom`, ... are on every type, it would reduce the documentation bloat if these would also be collapsed when the setting is active.
(I'm not really familiar with the codebase and therefore just copied the code for the normal impl collapsing, but I could deduplicate it into a method, of course, too.)
2019-03-30 07:51:45 +01:00
Mazdak Farrokhzad
d050a157a8
Rollup merge of #59376 - davidtwco:finally-rfc-2008-variants, r=petrochenkov,QuietMisdreavus
...
RFC 2008: Enum Variants
Part of #44109 . See [Zulip topic](132663140
) for previous discussion.
r? @petrochenkov
cc @nikomatsakis
2019-03-30 07:51:34 +01:00
Laurenz
9e4ec7a568
Collapse blanket impls in the same way as normal impls
2019-03-29 19:47:19 +01:00
David Wood
49a6da2cda
Support non-exhaustive enum variants in rustdoc.
...
This commit adds support for non-exhaustive enum variants in rustdoc,
extending the existing support for non-exhaustive enums and structs.
2019-03-29 11:03:35 +01:00
Guillaume Gomez
befe9cac91
Add test
2019-03-23 14:44:20 +01:00
Guillaume Gomez
6bce61cd4b
Fix invalid returned types generation
2019-03-21 22:49:43 +01:00
Guillaume Gomez
aefe75095a
Add bounds for return types as well
2019-03-21 22:49:43 +01:00
Guillaume Gomez
d611301e3e
Small generics search improvement
2019-03-21 22:49:43 +01:00