summary refs log tree commit diff
path: root/src/librustdoc/html/static/main.js
AgeCommit message (Collapse)AuthorLines
2018-03-30Auto merge of #49412 - GuillaumeGomez:hide-type-decl, r=QuietMisdreavusbors-3/+15
Hide type declarations by default I'm not very happy for the moment about the rendering but the bases are here: <img width="610" alt="screen shot 2018-03-27 at 11 56 27" src="https://user-images.githubusercontent.com/3050060/37960492-0e045954-31b6-11e8-9cea-1ef8a3f980c4.png"> r? @QuietMisdreavus
2018-03-28Rollup merge of #49439 - GuillaumeGomez:trait-impl-collapse, r=QuietMisdreavuskennytm-10/+15
Fix trait implementation not collapsing docs r? @QuietMisdreavus
2018-03-28Rollup merge of #49429 - GuillaumeGomez:fix-collapse-toggle-insertion, ↵kennytm-0/+3
r=QuietMisdreavus Fix collapse toggle insertions on impl with docs Just went through this one randomly... When an impl has docs, the collapse toggle isn't generated. This fixes it. r? @QuietMisdreavus
2018-03-28Fix trait implementation not collapsing docsGuillaume Gomez-10/+15
2018-03-27Fix collapse toggle insertions on impl with docsGuillaume Gomez-0/+3
2018-03-27Hide type declarations by defaultGuillaume Gomez-3/+15
2018-03-27Fix search appearanceGuillaume Gomez-1/+5
2018-03-23Fix IE11 searchGuillaume Gomez-0/+7
2018-03-18Fix events handling in rustdocGuillaume Gomez-33/+40
2018-03-13Rollup merge of #48631 - focusaurus:remember-collapse-setting, r=QuietMisdreavuskennytm-0/+6
Remember state of top-level collapse toggle widget This change allows the big top-right expand/collapse toggle to remember its setting across navigation or page reloads. Prior to this change, there was this annoyance: - browse to some docs - Click the minus button to collapse them - browse to other docs (or reload the page) - Everything is expanded again The solution is based on storing a simple boolean flag in localStorage. I think it's a good improvement, but it does introduce the following potentially surprising behavior: - browse to some docs - click the minus button to collapse them - click to expand a particular item (not the main top-right big one) - reload the page, everything is collapsed Paired with @debugsteven on this.
2018-03-09Fix escape not working when searchbar selectedGuillaume Gomez-3/+6
2018-03-09Add missing items in the sidebar for functionsGuillaume Gomez-27/+29
2018-03-05Don't generate '[+]'/'[-]' on 'empty' traitsGuillaume Gomez-7/+18
2018-03-01Rename doc collapse sentinal to rustdoc-collapsePeter Lyons-3/+3
2018-03-01Remember state of top-level collapse toggle widgetPeter Lyons-0/+6
2018-02-28Rollup merge of #48381 - GuillaumeGomez:rustdoc-theme-securities, ↵kennytm-8/+0
r=QuietMisdreavus Rustdoc theme securities Fixes #48375. Fixes #48376. r? @steveklabnik cc @QuietMisdreavus
2018-02-28Auto merge of #47894 - vi:rustdoc_foldable_impls, ↵bors-50/+123
r=GuillaumeGomez,QuietMisdreavus rustdoc: Foldable impl blocks Addresses #40363, #45720, #24483, #23986 and so on * Expands and refactors collapseDocs and toggleAllDocs * Adds [-] toggle to all impls (including inherent impl) * Makes it hiding though main css file, not though element inline style May need to be addressed: * "[-]" and anchor link copier are overlaid a bit * Inherent methods are also hidden by the global [-] toggle. * Auto-collapsing "Iterator" and so on by default is not implemented yet * Tested only shallowly and only in Chromiuim * No tests. Are there tests for css/js part here? * The new implementation may be a bit slower. What next steps are need to be done before the integration?
2018-02-20Allow to not switch to a theme if it doesn't existGuillaume Gomez-8/+0
2018-02-18Fix inliningAaron Hill-3/+8
2018-02-18Cleanup formattingAaron Hill-6/+3
2018-02-18Generate documentation for auto-trait implsAaron Hill-2/+17
A new section is added to both both struct and trait doc pages. On struct/enum pages, a new 'Auto Trait Implementations' section displays any synthetic implementations for auto traits. Currently, this is only done for Send and Sync. On trait pages, a new 'Auto Implementors' section displays all types which automatically implement the trait. Effectively, this is a list of all public types in the standard library. Synthesized impls for a particular auto trait ('synthetic impls') take into account generic bounds. For example, a type 'struct Foo<T>(T)' will have 'impl<T> Send for Foo<T> where T: Send' generated for it. Manual implementations of auto traits are also taken into account. If we have the following types: 'struct Foo<T>(T)' 'struct Wrapper<T>(Foo<T>)' 'unsafe impl<T> Send for Wrapper<T>' // pretend that Wrapper<T> makes this sound somehow Then Wrapper will have the following impl generated: 'impl<T> Send for Wrapper<T>' reflecting the fact that 'T: Send' need not hold for 'Wrapper<T>: Send' to hold Lifetimes, HRTBS, and projections (e.g. '<T as Iterator>::Item') are taken into account by synthetic impls However, if a type can *never* implement a particular auto trait (e.g. 'struct MyStruct<T>(*const T)'), then a negative impl will be generated (in this case, 'impl<T> !Send for MyStruct<T>') All of this means that a user should be able to copy-paste a synthetic impl into their code, without any observable changes in behavior (assuming the rest of the program remains unchanged).
2018-02-08Hide theme button under menu in mobile mode and fix top margin issue (in ↵Guillaume Gomez-31/+6
mobile too)
2018-02-03Fix rendering issues on mobileGuillaume Gomez-0/+26
2018-02-01rustdoc: Fix erroneous collapsing of second+ inherent impl.Vitaly _Vi Shukela-2/+3
2018-02-01rustdoc: Auto-collapse all non-inherent implsVitaly _Vi Shukela-0/+16
2018-01-31rustdoc: Fix some minor issues per reviewerVitaly _Vi Shukela-15/+17
2018-01-31rustdoc: Fix tidy errors found by travisVitaly _Vi Shukela-9/+9
2018-01-31rustdoc: Foldable impl blocksVitaly _Vi Shukela-51/+105
Addresses #40363, #45720, #24483, #23986 and so on * Expands and refactors collapseDocs and toggleAllDocs * Adds [-] toggle to all impls (including inherent impl) * Makes it hiding though main css file, not though element style May need to be addressed: * "[-]" and anchor link copier are overlaid a bit * Inherent methods are also hidden by the global [-] toggle. * Auto-collapsing "Iterator" and so on by default is not implemented yet * Tested only shallowly and only in Chromiuim * No tests. Are there tests for css/js part here? * The new implementation may be a bit slower.
2018-01-23Auto merge of #47678 - kennytm:rollup, r=kennytmbors-2/+2
Rollup of 14 pull requests - Successful merges: #47423, #47425, #47440, #47541, #47549, #47554, #47558, #47610, #47635, #47655, #47661, #47662, #47667, #47672 - Failed merges:
2018-01-22Fix quoted searchGuillaume Gomez-2/+2
2018-01-21Add possibility to have multiple themesGuillaume Gomez-1/+11
2018-01-12Prepare main.js for testsGuillaume Gomez-43/+39
2018-01-05Fix search bar defocusGuillaume Gomez-0/+4
2018-01-02Indentation fixJohannes Boczek-2/+2
Fixed intentaion (tabs -> spaces) Added trailing newline
2018-01-02Defocus search bar in rustdoc pagesJohannes Boczek-0/+6
Escape now removes focus from the search bar
2017-12-20Fix sidebar on iosGuillaume Gomez-9/+17
2017-12-18Rollup merge of #46824 - GuillaumeGomez:doc-sidebar, r=QuietMisdreavusGuillaume Gomez-1/+1
Fix dynamic crates listing in doc sidebar Fixes #46687. r? @QuietMisdreavus
2017-12-18Fix dynamic crates listing in doc sidebarGuillaume Gomez-1/+1
2017-12-15Improve results a bitGuillaume Gomez-2/+6
2017-12-15make doc search more relevantGuillaume Gomez-12/+7
2017-12-12Fix type filter in rustdoc jsGuillaume Gomez-4/+4
2017-12-07Fix JS errorsGuillaume Gomez-2/+8
2017-12-07Greatly improve sidebar when width < 700pxGuillaume Gomez-1/+37
2017-12-07Auto merge of #46221 - GuillaumeGomez:doc-script-load-speedup, r=nrcbors-2/+9
Speedup search loading when search url is received Fixes #45971. r? @nrc cc @rust-lang/docs
2017-12-06Auto merge of #45898 - JRegimbal:master, r=QuietMisdreavusbors-6/+6
Change "Types/modules" title of search tab to be more accurate From issue #45787. Used "In name" as per suggestion from @Seeker14491.
2017-12-05Changed tab names to those agreed upon.JRegimbal-6/+6
Tabs are "In Names", "In Parameters", and "In Return Types".
2017-12-01Fix deduplication of itemsGuillaume Gomez-3/+10
2017-11-26Fix global searchGuillaume Gomez-227/+227
2017-11-25Auto merge of #46081 - GuillaumeGomez:fix-path-search, r=QuietMisdreavusbors-82/+141
Fix path search Fixes #46015. r? @QuietMisdreavus
2017-11-23Speedup search loading when search url is receivedGuillaume Gomez-2/+9