about summary refs log tree commit diff
path: root/src/test/rustdoc-gui
AgeCommit message (Collapse)AuthorLines
2022-11-17Migrate GUI test to use functionsGuillaume Gomez-162/+87
2022-11-17Extend codeblock GUI test to include tooltipsGuillaume Gomez-4/+76
2022-11-16Rollup merge of #104425 - notriddle:notriddle/main-heading-justify-content, ↵Matthias Krüger-0/+17
r=GuillaumeGomez rustdoc: remove no-op CSS `.main-header { justify-content }` This rule was added in 152e8889052adaaa6c12652486292be34059713c to push the out-of-band content to the right while allowing it to line wrap when it got too big. The idea was that the justification rule would fill the space between the `<h1>` element and the `<div class="out-of-band">` element. A later commit, 3cb03cb34247383ffb67a017ae70134741e8c4da, flattened the in-band element into the `<h1>`, copying the `flex-grow` rule. This means the `<h1>` element now grows to fill the space, so there's no need to justify-content any more. This commit also adds a test case for this.
2022-11-16Rollup merge of #104424 - notriddle:notriddle/popover-font-size, ↵Matthias Krüger-0/+2
r=GuillaumeGomez rustdoc: remove no-op CSS `.popover { font-size: 1rem }` This rule was added in cc4f804829ae because the help popover inherited the font-size from the help button "?" icon. It doesn't inherit this any more, because it was moved from being nested inside the link to sharing a wrapper DIV with it.
2022-11-14rustdoc: remove no-op CSS `.main-header { justify-content }`Michael Howell-0/+17
This rule was added in 152e8889052adaaa6c12652486292be34059713c to push the out-of-band content to the right while allowing it to line wrap when it got too big. The idea was that the justification rule would fill the space between the `<h1>` element and the `<div class="out-of-band">` element. A later commit, 3cb03cb34247383ffb67a017ae70134741e8c4da, flattened the in-band element into the `<h1>`, copying the `flex-grow` rule. This means the `<h1>` element now grows to fill the space, so there's no need to justify-content any more. This commit also adds a test case for this.
2022-11-14rustdoc: add test case for font size in help popoverMichael Howell-0/+2
2022-11-14rustdoc: fix corner case in search keyboard commandsMichael Howell-0/+28
2022-11-13Extend GUI test for theme settingsGuillaume Gomez-6/+41
2022-11-13Update GUI testGuillaume Gomez-39/+2
2022-11-13Rollup merge of #104177 - notriddle:notriddle/js-notable-trait-v2, ↵Yuki Okushi-44/+53
r=GuillaumeGomez rustdoc: use consistent "popover" styling for notable traits Follow-up to #104129 Fixes https://github.com/rust-lang/rust/issues/104313. Preview: https://notriddle.com/notriddle-rustdoc-demos/js-notable-trait-v2/std/iter/trait.Iterator.html#method.step_by ## Before ![image](https://user-images.githubusercontent.com/1593513/200710372-d2d992ce-0bdc-4437-9a2e-379a29df09cf.png) ![image](https://user-images.githubusercontent.com/1593513/200711266-e372b176-daa9-45f3-a022-738ef0a77d3c.png) ## After ![image](https://user-images.githubusercontent.com/1593513/200710601-09b3b717-116f-43c6-b14f-34a8b02b33c0.png) ![image](https://user-images.githubusercontent.com/1593513/200711288-3978cdc1-a6c2-47f6-9216-e22e3c1f5bdf.png)
2022-11-13Rollup merge of #103650 - notriddle:notriddle/line-anchors, r=GuillaumeGomezYuki Okushi-10/+34
rustdoc: change `.src-line-numbers > span` to `.src-line-numbers > a` Example: https://notriddle.com/notriddle-rustdoc-demos/line-anchors/test_dingus/fn.test.html This allows people to treat them like real links, such as right-click to copy URL, and makes the line numbers in a scraped example work at all, when before this commit was added, they had the clickable pointer cursor but did not actually do anything when clicked.
2022-11-12Rollup merge of #104319 - GuillaumeGomez:fix-non-clickable-source-link, ↵Guillaume Gomez-0/+5
r=notriddle Fix non clickable source link Fixes https://github.com/rust-lang/rust/issues/104313. It was also fixed in https://github.com/rust-lang/rust/pull/104177. If https://github.com/rust-lang/rust/pull/104177 is merged first, I'll simply remove the first commit to keep the test. r? ``@notriddle``
2022-11-12Add GUI test to ensure that source links can be clickedGuillaume Gomez-0/+5
2022-11-12Use same color for links in no result searchGuillaume Gomez-2/+2
2022-11-12Add GUI test for "no result found" linksGuillaume Gomez-0/+36
2022-11-12Rollup merge of #104267 - notriddle:notriddle/checkbox, r=GuillaumeGomezDylan DPC-12/+84
rustdoc: use checkbox instead of switch for settings toggles Preview: http://notriddle.com/notriddle-rustdoc-demos/checkbox/test_dingus/index.html ## Before ![image](https://user-images.githubusercontent.com/1593513/201232887-dee27ef5-b091-49bb-be4a-103d2e7983f3.png) ## After ![image](https://user-images.githubusercontent.com/1593513/201232835-95b40b77-6535-4280-8719-44c992a07772.png) ## Description The switch ("slider") is designed to give the application a "physical" feel, but nothing else in here really followed through. They didn't support the "flick" gesture that real iOS switches support, and the radio buttons that were also used in Rustdoc Settings were a more "classic" form element anyway. Also, while switches are the exclusive toggle design on iOS (since [Apple HIG] reserves checkboxes for Mac only), the [Google Material] guidelines say that lists of switches are bad, and you should just use check boxes. [Apple HIG]: https://developer.apple.com/design/human-interface-guidelines/components/selection-and-input/toggles [Google Material]: https://m3.material.io/components/checkbox/guidelines#6902f23d-ceba-4b19-ae3b-b78b9b01d185
2022-11-11rustdoc: update test casesMichael Howell-8/+0
2022-11-11rustdoc: make notable traits popover behavior consistent with Help and SettingsMichael Howell-0/+28
2022-11-11rustdoc: use consistent "popover" styling for notable traitsMichael Howell-36/+25
2022-11-11Auto merge of #104293 - Manishearth:rollup-xj92d0k, r=Manishearthbors-9/+93
Rollup of 8 pull requests Successful merges: - #95292 (Allow specialized const trait impls.) - #100386 (Make `Sized` coinductive, again) - #102215 (Implement the `+whole-archive` modifier for `wasm-ld`) - #103468 (Fix unused lint and parser caring about spaces to won't produce invalid code) - #103531 (Suggest calling the instance method of the same name when method not found) - #103960 (piece of diagnostic migrate) - #104051 (update Miri) - #104129 (rustdoc: use javascript to layout notable traits popups) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-11-11Rollup merge of #104129 - notriddle:notriddle/102576-js-notable-trait, ↵Manish Goregaokar-9/+93
r=Manishearth rustdoc: use javascript to layout notable traits popups Fixes #102576 Preview: https://notriddle.com/notriddle-rustdoc-demos/102576-js-notable-trait/std/iter/trait.Iterator.html#method.step_by ## Before ![image](https://user-images.githubusercontent.com/1593513/200432713-23aa8d49-ba2b-469f-9eab-089e0c174039.png) ## After ![image](https://user-images.githubusercontent.com/1593513/200432735-edd5b53d-e99d-4fc5-9410-8a79e0efdc9d.png)
2022-11-11rustdoc: add test cases for checkbox togglesMichael Howell-4/+79
2022-11-10rustdoc: use checkbox instead of switch for settings togglesMichael Howell-8/+5
The switch is designed to give the application a "physical" feel, but nothing else in here really followed through. They didn't support the "flick" gesture that real iOS switches support, and the radio buttons that were also used in Rustdoc Settings were a more "classic" form element anyway. Also, while "switches" are the exclusive toggle design on iOS (since [Apple HIG] reserves checkboxes for Mac only), the [Google Material] guidelines say that lists of switches are bad, and you should just use check boxes. [Apple HIG]: https://developer.apple.com/design/human-interface-guidelines/components/selection-and-input/toggles [Google Material]: https://m3.material.io/components/checkbox/guidelines#6902f23d-ceba-4b19-ae3b-b78b9b01d185
2022-11-10Add GUI test for :targetGuillaume Gomez-0/+35
2022-11-09Rollup merge of #104201 - GuillaumeGomez:gui-test-check-file-errors, r=notriddleMichael Goulet-0/+25
Add check in GUI test for file loading failure Since https://github.com/rust-lang/rust/pull/101702, some resources location need to be updated in case their content changed because then their hash will change too. This will prevent errors like https://github.com/rust-lang/rust/pull/104114 to happen again. The second commit is to prevent CORS errors: when a file is linked from a file itself imported, the web browser considers they come from a different domain and therefore triggers the error. The option tells the web browser to ignore this case. cc ```@jsha``` r? ```@notriddle```
2022-11-09Update to new browser-ui-test versionGuillaume Gomez-0/+25
2022-11-09Extend crate-search div GUI testsGuillaume Gomez-0/+40
2022-11-07rustdoc: fix font color inheritance from body, and testMichael Howell-0/+73
2022-11-07rustdoc: use javascript to layout notable traits popupsMichael Howell-9/+20
Fixes #102576
2022-11-06Extend rust-logo GUI test to check there is no filter for other logosGuillaume Gomez-0/+9
2022-11-06Rollup merge of #104014 - GuillaumeGomez:run-button-css-var, r=notriddleMatthias Krüger-4/+51
Migrate test-arrow to CSS variables There should be no UI changes. I kept both `color` and `background-color` properties even though only the ayu theme is actually completely making use of them on hover. r? ``@notriddle``
2022-11-06Rollup merge of #103990 - notriddle:notriddle/logo-container, r=GuillaumeGomezMatthias Krüger-2/+57
rustdoc: clean up `.logo-container` layout CSS This commit should result in no appearance changes. To make the logo container exactly the desired height, you want to get rid of the part of the box used for typographic descenders (you know, the part of g, y, and j that descends below the baseline). After all, it contains no text, but the space is still left open in the layout by default, because `<img>` is `display:inline`. The CSS used to employ three different tricks to accomplish this: * By making `.sidebar .logo-container` a flex container, the image becomes a flex item and is [blockified], without synthesizing any inline boxes. No inline boxes means no descenders. * By giving `.mobile-topbar .logo-container` a max-height exactly the same as the height of the image plus the padding, the descender area gets cut off. * By setting `.sub-logo-container { line-height: 0 }`, we ensure that the only box that contributes to the height of the line box is the image itself, and not any zero-content text boxes that neighbor it. See the [logical height algorithm]. This commit gets rid of the first two hacks, leaving only the third, since it requires only one line of code to accomplish and doesn't require setting the value based on math. [blockified]: https://drafts.csswg.org/css-flexbox-1/#flex-items [logical height algorithm]: https://www.w3.org/TR/css-inline-3/#inline-height
2022-11-05rustdoc: add test case for huge logoMichael Howell-2/+57
2022-11-05Extend GUI test for run buttonGuillaume Gomez-4/+51
2022-11-05Update GUI test for bottom border colorGuillaume Gomez-3/+3
2022-11-04rustdoc: get rid of CSS/DOM `div.desc span`, which isn't really neededMichael Howell-4/+4
2022-11-04rustdoc: simplify search results CSS and DOMMichael Howell-1/+1
There is a layout change caused by this commit, but it's subtle. You won't notice it unless you're looking for it.
2022-11-03rustdoc: clean up hardcoded CSS border color on search resultsMichael Howell-0/+18
Hardcoded colors in rustdoc.css should usually be avoided.
2022-11-01Rollup merge of #103837 - ↵Manish Goregaokar-225/+162
GuillaumeGomez:migrate-sidebar-links-color-gui-test, r=notriddle Migrate sidebar-links-color GUI test to functions r? `@notriddle`
2022-11-01Remove unneeded "rustdoc-preferred-dark-theme" settingGuillaume Gomez-1/+0
2022-11-01Migrate sidebar-links-color GUI test to functionsGuillaume Gomez-224/+162
2022-11-01Rollup merge of #103817 - notriddle:notriddle/attribute-css, r=GuillaumeGomezDylan DPC-5/+5
rustdoc: rename syntax highlighting CSS class `attribute` to `attr` Link classes use the abbreviation `attr` ... https://github.com/rust-lang/rust/blob/2afca78a0b03db144c5d8b9f8868feebfe096309/src/librustdoc/html/static/css/rustdoc.css#L255-L259 ... so why does syntax highlighting use the full word? https://github.com/rust-lang/rust/blob/2afca78a0b03db144c5d8b9f8868feebfe096309/src/librustdoc/html/static/css/rustdoc.css#L1095-L1097
2022-10-31rustdoc: remove left border from `.src-line-numbers > a`Michael Howell-0/+5
2022-10-31rustdoc: change `.src-line-numbers > span` to `.src-line-numbers > a`Michael Howell-10/+29
This allows people to treat them like real links, such as right-click to copy URL, and makes the line numbers in a scraped example work at all, when before this commit was added, they had the clickable pointer cursor but did not actually do anything when clicked.
2022-10-31rustdoc: rename syntax highlighting CSS class `attribute` to `attr`Michael Howell-5/+5
Link classes use the abbreviation `attr`, so why shouldn't syntax highlighting?
2022-10-31rustdoc: add test case for associated type marginsMichael Howell-0/+34
2022-10-28Rollup merge of #103585 - GuillaumeGomez:source-line-css, r=notriddleMatthias Krüger-1/+43
Migrate source line numbers CSS to CSS variables Part of https://github.com/rust-lang/rust/pull/98460. No UI changes. r? ``@notriddle``
2022-10-27Add tests for source line numbers colorsGuillaume Gomez-1/+43
2022-10-26rustdoc: add test case for positioning of notable trait tooltipMichael Howell-1/+38
2022-10-25Rollup merge of #103493 - notriddle:notriddle/source-sidebar-logo, ↵Yuki Okushi-1/+1
r=GuillaumeGomez rustdoc: remove unused `.sidebar-logo` DOM on source pages