about summary refs log tree commit diff
path: root/src/test/rustdoc-gui
AgeCommit message (Collapse)AuthorLines
2022-08-27Rollup merge of #101018 - notriddle:notriddle/item-right-docblock-short, ↵Yuki Okushi-1/+1
r=GuillaumeGomez rustdoc: omit start/end tags for empty item description blocks Related to #100952 This is definitely not a complete solution, but it does shrink keysyms/index.html on smithay from 620K to 516K.
2022-08-26rustdoc: remove incorrect CSS selector `.impl-items table td`Michael Howell-0/+30
Fixes #100994 This selector was added in c7312fbae4979c6d4fdfbd1f55a71cd47d82a480. The bug can be seen at <https://doc.rust-lang.org/1.27.0/alloc/slice/trait.SliceIndex.html#foreign-impls>. This rule was added to help with a `<table>` that was used for displaying the function signature [src] lockup. That lockup was changed in 34bd2b845b3acd84c5a9bddae3ff8081c19ec5e9 to use flexbox instead, leaving this selector unused (at least, for its original purpose).
2022-08-25rustdoc: omit start/end tags for empty item description blocksMichael Howell-1/+1
Related to #100952 This is definitely not a complete solution, but it does shrink keysyms/index.html on smithay from 620K to 516K.
2022-08-24Add color test for anchors in all themesGuillaume Gomez-1/+100
2022-08-24Extend GUI test to check colors for all srclink elementsGuillaume Gomez-7/+31
2022-08-23test: bump the mobile width in rustdoc-gui/type-declation-overflow.gomlJosh Stone-2/+2
2022-08-20Extend GUI test for search results colorsGuillaume Gomez-0/+51
2022-08-18Update existing rustdoc-gui tests and add a new oneGuillaume Gomez-6/+248
2022-08-11Rollup merge of #100374 - ↵Matthias Krüger-26/+18
GuillaumeGomez:improve_rustdoc_search_results_page_crates_selection, r=notriddle Improve crate selection on rustdoc search results page Take over of #98855 (screenshots and explanations are there). You can test it [here](https://rustdoc.crud.net/imperio/improve_rustdoc_search_results_page_crates_selection/std/index.html?search=test). cc ``@steffahn`` ``@jsha`` r? ``@notriddle``
2022-08-10rustdoc: make item-infos dimmer on dark theme #93896Jacob Hoffman-Andrews-4/+4
Previously the item-info background colors were too bright for a dark theme, making a bright rectangle that draws the attention.
2022-08-10Update GUI testGuillaume Gomez-32/+14
2022-08-10Improve crate selection on rustdoc search results pageFrank Steffahn-26/+36
Resolves all of issue #93240 Reproduces a similar change as #99086, but with improvements In particular, this PR inlcludes: * redesigning the crate-search selector so the background color matches its surroundings * decrease the font of the dropdown menu to a reaonable size * add a hover effect * make the color of the arrow theme-dependent, using a surrounding div, with :after pseudo-element that can then be transformed using CSS filters to approximate the desired color * fix the text "in" to match the title font * remove the "for xyz" in the "Results for xyz in [All crates]" title when searching for search term "xyz"; you can already see what you're searching for as it's typed in the search bar! * in line with #99086, handle super-long crate names appropriately without a long <select> element escaping the screen area; the improvement is that we also keep the title within a single line now; uses some flex layout shenanigans... * the margins / paddings are adjusted so the selected label of the <select> fits within the rest of that title nicely; also some inconsistency in the way that Firefox renders a <select> with "appearance: none" (roughly 4px more padding left and right of the text than e.g. Chrome) is worked around, and it now produces a result that looks (essentially) identical to Chrome * the color of the help menu and settings menu border in light theme is made to match with the color of the corresponding buttons, like they do (match) in the ayu theme * the casing of "All crates" changes to "all crates" * the new tests from #99086 are temporarily disabled, until they can be adapted later
2022-08-10Rollup merge of #98775 - notriddle:notriddle/mobile-sidebar-scroll-lock, r=jshaMatthias Krüger-0/+42
rustdoc: improve scroll locking in the rustdoc mobile sidebars This PR prevents the main content area from scrolling while the mobile sidebar is open on documentation pages (porting the scroll locking behavior from the source sidebar to the regular sidebar), and also fixes some bad behavior where opening a "mobile" sidebar, and growing the viewport so that the "desktop" mode without scroll locking is activated, could potentially leave the page stuck. This does not affect the behavior on larger screens. Only small ones, where the sidebar covers up the main content. Split out from #98772
2022-08-02Rollup merge of #99779 - GuillaumeGomez:fix-item-info-pos-and-height, ↵Matthias Krüger-8/+35
r=notriddle Fix item info pos and height Fixes https://github.com/rust-lang/rust/issues/98266. Fixes https://github.com/rust-lang/rust/issues/98343. You can test it [here](https://rustdoc.crud.net/imperio/fix-item-info-pos-and-height/lib2/trait.Trait.html). Here is a screenshot of the result: ![Screenshot from 2022-07-26 21-55-53](https://user-images.githubusercontent.com/3050060/181100624-18b8b045-5c25-4c7c-9c44-97d55d29b675.png) r? `@jsha`
2022-07-28Rollup merge of #99810 - GuillaumeGomez:fix-settings-slider-small-width, ↵Dylan DPC-0/+9
r=notriddle Fix settings slider on small width screens Fixes #99794. Screenshot of the fix: ![Screenshot from 2022-07-27 14-17-08](https://user-images.githubusercontent.com/3050060/181250007-55f982d1-89db-45b7-a4f1-0d1729e6a3e3.png) cc `````@jsha````` r? `````@notriddle`````
2022-07-27Rollup merge of #99812 - GuillaumeGomez:fix-headings-colors, r=jsha,notriddleGuillaume Gomez-5/+103
Fix headings colors Fixes #99797. ![image](https://user-images.githubusercontent.com/3050060/181260966-49faf9d3-f6b8-4de4-bc7d-ed9f0467cf68.png) cc `@jsha` r? `@notriddle`
2022-07-27Add GUI tests for headings border and text colorGuillaume Gomez-5/+103
2022-07-27Add GUI test for item info positionGuillaume Gomez-8/+35
2022-07-27Add GUI test for settings in small deviceGuillaume Gomez-0/+9
2022-07-25Add GUI test to prevent sidebar background regressionGuillaume Gomez-0/+22
2022-07-20Rollup merge of #99489 - GuillaumeGomez:gui-fixes, r=notriddleMatthias Krüger-1/+24
rustdoc UI fixes The first commit fixes this bug: ![Screenshot from 2022-07-20 02-54-26](https://user-images.githubusercontent.com/3050060/179879053-fc34f27a-6248-4f5c-9fcb-80adbfc1598c.png) ![Screenshot from 2022-07-20 03-00-03](https://user-images.githubusercontent.com/3050060/179879056-1c0973a0-d535-44e7-a48e-bad692034467.png) The second one fixes the missing change of border color when the search input is focused. cc `@jsha` r? `@notriddle`
2022-07-20Add GUI tests for search input border colorGuillaume Gomez-1/+24
2022-07-17Add GUI test for source code sidebar auto-expandGuillaume Gomez-5/+25
2022-07-16Fix flakyness of GUI testsGuillaume Gomez-0/+26
2022-07-09Add GUI test for search result crate filter dropdownGuillaume Gomez-0/+28
2022-07-05Update rustdoc testsGuillaume Gomez-6/+17
2022-07-05rustdoc: improve scroll locking in the rustdoc mobile sidebarsMichael Howell-0/+42
This commit ports the scroll locking behavior from the source sidebar to the regular sidebar, and also fixes some bad behavior where opening a "mobile" sidebar, and growing the viewport so that the "desktop" mode without scroll locking is activated, could potentially leave the page stuck. This does not affect the behavior on larger screens. Only small ones, where the sidebar covers up the main content.
2022-07-05rustdoc: Add more semantic information to impl idspierwill-17/+17
Instead of generating `#impl`, `#impl-1`, etc., generate IDs like `#impl-Foo<M>`. Co-authored-by: Noah Lev <camelidcamel@gmail.com>
2022-07-05Rollup merge of #98776 - notriddle:notriddle/mobile-sidebar-auto-close, ↵Dylan DPC-0/+31
r=GuillaumeGomez rustdoc: improve click behavior of the source code mobile full-screen "sidebar" On desktop, if you open the source code sidebar, it stays open even when you move from page to page. It used to do the same thing on mobile, but I think that's stupid. Since the file list fills the entire screen on mobile, and you can't really do anything with the currently selected file other than dismiss the "sidebar" to look at it, it's safe to assume that anybody who clicks a file in that list probably wants the list to go away so they can see it. Split out separately from #98772
2022-07-04Rollup merge of #98774 - notriddle:notriddle/source-code-sidebar-button, ↵Matthias Krüger-0/+27
r=GuillaumeGomez rustdoc: make source sidebar toggle a real button This fixes tab focus, so that you can open and close the sidebar from keyboard. This should cause no visible change in appearance at all. The only way you'd know anything different is if you tried to use keyboard controls to open the source code file navigation sidebar. Separated out from #98772
2022-07-03Rollup merge of #98773 - notriddle:notriddle/source-sidebar-details, ↵Ralf Jung-34/+73
r=GuillaumeGomez rustdoc: use <details> tag for the source code sidebar This fixes the extremely poor accessibility of the old system, making it possible to navigate the sidebar by keyboard, and also implicitly gives the sidebar items the correct ARIA roles. Split out separately from #98772
2022-07-02rustdoc: add gui test case ensuring source sidebar doesn't spontaneously openMichael Howell-1/+10
2022-07-02rustdoc: add test case for source sidebar spacingMichael Howell-0/+3
2022-07-02rustdoc: add test case for background color of the sidebar toggle buttonMichael Howell-0/+27
2022-07-01rustdoc: add test cases for :focus on sidebar details elementsMichael Howell-0/+42
2022-07-01Rollup merge of #97249 - GuillaumeGomez:details-summary-fixes, r=notriddleGuillaume Gomez-0/+35
`<details>`/`<summary>` UI fixes With images it's easier to understand: ![Screenshot from 2022-05-21 14-10-42](https://user-images.githubusercontent.com/3050060/169653038-9c58de67-589a-4986-a8ff-dbdddaf136a4.png) ![Screenshot from 2022-05-21 14-08-49](https://user-images.githubusercontent.com/3050060/169653042-56e87258-13fe-4f80-9858-4e15c318c3fb.png) The headings in `<summary>` should not have bottom border so I removed it as well alongside the other fixes. r? `@jsha`
2022-07-01Improve click behavior of the source code mobile full-screen "sidebar"Michael Howell-0/+22
On desktop, if you open the source code sidebar, it stays open even when you move from page to page. It used to do the same thing on mobile, but I think that's stupid. Since the file list fills the entire screen on mobile, and you can't really do anything with the currently selected file other than dismiss the "sidebar" to look at it, it's safe to assume that anybody who clicks a file in that list probably wants the list to go away so they can see it.
2022-07-01rustdoc: use <details> tag for the source code sidebarMichael Howell-34/+28
This fixes the extremely poor accessibility of the old system, making it possible to navigate the sidebar by keyboard, and also implicitly gives the sidebar items the correct ARIA roles.
2022-06-30Rollup merge of #98671 - GuillaumeGomez:source-sidebar-fixes, r=notriddleMatthias Krüger-2/+38
Fix source sidebar bugs This PR fixes the following two bugs: ![Screenshot from 2022-06-29 14-39-58](https://user-images.githubusercontent.com/3050060/176449070-3e3762da-2bfe-4acf-8eb0-34f6eb4c94ed.png) ![Screenshot from 2022-06-29 15-05-09](https://user-images.githubusercontent.com/3050060/176449073-b164820b-bd71-4b1a-990c-bba4e5fce196.png) I added regression tests to prevent them to happen again. I think we should backport it to beta as well. You can test it [here](https://rustdoc.crud.net/imperio/source-sidebar-fixes/src/std/lib.rs.html). cc ```@jsha``` r? ```@notriddle```
2022-06-30Add test to ensure that scroll position is kept when opening/closing source ↵Guillaume Gomez-0/+14
sidebar
2022-06-29Add test for source sidebar toggleGuillaume Gomez-1/+13
2022-06-29Update/add tests for source sidebar in mobile modeGuillaume Gomez-2/+12
2022-06-28rustdoc: add assertion for missing popover divMichael Howell-1/+3
2022-06-28rustdoc: make keyboard commands work when checkboxes are selectedMichael Howell-0/+1
2022-06-28rustdoc: fix keyboard shortcuts bug in settings menuMichael Howell-0/+11
This commit fixes the keyboard shorts code to call localStorage every time a key is pressed. This matters because you're supposed to be able to change a setting and have it immediately take effect.
2022-06-28rustdoc: fix help menu popover togglingMichael Howell-0/+5
2022-06-26Rollup merge of #98297 - GuillaumeGomez:help-pocket-menu, r=notriddleMatthias Krüger-15/+74
Transform help popup into a pocket menu Just like we moved the settings menu into a "pocket menu", it's doing the same to the help popup. You can test it [here](https://rustdoc.crud.net/imperio/help-pocket-menu/doc/foo/index.html) and here is a screenshot: ![Screenshot from 2022-06-20 20-58-29](https://user-images.githubusercontent.com/3050060/174663718-538e9d11-3bf9-48b2-8909-f9bfe75af135.png) r? ``````````@jsha``````````
2022-06-25Add test for source sidebar elements colorsGuillaume Gomez-0/+99
2022-06-23Rollup merge of #98310 - jsha:defer-source-sidebar, r=GuillaumeGomezMichael Goulet-6/+6
rustdoc: optimize loading of source sidebar The source sidebar has a setting to remember whether it should be open or closed. Previously, this setting was handled in source-script.js, which is loaded with `defer`, meaning it is often run after the document is rendered. Since CSS renders the source sidebar as closed by default, changing this after the initial render results in a relayout. Instead, handle the setting in storage.js, which is the first script to load and is the only script that blocks render. This avoids a relayout and means navigating between files with the sidebar open is faster. Demo: https://rustdoc.crud.net/jsha/defer-source-sidebar/src/alloc/ffi/c_str.rs.html r? ````@GuillaumeGomez````
2022-06-23Add/update GUI tests for help pocket menuGuillaume Gomez-15/+74