summary refs log tree commit diff
path: root/src/test/rustdoc-gui
AgeCommit message (Collapse)AuthorLines
2022-10-04Add GUI regression test for search results colorsGuillaume Gomez-4/+152
(cherry picked from commit a925e203d199daac8589efa2b5e9849474f1e3a1)
2022-10-04Add GUI test for links colorsGuillaume Gomez-0/+85
(cherry picked from commit 5d449a017b1740939d56d42ab5025f9854b407b2)
2022-09-15Rollup merge of #101778 - notriddle:notriddle/docblock-short-p, r=GuillaumeGomezMatthias Krüger-15/+3
rustdoc: clean up DOM by removing `.dockblock-short p` On https://doc.rust-lang.org/nightly/std/ this reduces the number out of `document.querySelectorAll("*").length` from 1278 to 1103. Preview: https://notriddle.com/notriddle-rustdoc-test/docblock-short-p/std/index.html
2022-09-13rustdoc: clean up DOM by removing `.dockblock-short p`Michael Howell-15/+3
On https://doc.rust-lang.org/nightly/std/ this reduces the number out of `document.querySelectorAll("*").length` from 1278 to 1103.
2022-09-12rustdoc: remove no-op CSS `.search-results .result-name > span`Michael Howell-0/+3
The rule `display: inline-block` was added in 5afa52bc7dee683f25f437dddf338dbc6ad32eb8. The `margin: 0` and `font-weight: normal` were added in c01bd560e2f87a9a960ed071213edd70f73171a8. Both seem to have been added to override class-based rules that were targetted at method sections. See <https://github.com/rust-lang/rust/blob/c01bd560e2f87a9a960ed071213edd70f73171a8/src/librustdoc/html/static/rustdoc.css#L140-L148> for an example. The selectors that these were meant to override were changed in a8318e420d19c364b1eec33956a86164941f6df4 and 76a3b609d0b93c5d8da5e4e3db37bd03e5cb1c30 to be more specific, so they no longer need to be overridden.
2022-09-12Rollup merge of #101693 - GuillaumeGomez:update-browser-ui-test-0-10, ↵Dylan DPC-12/+15
r=notriddle Update browser UI test 0 10 The biggest change from this browser-ui-test update is the upgrade of the puppeteer version to `17.1.3` (the latest in short). I also added the command `click-with-offset` to still allow us to click on the `[-]` part. cc `@jsha` r? `@notriddle`
2022-09-11Update tests for new browser-ui-test versionGuillaume Gomez-12/+15
2022-09-10Auto merge of #101613 - GuillaumeGomez:codeblock-tooltip, r=notriddlebors-50/+50
Simplify codeblock and their associated tooltip It is based on https://github.com/rust-lang/rust/pull/101600 so it needs to wait for this one to be merged first. This PR does two things: * Remove CSS class duplication by setting CSS classes such as `compile_fail` directly on the `div` wrapping both the codeblock and the tooltip. * Simplify DOM: no need to wrap the tooltip into a `<div>`, it can work just as well without it. You can test it [here](https://rustdoc.crud.net/imperio/codeblock-tooltip/std/string/struct.String.html#deref). r? `@notriddle`
2022-09-10Update rustdoc GUI testsGuillaume Gomez-50/+50
2022-09-10Rollup merge of #101624 - notriddle:notriddle/search, r=GuillaumeGomezMatthias Krüger-2/+2
rustdoc: remove unused CSS `#search { position: relative }` This was added in 611d0e6ccef8b60fa86ff5aa8fe3571cd36c444a, to allow its child `#results` element to be absolutely positioned inside it. The child stopped being absolute in 8c0469552e879f6319f8f96db660bab9eae1de5c. To keep the layout looking the same, the links need to not have `width: 100%` any more, relying instead on the box naturally growing to fit because it has `display: block`.
2022-09-09rustdoc: update test casesMichael Howell-2/+2
Width changed by 2/4 pixels by b273c7502e363baeec293b972f671070e80f1391
2022-09-09rustdoc: simplify the codeblock tooltipMichael Howell-23/+23
This commit moves the tooltip into example-wrap, simplifying allowing several overly-complex things to be fixed: * The mousover javascript can be removed, because hovering example-wrap can style the tooltip inside. * The sibling selecor can be removed, because hovering the tooltip also hovers the wrapper, which can hover the codeblock itself. * The relative positioning of the `<li>` tag, which was added in e861efd9f9ca45c1048a256812dfe8faffbb1367 to fix the positioning of the code tooltip, can now be removed, because example-wrap itself already has relative positioning.
2022-09-09Add gui test for codeblocks tooltip colorsGuillaume Gomez-0/+96
2022-09-09Clean up themes a bit moreGuillaume Gomez-2/+8
2022-09-04Remove duplicated test (superseeded by search-form-elements.goml)Guillaume Gomez-22/+0
2022-09-03Rollup merge of #101335 - notriddle:notriddle/methods-stability, r=notriddleMatthias Krüger-0/+20
rustdoc: remove old CSS selector that causes weird spacing It was added with e08a84a0c18739417a50c3e46917ced5037244eb (actually, it was called `.methods > .stability` at the time) and was directly nested that way. **EDIT**: It is technically reachable code still, but it seems wrong. ## With the old CSS rule still present https://notriddle.com/notriddle-rustdoc-test/weird-spacing/lib/struct.Foo.html ![image](https://user-images.githubusercontent.com/1593513/188216226-c667c560-d33d-494f-a492-4e0ec3ac0009.png) ## Version 2 (an older version of this PR) https://notriddle.com/notriddle-rustdoc-test/normal-spacing-2/lib/struct.Foo.html ![image](https://user-images.githubusercontent.com/1593513/188216418-9fcd3109-f1b2-425d-b4fc-0c6b3b54e48e.png) ## Version 3 (with alignment fix for mobile) https://notriddle.com/notriddle-rustdoc-test/normal-spacing-3/lib/struct.Foo.html ![image](https://user-images.githubusercontent.com/1593513/188223161-0e1ebce7-842f-41cb-8a0c-ae43aedcfccc.png)
2022-09-03Update rustdoc-gui tests for search-input border color on dark themeGuillaume Gomez-2/+2
2022-09-02rustdoc: put in rule to get alignment in desktop and mobile layoutsMichael Howell-0/+20
2022-09-01Rollup merge of #101245 - GuillaumeGomez:remove-unneeded-where-whitespace, ↵Matthias Krüger-0/+54
r=notriddle Remove unneeded where whitespace It fixes these two bugs: ![Screenshot from 2022-08-31 18-14-40](https://user-images.githubusercontent.com/3050060/187727950-94657419-abfa-454c-9d27-004280fbcb45.png) ![Screenshot from 2022-08-31 18-14-49](https://user-images.githubusercontent.com/3050060/187727956-21d1b39d-62d7-4e7b-8f6f-631ceda67a19.png) It's a relic from a very old time (this commit: https://github.com/rust-lang/rust/commit/bfd01b7f40ae2cbfe9acbc1d10e79ffe16870df8). You can test the result [here](https://rustdoc.crud.net/imperio/remove-unneeded-where-whitespace/lib2/struct.WhereWhitespace.html). cc `````````@jsha````````` r? `````````@notriddle`````````
2022-09-01Auto merge of #100606 - cuviper:upgrade-linux-ci, r=Mark-Simulacrumbors-2/+2
ci: Upgrade non-dist Linux testers from ubuntu:16.04 to 22.04 The main goal of updating to 22.04 is to get away from `llvm.allow-old-toolchain`. A side benefit is that they can also use the system `cmake` instead of building one.
2022-08-31Add rustdoc GUI testGuillaume Gomez-0/+27
2022-08-31Update rustdoc testsGuillaume Gomez-0/+27
2022-08-31Rollup merge of #100804 - GuillaumeGomez:search-results-color-ayu, r=notriddleYuki Okushi-0/+51
Fix search results color on hover for ayu theme Before: ![image](https://user-images.githubusercontent.com/3050060/185747851-038d2333-8b01-44a8-a104-ceb7410ac089.png) After: ![image](https://user-images.githubusercontent.com/3050060/185747869-53b502f5-5800-470f-b897-2683f1cdb7ee.png) You can test it [here](https://rustdoc.crud.net/imperio/search-results-color-ayu/foo/index.html?search=item). r? ``@jsha``
2022-08-27Rollup merge of #101046 - notriddle:notriddle/table-css, r=jshaYuki Okushi-0/+30
rustdoc: remove incorrect CSS selector `.impl-items table td` 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-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