summary refs log tree commit diff
path: root/src/test/rustdoc-gui
AgeCommit message (Collapse)AuthorLines
2022-05-12Rollup merge of #96939 - GuillaumeGomez:settings-css, r=notriddleMatthias Krüger-0/+5
Fix settings page CSS In https://github.com/rust-lang/rust/pull/96741, I moved the CSS loading outside of `settings.js`. The result was that on the settings page, there isn't the settings CSS anymore: ![Screenshot from 2022-05-11 11-09-24](https://user-images.githubusercontent.com/3050060/167817969-6750931b-3e6e-4178-b5a9-ee3851e983be.png) I also used this opportunity to remove unused CSS rules (we don't have `<select>` elements anymore in the settings). cc `@jsha` r? `@notriddle`
2022-05-11Ensure that the settings CSS is loaded on the settings pageGuillaume Gomez-0/+5
2022-05-10Clean up rustdoc GUI testGuillaume Gomez-2/+1
2022-05-06Rollup merge of #96754 - notriddle:notriddle/impl-dups, r=GuillaumeGomezGuillaume Gomez-0/+23
rustdoc: ensure HTML/JS side implementors don't have dups Fixes #94641 Rendered: - https://notriddle.com/notriddle-rustdoc-test/impl-dups/std/iter/trait.Iterator.html - https://notriddle.com/notriddle-rustdoc-test/impl-dups/core/iter/trait.Iterator.html
2022-05-06Rollup merge of #96748 - GuillaumeGomez:reexports-in-search, r=notriddleGuillaume Gomez-9/+42
Fixes reexports in search Fixes #96681. At some point we stopped reexporting items in search so this PR fixes it. It also adds a regression test. r? ```@notriddle```
2022-05-06Add missing newlineMichael Howell-1/+1
2022-05-06Add GUI test for search reexportsGuillaume Gomez-9/+42
2022-05-05rustdoc: ensure HTML/JS side implementors don't have dupsMichael Howell-0/+23
2022-05-05rustdoc: add test case assertions for ArrowDown highlight first resultMichael Howell-0/+4
2022-05-05rustdoc: fix keyboard shortcuts and console log on search pageMichael Howell-0/+20
2022-05-05rustdoc: change the "In Function Signatures" to context-sensitiveMichael Howell-4/+12
* If it's just `-> a`, use "In Function Return Types" * If it's just `a b`, use "In Function Parameters" * Otherwise, still use "In Function Signatures"
2022-05-05Use STARTS_WITH, since it's more specificMichael Howell-4/+4
Co-Authored-By: Guillaume Gomez <guillaume1.gomez@gmail.com>
2022-05-05rustdoc: when running a function-signature search, tweak the tab barMichael Howell-23/+32
2022-04-30Extend settings test to ensure settings text is as expectedGuillaume Gomez-0/+29
2022-04-30Add GUI test for settings menuGuillaume Gomez-9/+56
2022-04-14clarify doc(cfg) wordingAndy Russell-3/+3
The current "This is supported" wording implies that it's possible to still use the item on other configurations, but in an unsupported way. Changing this to "Available" removes this ambiguity.
2022-04-05Add GUI test to ensure that the width of the item-info does not overflow its ↵Guillaume Gomez-0/+38
parent
2022-03-31Rollup merge of #95470 - GuillaumeGomez:fix-gui-spurious-test, r=notriddleDylan DPC-2/+1
Fix last rustdoc-gui spurious test This should the last spurious failing GUI test from https://github.com/rust-lang/rust/issues/93784. r? ``@notriddle``
2022-03-30Fix last rustdoc-gui spurious testGuillaume Gomez-2/+1
2022-03-25Replace wait-for instructions for rustdoc GUI tests with wait-for-cssGuillaume Gomez-36/+19
2022-03-19Remove animation on source sidebarGuillaume Gomez-1/+0
2022-03-15Add URL GUI testsGuillaume Gomez-0/+6
2022-03-15Merge both "search-result-color" GUI testsGuillaume Gomez-19/+20
2022-03-13Auto merge of #94320 - GuillaumeGomez:sidebar-display, r=jshabors-0/+22
Fix sidebar elements display The bug can be seen more easily when the javascript is disabled: ![Screenshot from 2022-02-24 12-18-28](https://user-images.githubusercontent.com/3050060/155514578-cbefd3dd-f006-47e9-bc76-7c26d7e823e8.png) r? `@jsha`
2022-03-11Update GUI testGuillaume Gomez-1/+8
2022-03-10Rollup merge of #94740 - GuillaumeGomez:unify-impl-blocks, r=notriddleMatthias Krüger-9/+9
Unify impl blocks by wrapping them into a div The blanket and "auto traits" sections are wrapped into a `div` with an ID. This PR fixes this incoherence by wrapping each impl section (the "deref impl" and the "inherent impl" sections were missing it). It'll also make some tests simpler to write. r? `````@notriddle`````
2022-03-09Fix spurious CI failuresGuillaume Gomez-1/+4
2022-03-08Update GUI tests for impl blocks path changesGuillaume Gomez-9/+9
2022-03-07Add GUI test to ensure that line numbers text is aligned to the rightGuillaume Gomez-0/+3
2022-03-05Add GUI test for source code viewer scroll handlingGuillaume Gomez-0/+49
2022-02-25Extend toggle GUI test a bitGuillaume Gomez-2/+26
2022-02-24Add test for source sidebar elements displayGuillaume Gomez-0/+22
2022-02-20Rollup merge of #94002 - GuillaumeGomez:duplicated-sidebar-macro, r=notriddleMatthias Krüger-0/+21
rustdoc: Avoid duplicating macros in sidebar Fixes #93912. cc ``````@jsha`````` (for the GUI test) r? ``````@camelid``````
2022-02-17Rollup merge of #93780 - GuillaumeGomez:links-in-sidebar, r=jshaMatthias Krüger-26/+26
Generate list instead of div items in sidebar Fixes #92986. Surprisingly, we didn't have much CSS for this... [Demo](https://rustdoc.crud.net/imperio/links-in-sidebar/std/index.html). r? `@jsha`
2022-02-16Update rustdoc tests to adapt to changes to the sidebarGuillaume Gomez-26/+26
2022-02-15Fix GUI testGuillaume Gomez-1/+1
2022-02-14Add test for duplicated macros in the sidebarGuillaume Gomez-0/+21
2022-02-13Auto merge of #93763 - jsha:re-space-empty-impls, r=GuillaumeGomezbors-1/+20
rustdoc: fix spacing of non-toggled impl blocks We [recently removed the "up here" arrows on item-infos](https://github.com/rust-lang/rust/pull/92651), and adjusted vertical spacing so that even without the arrow, it would be visually clear which item the item-info belonged to. The new CSS styles for vertical spacing only applied to toggles, though. This missed non-toggled impl blocks - for instance, those without any methods, like https://doc.rust-lang.org/nightly/std/marker/trait.Send.html#implementors. The result was lists of implementors that were spaced too closely. This PR fixes the spacing by making it apply to non-toggled impl blocks as well. This also fixes an issue where item-infos were displayed too far below their items. That was a result of display: table on .item-info .stab. Changed that to display: inline-block. Demo: https://rustdoc.crud.net/jsha/re-space-empty-impls/std/marker/trait.Send.html Before: <img width=300 src="https://user-images.githubusercontent.com/220205/152954394-ec0b80e7-2573-4f06-9d7a-7b10b8ceac60.png"> After: <img width=300 src="https://user-images.githubusercontent.com/220205/152954228-abac1d30-a76d-4ab1-89ec-ef7549fe8c9c.png"> r? `@GuillaumeGomez`
2022-02-09rustdoc: fix spacing of non-toggled impl blocksJacob Hoffman-Andrews-1/+20
We recently removed the "up here" arrows on item-infos, and adjusted vertical spacing so that even without the arrow, it would be visually clear which item the item-info belonged to. The new CSS styles for vertical spacing only applied to toggles, though. This missed non-toggled impl blocks - for instance, those without any methods, like https://doc.rust-lang.org/nightly/std/marker/trait.Send.html#implementors. The result was lists of implementors that were spaced too closely. This PR fixes the spacing by making it apply to non-toggled impl blocks as well. This also fixes an issue where item-infos were displayed too far below their items. That was a result of display: table on .item-info .stab. Changed that to display: inline-block.
2022-02-09Update rustdoc tests for headings indentGuillaume Gomez-45/+6
2022-02-08rustdoc: tweak line and ¶ spacing for a11yJacob Hoffman-Andrews-46/+44
The W3C Web Content Accessibility Guidelines specify a minimum line spacing of 1.5 and a minimum paragraph spacing of 1.5 times the line spacing. Our current line spacing (implemented by line-height) is 1.4, so it's a small bump to go up to 1.5. Similarly, we have a paragraph spacing of 0.6em. Bump that to 0.75em (which is 1.5 times the 0.5em distance between lines). Also, fix all the font sizes so instead of being round-ish numbers in rem (like 1.1rem, 1.2rem), they are round numbers in pixels. Ensure each font size is at least 2 pixels different than the nearest other font size, so distinctions can be clearly seen. Overall the font-sizes are mostly staying the same, being rounded up or down as appropriate. Remove a few unused styles. Simplify the display of the mobile-topbar location, by setting its margins to auto rather than trying to size it exactly to the topbar.
2022-02-07Fix hover effects in sidebarJacob Hoffman-Andrews-5/+5
The dark and ayu themes have a menu-like highlight on sidebar items. The light theme used to, but it was accidentally lost in the sidebar unification. The change brings back the hover effect in the light theme. It also makes the hover effect apply consistently to all links in the sidebar, including headings. It also simplifies the "In _path_" heading so it's one big link. The breadcrumbs are still readily available at the top of the page.
2022-02-07Rollup merge of #93673 - jsha:linkify-sidebar-headings, r=GuillaumeGomezMara Bos-1/+8
Linkify sidebar headings for sibling items Also adjust CSS so this doesn't produce excess padding/margin. Note: I tried and failed to write a test with browser-UI-test. First I tried to `assert-property: (".block.mod h3 a", {"href": "index.html#macros"})`. But the `href` that gets read out is the fully-quallified URL, starting with `file:///`. That URL will differ depending on what path the test is run from, so that doesn't work. Next I tried clicking on the appropriate sidebar link, and verifying that the appropriate heading on the next page is highlighted with the right background color. However, that also didn't work: according to browser-UI-test, the targeted heading was plain white. However, running with no-headless, I could see that it actually was yellow. I suspect this is a bug in the older version of Chromium used with browser-UI-test's bundled puppeteer, since it doesn't reproduce on latest Chrome. Fixes #92957 Demo: https://rustdoc.crud.net/jsha/linkify-sidebar-headings/std/string/trait.ToString.html r? ``@GuillaumeGomez``
2022-02-05Linkify sidebar headings for sibling itemsJacob Hoffman-Andrews-1/+8
Also adjust CSS so this doesn't produce excess padding/margin.
2022-02-06Rollup merge of #92651 - jsha:impl-spacing, r=GuillaumeGomezMatthias Krüger-5/+2
Remove "up here" arrow on item-infos Use spacing to distinguish what is related to a given heading. This was originally introduced in #53043, in response to #51387. The arrow is a little distracting, and leads the item-info to not be aligned properly with the text below it. Demo: https://rustdoc.crud.net/jsha/impl-spacing/std/string/struct.String.html r? ``@GuillaumeGomez``
2022-02-05Auto merge of #93597 - GuillaumeGomez:update-browser-ui-test, r=jshabors-0/+1
Update browser-ui-test version The puppeteer version update is limited because new versions has some "interesting" flaws. r? `@jsha`
2022-02-04Rollup merge of #92735 - GuillaumeGomez:crate-filter-url-param, r=jshaMatthias Krüger-0/+30
Add crate filter parameter in URL Fixes #92621. r? `@jsha`
2022-02-04Add comment in GUI testGuillaume Gomez-0/+1
2022-02-03Add GUI test for crate filter URL parameterGuillaume Gomez-0/+30
2022-02-02Rollup merge of #93420 - jsha:adjust-settings-layout, r=GuillaumeGomezMatthias Krüger-0/+6
Improve wrapping on settings page Previously, the radio button choices for themes would wrap awkwardly on narrow screens. With this change, the group of choices will prefer bumping down to the next line together, leaving the setting name on its own line. Also fix some minor spacing issues: - Align the setting name vertically with the radio button choices. - Use margin instead of padding for most spacing choices. - Use no margin/padding on the right-hand side. Demo: https://rustdoc.crud.net/jsha/adjust-settings-layout/settings.html r? ``@GuillaumeGomez`` Before (narrow screen): ![image](https://user-images.githubusercontent.com/220205/151555533-7ab65216-d178-4dcc-8792-3c8fb9da8718.png) After (narrow screen): ![image](https://user-images.githubusercontent.com/220205/151555702-ad79af32-f84b-4ee4-ae7a-1a2a463c0f6f.png)