about summary refs log tree commit diff
path: root/tests/rustdoc-gui
AgeCommit message (Collapse)AuthorLines
2023-06-04Migrate GUI colors test to original CSS color formatGuillaume Gomez-6/+6
2023-06-03Move type name directly into the same DOM elementGuillaume Gomez-12/+4
2023-06-02Move item kind before the item nameGuillaume Gomez-32/+9
2023-06-02Update rustdoc tests and add more checks for type kind colorsGuillaume Gomez-6/+14
2023-06-01Rollup merge of #112133 - GuillaumeGomez:migrate-gui-test-color-10, r=notriddleMatthias Krüger-3/+3
Migrate GUI colors test to original CSS color format Follow-up of https://github.com/rust-lang/rust/pull/111459. r? ```@notriddle```
2023-06-01Rollup merge of #111892 - notriddle:notriddle/timeout-tooltip, ↵Dylan DPC-2/+19
r=me,GuillaumeGomez,Manishearth rustdoc: add interaction delays for tooltip popovers Preview: * [notable traits](http://notriddle.com/rustdoc-demo-html-3/delay-tooltip/testing/struct.Vec.html#method.iter) * [panicking code block](http://notriddle.com/rustdoc-demo-html-3/delay-tooltip/testing/struct.Vec.html#indexing) Designing a good hover microinteraction is a matter of guessing user intent from what are, literally, vague gestures. In this case, guessing if hovering in our out of the tooltip base is intentional or not. To figure this out, a few different techniques are used: * When the mouse pointer enters a tooltip anchor point, its hitbox is grown on the bottom, where the popover is/will appear. This was already there before this commit: search "hover tunnel" in rustdoc.css for the implementation. * This commit adds a delay when the mouse pointer enters the base anchor, in case the mouse pointer was just passing through and the user didn't want to open it. * This commit also adds a delay when the mouse pointer exits the tooltip's base anchor or its popover, before hiding it. * A fade-out animation is layered onto the pointer exit delay to immediately inform the user that they successfully dismissed the popover, while still providing a way for them to cancel it if it was a mistake and they still wanted to interact with it. * No animation is used for revealing it, because we don't want people to try to interact with an element while it's in the middle of fading in: either they're allowed to interact with it while it's fading in, meaning it can't serve as mistake- proofing for opening the popover, or they can't, but they might try and be frustrated. See also: * https://www.nngroup.com/articles/timing-exposing-content/ * https://www.nngroup.com/articles/tooltip-guidelines/ * https://bjk5.com/post/44698559168/breaking-down-amazons-mega-dropdown
2023-05-31Migrate GUI colors test to original CSS color formatGuillaume Gomez-3/+3
2023-05-30Rollup merge of #112064 - GuillaumeGomez:migrate-gui-test-color-9, r=notriddleNilstrieb-4/+4
Migrate GUI colors test to original CSS color format Follow-up of https://github.com/rust-lang/rust/pull/111459. The `browser-ui-test` update is a fix when converting the alpha value to hex format. More information [here](https://github.com/GuillaumeGomez/browser-UI-test/pull/511). r? ````@notriddle````
2023-05-29Migrate GUI colors test to original CSS color formatGuillaume Gomez-4/+4
2023-05-29Rollup merge of #112042 - GuillaumeGomez:migrate-gui-test-color-8, r=notriddleMatthias Krüger-6/+6
Migrate GUI colors test to original CSS color format Follow-up of https://github.com/rust-lang/rust/pull/111459. r? `@notriddle`
2023-05-28Migrate GUI colors test to original CSS color formatGuillaume Gomez-6/+6
2023-05-27Auto merge of #111348 - ozkanonur:remove-hardcoded-rustdoc-flags, ↵bors-4/+7
r=albertlarsan68,oli-obk new tool `rustdoc-gui-test` Implements new tool `rustdoc-gui-test` that allows using compiletest headers for `rustdoc-gui` tests.
2023-05-25Migrate GUI colors test to original CSS color formatGuillaume Gomez-42/+42
2023-05-24Migrate GUI colors test to original CSS color formatGuillaume Gomez-6/+6
2023-05-23rustdoc: add hover indicator for notable trait tooltipMichael Howell-1/+16
2023-05-23rustdoc: add interaction delays for tooltip popoversMichael Howell-1/+3
Designing a good hover microinteraction is a matter of guessing user intent from what are, literally, vague gestures. In this case, guessing if hovering in our out of the tooltip base is intentional or not. To figure this out, a few different techniques are used: * When the mouse pointer enters a tooltip anchor point, its hitbox is grown on the bottom, where the popover is/will appear. This was already there before this commit: search "hover tunnel" in rustdoc.css for the implementation. * This commit adds a delay when the mouse pointer enters the base anchor, in case the mouse pointer was just passing through and the user didn't want to open it. * This commit also adds a delay when the mouse pointer exits the tooltip's base anchor or its popover, before hiding it. * A fade-out animation is layered onto the pointer exit delay to immediately inform the user that they successfully dismissed the popover, while still providing a way for them to cancel it if it was a mistake and they still wanted to interact with it. * No animation is used for revealing it, because we don't want people to try to interact with an element while it's in the middle of fading in: either they're allowed to interact with it while it's fading in, meaning it can't serve as mistake- proofing for opening the popover, or they can't, but they might try and be frustrated. See also: * https://www.nngroup.com/articles/timing-exposing-content/ * https://www.nngroup.com/articles/tooltip-guidelines/ * https://bjk5.com/post/44698559168/breaking-down-amazons-mega-dropdown
2023-05-23Rollup merge of #111871 - GuillaumeGomez:migrate-gui-test-color-5, r=notriddleMatthias Krüger-3/+3
Migrate GUI colors test to original CSS color format Follow-up of https://github.com/rust-lang/rust/pull/111459. r? `@notriddle`
2023-05-23Migrate GUI colors test to original CSS color formatGuillaume Gomez-3/+3
2023-05-22rustdoc: remove unneeded `position: relative` setting CSSMichael Howell-2/+2
This was added to control percentage sizes, in 79956b96e875e6ba2bfa551fabda6b7896f988ac Now, the only percentage size is [`border-radius`], which is based on the size of the box itself, not its containing block. This leaves the property unused. [`border-radius`]: https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius
2023-05-23Rollup merge of #111844 - GuillaumeGomez:migrate-gui-test-color-4, r=notriddleDylan DPC-3/+3
Migrate GUI colors test to original CSS color format I updated the `browser-ui-test` version because I fixed https://github.com/GuillaumeGomez/browser-UI-test/issues/507. If inside a function, the colors were not considered, preventing the second commit of this PR. Follow-up of https://github.com/rust-lang/rust/pull/111459. r? `@notriddle`
2023-05-22Migrate GUI colors test to original CSS color formatGuillaume Gomez-3/+3
2023-05-21Rollup merge of #111817 - GuillaumeGomez:migrate-gui-test-color-3, r=notriddleMatthias Krüger-18/+18
Migrate GUI colors test to original CSS color format Follow-up of https://github.com/rust-lang/rust/pull/111459. r? `@notriddle`
2023-05-21Rollup merge of #111797 - GuillaumeGomez:migrate-gui-test-color-2, r=notriddleMatthias Krüger-9/+9
Migrate GUI colors test to original CSS color format Follow-up of https://github.com/rust-lang/rust/pull/111459. r? ``@notriddle``
2023-05-21Migrate GUI colors test to original CSS color formatGuillaume Gomez-18/+18
2023-05-20Rollup merge of #111765 - GuillaumeGomez:migrate-gui-test-color, r=notriddleGuillaume Gomez-18/+18
Migrate GUI colors test to original CSS color format Follow-up of https://github.com/rust-lang/rust/pull/111459. r? `@notriddle`
2023-05-20Migrate GUI colors test to original CSS color formatGuillaume Gomez-9/+9
2023-05-20add compiletest headers to rustdoc-gui testsozkanonur-4/+7
2023-05-19Migrate GUI colors test to original CSS color formatGuillaume Gomez-18/+18
2023-05-18Migrate GUI colors test to original CSS color formatGuillaume Gomez-11/+11
2023-05-14Convert more GUI tests colors to their original formatGuillaume Gomez-86/+86
2023-05-11Convert some GUI tests color checks to use original formatGuillaume Gomez-14/+14
2023-05-11Migrate to 0.16.0 browser-ui-test versionGuillaume Gomez-65/+53
2023-05-03Rollup merge of #110371 - notriddle:notriddle/search-corrections, ↵Manish Goregaokar-0/+56
r=GuillaumeGomez rustdoc: restructure type search engine to pick-and-use IDs Fixes #110029 Preview: https://notriddle.com/rustdoc-demo-html-3/search-corrections/std/index.html?search=-%3E%20streaming ![image](https://user-images.githubusercontent.com/1593513/233494900-ae77d5b4-e395-41f8-bbac-53ee55bb4a76.png) This change makes it so, instead of mixing string distance with type unification, function signature search works by mapping names to IDs at the start, reporting to the user any cases where it had to make corrections, and then matches with IDs when going through the items. This only changes function searches. Name searches are left alone, and corrections are only done when there's a single item in the search query.
2023-04-21rustdoc: remove unneeded handleKey from settings.jsMichael Howell-0/+9
This code was added in 9dc5dfb97504c538bc72f367a77bb9f714c30097 and 704050da2334c465784954d81c8990c4bc7a92c5 because the browser- native checkbox was `display: none`, breaking native keyboard accessibility. The native checkbox is now merely `appearance: none`, which does not turn off [behavior semantics], so JavaScript to reimplement it isn't needed any more. [behavior semantics]: https://w3c.github.io/csswg-drafts/css-ui/#appearance-semantics
2023-04-20rustdoc-search: use more descriptive "x not found; y instead" messageMichael Howell-3/+5
2023-04-19rustdoc-search: give longer notification for type correctionsMichael Howell-3/+3
2023-04-17rustdoc: restructure type search engine to pick-and-use IDsMichael Howell-0/+54
This change makes it so, instead of mixing string distance with type unification, function signature search works by mapping names to IDs at the start, reporting to the user any cases where it had to make corrections, and then matches with IDs when going through the items. This only changes function searches. Name searches are left alone, and corrections are only done when there's a single item in the search query.
2023-04-12Auto merge of #110252 - matthiaskrgr:rollup-ovaixra, r=matthiaskrgrbors-2/+27
Rollup of 8 pull requests Successful merges: - #109810 (Replace rustdoc-ui/{c,z}-help tests with a stable run-make test ) - #110035 (fix: ensure bad `#[test]` invocs retain correct AST) - #110089 (sync::mpsc: synchronize receiver disconnect with initialization) - #110103 (Report overflows gracefully with new solver) - #110122 (Fix x check --stage 1 when download-ci-llvm=false) - #110133 (Do not use ImplDerivedObligationCause for inherent impl method error reporting) - #110135 (Revert "Don't recover lifetimes/labels containing emojis as character literals") - #110235 (Fix `--extend-css` option) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-12Rollup merge of #110205 - notriddle:notriddle/pixelated-border, r=GuillaumeGomezMatthias Krüger-7/+70
rustdoc: make settings radio and checks thicker, less contrast This is very dependent on subjectivity and what screen you use, but this change makes the radio buttons' outer circle less ugly. This is because I could see the pixels very clearly, thanks to the very thin line and high contrast. This change makes both less severe, giving your browser's antialiasing algorithm more to work with. Since it's thicker, lowering the contrast shouldn't impact visibility. ## Preview https://notriddle.com/rustdoc-demo-html-3/pixelated-border/settings.html ## Before ![image](https://user-images.githubusercontent.com/1593513/231274191-143acbea-c433-4fb1-b46d-e5e4fe328d60.png) ## After ![image](https://user-images.githubusercontent.com/1593513/231287415-c1e59fe8-8bf8-489d-b607-95ebb71e4ac5.png) <details><summary>Original "after" image with 2px border around checked box</summary> ![image](https://user-images.githubusercontent.com/1593513/231274253-8b5011c6-82fb-4396-84d0-47b6bdff2260.png) </details>
2023-04-12Add/update tests for `--extend-css` optionGuillaume Gomez-2/+27
2023-04-12rustdoc: use CSS `overscroll-behavior` instead of JavaScriptMichael Howell-41/+12
Fixes the desktop scrolling weirdness mentioned in https://github.com/rust-lang/rust/pull/98775#issuecomment-1182575603 As described in the MDN page for this property: * The current Firefox ESR is 102, and the first Firefox version to support this feature is 59. * The current Chrome version 112, and the first version to support this is 63. * Edge is described as having a minor bug in `none` mode, but we use `contain` mode anyway, so it doesn't matter. * Safari 16, released September 2022, is the last browser to add this feature, and is also the oldest version we officially support.
2023-04-12rustdoc: make settings radio and checks thicker, less contrastMichael Howell-7/+70
This is very dependent on subjectivity and what screen you use, but this change makes the radio buttons' outer circle less ugly. This is because I could see the pixels very clearly, thanks to the very thin line and high contrast. This change makes both less severe, giving your browser's antialiasing algorithm more to work with. Since it's thicker, lowering the contrast shouldn't impact visibility.
2023-04-11Update rustdoc GUI tests to new browser-ui-test versionGuillaume Gomez-308/+308
2023-04-08Rollup merge of #110037 - notriddle:notriddle/theme-default, r=GuillaumeGomezNilstrieb-0/+24
rustdoc: add test and bug fix for theme defaults Part of https://github.com/rust-lang/rust/issues/66181
2023-04-06rustdoc: add test and bug fix for theme defaultsMichael Howell-0/+24
2023-04-06Run collapsed GUI test in mobile mode as wellGuillaume Gomez-7/+26
2023-04-05Update GUI tests for logo display on very small screensGuillaume Gomez-1/+8
2023-04-04Add GUI test for scrollbar position on source code pageGuillaume Gomez-0/+8
2023-03-31Add tests to check that collapsed content is expanded when jumping to itGuillaume Gomez-0/+21
2023-03-27Rollup merge of #109633 - GuillaumeGomez:fix-go-to-only-setting, r=notriddleMatthias Krüger-0/+63
Fix "Directly go to item in search if there is only one result" setting Part of #66181. The setting was actually broken, so I fixed it when I added the GUI test. r? `@notriddle`