Guillaume Gomez
0a7293ff00
Migrate GUI colors test to original CSS color format
2023-05-24 14:41:18 +02:00
Matthias Krüger
f737ec40e6
Rollup merge of #111871 - GuillaumeGomez:migrate-gui-test-color-5, r=notriddle
...
Migrate GUI colors test to original CSS color format
Follow-up of https://github.com/rust-lang/rust/pull/111459 .
r? `@notriddle`
2023-05-23 19:53:43 +02:00
Guillaume Gomez
24be25f134
Migrate GUI colors test to original CSS color format
2023-05-23 15:26:59 +02:00
Michael Howell
24913bd768
rustdoc: remove unneeded position: relative
setting CSS
...
This was added to control percentage sizes, in
79956b96e8
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-22 16:46:29 -07:00
Dylan DPC
ec372a17e2
Rollup merge of #111844 - GuillaumeGomez:migrate-gui-test-color-4, r=notriddle
...
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-23 00:32:20 +05:30
Guillaume Gomez
194960bae9
Migrate GUI colors test to original CSS color format
2023-05-22 17:34:48 +02:00
Matthias Krüger
7358166882
Rollup merge of #111817 - GuillaumeGomez:migrate-gui-test-color-3, r=notriddle
...
Migrate GUI colors test to original CSS color format
Follow-up of https://github.com/rust-lang/rust/pull/111459 .
r? `@notriddle`
2023-05-21 16:03:01 +02:00
Matthias Krüger
0afa79b53d
Rollup merge of #111797 - GuillaumeGomez:migrate-gui-test-color-2, r=notriddle
...
Migrate GUI colors test to original CSS color format
Follow-up of https://github.com/rust-lang/rust/pull/111459 .
r? ``@notriddle``
2023-05-21 16:03:00 +02:00
Guillaume Gomez
3c9964f003
Migrate GUI colors test to original CSS color format
2023-05-21 13:10:03 +02:00
Guillaume Gomez
0d8a2e58a3
Rollup merge of #111765 - GuillaumeGomez:migrate-gui-test-color, r=notriddle
...
Migrate GUI colors test to original CSS color format
Follow-up of https://github.com/rust-lang/rust/pull/111459 .
r? `@notriddle`
2023-05-20 15:37:24 +02:00
Guillaume Gomez
8b7c8e1f82
Migrate GUI colors test to original CSS color format
2023-05-20 15:35:52 +02:00
Guillaume Gomez
c2d3b23bd0
Migrate GUI colors test to original CSS color format
2023-05-19 17:01:22 +02:00
Guillaume Gomez
ad5955b891
Migrate GUI colors test to original CSS color format
2023-05-18 17:02:51 +02:00
Guillaume Gomez
91765d8c04
Convert more GUI tests colors to their original format
2023-05-14 00:16:16 +02:00
Guillaume Gomez
8e55400ec9
Convert some GUI tests color checks to use original format
2023-05-11 11:49:16 +02:00
Guillaume Gomez
0630283e9d
Migrate to 0.16.0 browser-ui-test version
2023-05-11 11:34:22 +02:00
Manish Goregaokar
ceef7e5ced
Rollup merge of #110371 - notriddle:notriddle/search-corrections, 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-05-03 16:42:49 -07:00
Michael Howell
5cefe75436
rustdoc: remove unneeded handleKey from settings.js
...
This code was added in 9dc5dfb975
and 704050da23
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-21 16:42:23 -07:00
Michael Howell
395840cd5e
rustdoc-search: use more descriptive "x not found; y instead" message
2023-04-20 14:32:02 -07:00
Michael Howell
b6f81e0434
rustdoc-search: give longer notification for type corrections
2023-04-19 12:56:52 -07:00
Michael Howell
4c11822aeb
rustdoc: restructure type search engine to pick-and-use IDs
...
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-17 12:16:54 -07:00
bors
9693b178fc
Auto merge of #110252 - matthiaskrgr:rollup-ovaixra, r=matthiaskrgr
...
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-12 22:19:29 +00:00
Matthias Krüger
b53817df19
Rollup merge of #110205 - notriddle:notriddle/pixelated-border, r=GuillaumeGomez
...
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-12 20:56:23 +02:00
Guillaume Gomez
6bc6ea7a3e
Add/update tests for --extend-css
option
2023-04-12 20:07:10 +02:00
Michael Howell
bb7ed64f45
rustdoc: use CSS overscroll-behavior
instead of JavaScript
...
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-12 10:31:06 -07:00
Michael Howell
ad9a89eef2
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.
2023-04-12 08:39:43 -07:00
Guillaume Gomez
010fa00b80
Update rustdoc GUI tests to new browser-ui-test version
2023-04-11 19:14:35 +02:00
Nilstrieb
370084860a
Rollup merge of #110037 - notriddle:notriddle/theme-default, r=GuillaumeGomez
...
rustdoc: add test and bug fix for theme defaults
Part of https://github.com/rust-lang/rust/issues/66181
2023-04-08 10:26:14 +02:00
Michael Howell
5cad51c0c5
rustdoc: add test and bug fix for theme defaults
2023-04-06 20:25:07 -07:00
Guillaume Gomez
529ceeeefc
Run collapsed GUI test in mobile mode as well
2023-04-06 20:26:27 +02:00
Guillaume Gomez
8f5404d0d7
Update GUI tests for logo display on very small screens
2023-04-05 21:38:52 +02:00
Guillaume Gomez
8aef0c7926
Add GUI test for scrollbar position on source code page
2023-04-04 16:35:53 +02:00
Guillaume Gomez
efad057eed
Add tests to check that collapsed content is expanded when jumping to it
2023-03-31 16:51:50 +02:00
Matthias Krüger
b39db705f5
Rollup merge of #109633 - GuillaumeGomez:fix-go-to-only-setting, r=notriddle
...
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`
2023-03-27 08:46:53 +02:00
Guillaume Gomez
bc9eec04b7
Add GUI test for "Directly go to item in search if there is only one result" setting
2023-03-26 17:50:09 +02:00
Matthias Krüger
236178698a
Rollup merge of #109595 - GuillaumeGomez:improve-gui-test-auto-hide-trait, r=notriddle
...
Improve "Auto-hide trait implementation documentation" GUI test
Part of #66181 .
I'll start working on the `include` command for `browser-ui-test` so we can greatly reduce the duplicated code between setting tests.
r? ``@notriddle``
2023-03-26 08:39:27 +02:00
Guillaume Gomez
16bb7196a8
Improve "Auto-hide trait implementation documentation" GUI test
2023-03-25 15:28:18 +01:00
Guillaume Gomez
9cb7d4ca39
Add GUI test for "Auto-hide item methods' documentation" setting
2023-03-24 16:57:55 +01:00
Guillaume Gomez
ab1573a887
Add GUI test for "Auto-hide item contents for large items" setting
2023-03-20 20:25:35 +01:00
Matthias Krüger
83791f9de7
Rollup merge of #106915 - notriddle:notriddle/load-only-one-theme, r=GuillaumeGomez,jsha
...
Only load one CSS theme by default
This is a tweaked version of #103971 that uses `document.write` to create the stylesheet link at startup, avoiding a FOUC during page navigation. It also rebases the PR, making it work with the new hashed filenames.
Fixes #82614
Preview: http://notriddle.com/notriddle-rustdoc-demos/load-only-one-theme-v2/std/index.html
2023-03-09 12:11:52 +01:00
Matthias Krüger
6c91ce27c3
Rollup merge of #108686 - notriddle:notriddle/jank-all, r=jsha
...
rustdoc: include link on all.html location header
This avoids a subtle layout shift when switching from the crate page to all items.
## Before
| index.html | all.html |
|------------|----------|
| ![image](https://user-images.githubusercontent.com/1593513/222607866-4eac3f55-314c-4273-9664-503f2a79ad0a.png ) | ![image](https://user-images.githubusercontent.com/1593513/222607895-2d6bac3b-f66a-47d4-b234-360f6f8e1ee3.png ) |
## After
| index.html | all.html |
|------------|----------|
| ![image](https://user-images.githubusercontent.com/1593513/222607866-4eac3f55-314c-4273-9664-503f2a79ad0a.png ) | ![image](https://user-images.githubusercontent.com/1593513/222607997-e72c48a0-02c7-42a7-80c2-cd6bed48bd15.png ) |
2023-03-08 21:24:50 +01:00
Michael Howell
d4dce3e200
Update browser-ui-test version
...
Use NEAR check to allow one pixel difference between scroll positions.
2023-03-08 12:49:35 -07:00
Michael Howell
af664be423
rustdoc: include link on all.html location header
...
This avoids a subtle layout shift when switching from the crate page
to all items.
2023-03-04 11:54:28 -07:00
Guillaume Gomez
cfb4af87e3
Add GUI test for rustdoc search errors background
2023-03-02 12:59:04 +01:00
Guillaume Gomez
4ff1c4d3e7
No need for the wait-for anymore to go around browser navigation bug
2023-02-23 22:04:38 +01:00
Dylan DPC
4165de40f8
Rollup merge of #107783 - notriddle:notriddle/item-table-ul, r=GuillaumeGomez
...
rustdoc: simplify DOM for `.item-table`
This switches from using `<div>` to the more semantic `<ul>`, and using class names that rhyme with the classes the search results table uses.
2023-02-19 13:03:41 +05:30
Matthias Krüger
3054759fa8
Rollup merge of #107340 - notriddle:notriddle/simplify-doctest-tooltip, r=GuillaumeGomez
...
rustdoc: merge doctest tooltip with notable traits tooltip
Fixes https://discord.com/channels/442252698964721669/443150878111694848/1066420140167680000
<details><summary>a user report where the tooltip arrow overlaps the text</summary>
![](https://cdn.discordapp.com/attachments/443150878111694848/1066420139530145812/this-example-is-not-tested-busted-rendering.png )
</details>
Fixes #91100
Preview: <https://notriddle.com/notriddle-rustdoc-demos/simplify-doctest-tooltip/std/vec/struct.Vec.html#indexing >
Screenshot:
![image](https://user-images.githubusercontent.com/1593513/214975516-72667632-4609-49fa-8c37-e8d2ba1ba7dc.png )
2023-02-13 11:34:56 +01:00
Michael Howell
b0df355f80
rustdoc: use tighter line height in h1 and h2
2023-02-12 12:30:57 -07:00
Michael Howell
894c98652c
rustdoc: simplify DOM for .item-table
...
This switches from using `<div>` to the more semantic `<ul>`, and
using class names that rhyme with the classes the search results
table uses.
2023-02-07 19:00:42 -07:00
bors
7c3f0d6f30
Auto merge of #107141 - notriddle:notriddle/max-lev-distance-2023, r=GuillaumeGomez
...
rustdoc: compute maximum Levenshtein distance based on the query
Preview: https://notriddle.com/notriddle-rustdoc-demos/search-lev-distance-2023/std/index.html?search=regex
The heuristic is pretty close to the name resolver, maxLevDistance = `Math.floor(queryLen / 3)`.
Fixes #103357
Fixes #82131
Similar to https://github.com/rust-lang/rust/pull/103710 , but following the suggestion in https://github.com/rust-lang/rust/pull/103710#issuecomment-1296360267 to use `floor` instead of `ceil`, and unblocked now that https://github.com/rust-lang/rust/pull/105796 made it so that setting the max lev distance to `0` doesn't cause substring matches to be removed.
2023-02-06 02:09:00 +00:00