rustdoc: redesign toolbar and disclosure widgets
Preview
| before | after |
|---|---|
https://notriddle.com/rustdoc-html-demo-12/toolbar-v2/std/index.html
Known issue: when you run a search, these buttons stop working. I also need to adjust the other pages to always show this toolbar.
Description
This adds labels to the icons and moves them away from the search box.
These changes are made together, because they work together, but are based on several complaints:
-
The [+/-] thing are a Reddit-ism. They don't look like buttons, but look like syntax https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/More.20visual.20difference.20for.20the.20.2B.2F-.20.20Icons, https://github.com/rust-lang/rust/issues/59851 (some of these are laundry lists with more suggestions, but they all mention [+/-] looking wrong)
-
The settings, help, and summary buttons are also too hard to recognize https://lwn.net/Articles/987070/, https://github.com/rust-lang/rust/issues/90310, https://github.com/rust-lang/rust/issues/14475#issuecomment-274241997, https://internals.rust-lang.org/t/improve-rustdoc-design/12758 ("Not all functionality is self-explanatory, for example the [+] button in the top right corner, the theme picker or the settings button.")
The toggle-all and toggle-individual buttons both need done at once, since we want them to look like they go together. This changes them from both being [+/-] to both being arrows.
CC https://github.com/rust-lang/rust/pull/113074#issuecomment-1677469680 and @jsha regarding the use of triangles for disclosure, which is what everyone wanted, but was pending a good toggle-all button. This PR adds a toggle-all button that should work.
Settings and Help are also migrated, so that the whole group can benefit from being described using actual words.
r? @GuillaumeGomez
rustbot has assigned @GuillaumeGomez. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r? to explicitly pick a reviewer
The job mingw-check-tidy failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
# NOTE: intentionally uses python2 for x.py so we can test it still works.
# validate-toolstate only runs in our CI, so it's ok for it to only support python3.
ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test \
--stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --allow-unsafe --generate-hashes reuse-requirements.in
---
#13 2.869 Building wheels for collected packages: reuse
#13 2.870 Building wheel for reuse (pyproject.toml): started
#13 3.115 Building wheel for reuse (pyproject.toml): finished with status 'done'
#13 3.116 Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132715 sha256=dfa09868353292d98f811d3efdb0d54d07389e808efc71d68e3b93c514bf8bec
#13 3.116 Stored in directory: /tmp/pip-ephem-wheel-cache-styyrn78/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#13 3.119 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#13 3.519 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#13 3.519 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#13 4.048 Collecting virtualenv
#13 4.048 Collecting virtualenv
#13 4.096 Downloading virtualenv-20.26.3-py3-none-any.whl (5.7 MB)
#13 4.324 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.7/5.7 MB 25.2 MB/s eta 0:00:00
#13 4.368 Collecting distlib<1,>=0.3.7
#13 4.375 Downloading distlib-0.3.8-py2.py3-none-any.whl (468 kB)
#13 4.388 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 KB 45.1 MB/s eta 0:00:00
#13 4.421 Collecting platformdirs<5,>=3.9.1
#13 4.429 Downloading platformdirs-4.2.2-py3-none-any.whl (18 kB)
#13 4.467 Collecting filelock<4,>=3.12.2
#13 4.474 Downloading filelock-3.15.4-py3-none-any.whl (16 kB)
#13 4.556 Installing collected packages: distlib, platformdirs, filelock, virtualenv
#13 4.748 Successfully installed distlib-0.3.8 filelock-3.15.4 platformdirs-4.2.2 virtualenv-20.26.3
#13 DONE 4.8s
#14 [7/8] COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
#14 DONE 0.0s
---
DirectMap4k: 221120 kB
DirectMap2M: 7118848 kB
DirectMap1G: 11534336 kB
##[endgroup]
Executing TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
+ TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://ci-artifacts.rust-lang.org/rustc-builds-alt/f167efad2f51088d86180ee89177b3d7c9e7c2f5/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz
extracting /checkout/obj/build/cache/llvm-f167efad2f51088d86180ee89177b3d7c9e7c2f5-true/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm
---
Diff in /checkout/src/librustdoc/html/sources.rs:346:
} else {
None
},
- }.render_into(&mut writer).unwrap();
+ .render_into(&mut writer)
+ .unwrap();
}
fmt error: Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/rustfmt/bin/rustfmt" "--config-path" "/checkout" "--edition" "2021" "--unstable-features" "--skip-children" "--check" "/checkout/library/core/benches/any.rs" "/checkout/library/core/benches/iter.rs" "/checkout/src/librustdoc/html/sources.rs" "/checkout/library/core/benches/tuple.rs" "/checkout/src/librustdoc/html/escape.rs" "/checkout/src/librustdoc/html/tests.rs" "/checkout/src/librustdoc/html/format.rs" "/checkout/src/librustdoc/visit.rs" "/checkout/library/core/benches/str/char_count.rs" "/checkout/library/core/benches/str/iter.rs" "/checkout/library/core/benches/str/corpora.rs" "/checkout/library/core/benches/str/debug.rs" "/checkout/library/core/benches/array.rs" "/checkout/library/core/benches/lib.rs" "/checkout/library/core/benches/ops.rs" "/checkout/library/core/benches/slice.rs" "/checkout/src/librustdoc/formats/mod.rs" "/checkout/src/librustdoc/formats/item_type.rs" "/checkout/src/librustdoc/formats/cache.rs" "/checkout/src/librustdoc/formats/renderer.rs" "/checkout/src/librustdoc/doctest.rs" "/checkout/src/librustdoc/externalfiles.rs" "/checkout/library/core/benches/char/mod.rs" "/checkout/library/core/benches/char/methods.rs" "/checkout/library/core/benches/str.rs" "/checkout/library/core/benches/net/mod.rs" "/checkout/library/core/benches/net/addr_parser.rs" "/checkout/library/core/benches/num/flt2dec/strategy/dragon.rs" "/checkout/library/core/benches/num/flt2dec/strategy/grisu.rs" "/checkout/library/core/benches/num/flt2dec/mod.rs" "/checkout/library/core/benches/num/mod.rs" "/checkout/library/core/benches/num/int_pow/mod.rs" "/checkout/library/core/benches/num/dec2flt/mod.rs" "/checkout/library/core/benches/num/int_log/mod.rs" "/checkout/library/core/benches/fmt.rs" "/checkout/src/tools/cargotest/main.rs" "/checkout/src/tools/run-make-support/src/macros.rs" "/checkout/src/tools/run-make-support/src/symbols.rs" "/checkout/src/tools/run-make-support/src/diff/mod.rs" "/checkout/src/tools/run-make-support/src/diff/tests.rs" "/checkout/library/core/src/ops/arith.rs" "/checkout/library/core/src/ops/coroutine.rs" "/checkout/library/core/src/ops/unsize.rs" "/checkout/library/core/src/ops/index_range.rs" "/checkout/library/core/src/ops/mod.rs" "/checkout/library/core/src/ops/deref.rs" "/checkout/library/core/src/ops/try_trait.rs" "/checkout/library/core/src/ops/range.rs" "/checkout/library/core/src/ops/function.rs" "/checkout/library/core/src/ops/control_flow.rs" "/checkout/library/core/src/ops/index.rs" "/checkout/library/core/src/ops/drop.rs" "/checkout/library/core/src/ops/async_function.rs" "/checkout/src/tools/run-make-support/src/external_deps/llvm.rs" "/checkout/library/core/src/ops/bit.rs" "/checkout/src/tools/run-make-support/src/external_deps/cc.rs" "/checkout/src/tools/run-make-support/src/external_deps/rustc.rs" "/checkout/library/core/src/time.rs" "/checkout/src/tools/run-make-support/src/external_deps/mod.rs" "/checkout/src/tools/run-make-support/src/external_deps/c_build.rs" "/checkout/src/tools/run-make-support/src/external_deps/python.rs" "/checkout/src/tools/run-make-support/src/external_deps/rustdoc.rs" "/checkout/src/tools/run-make-support/src/external_deps/clang.rs" "/checkout/library/core/benches/pattern.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.
local time: Sun Aug 25 06:31:16 UTC 2024
network time: Sun, 25 Aug 2024 06:31:16 GMT
##[error]Process completed with exit code 1.
Post job cleanup.
These buttons are way too big on mobile IMO. Here is what it looks on a Galaxy S20 emulated by Firefox with the crate name replaced by a slightly larger one:
Screenshot
@bjorn3 Does this look more reasonable?
The job mingw-check-tidy failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
# NOTE: intentionally uses python2 for x.py so we can test it still works.
# validate-toolstate only runs in our CI, so it's ok for it to only support python3.
ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test \
--stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --allow-unsafe --generate-hashes reuse-requirements.in
---
#13 2.830 Building wheels for collected packages: reuse
#13 2.831 Building wheel for reuse (pyproject.toml): started
#13 3.078 Building wheel for reuse (pyproject.toml): finished with status 'done'
#13 3.079 Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132715 sha256=dfa09868353292d98f811d3efdb0d54d07389e808efc71d68e3b93c514bf8bec
#13 3.079 Stored in directory: /tmp/pip-ephem-wheel-cache-llsa38bu/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#13 3.082 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#13 3.474 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#13 3.474 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#13 4.007 Collecting virtualenv
#13 4.007 Collecting virtualenv
#13 4.059 Downloading virtualenv-20.26.3-py3-none-any.whl (5.7 MB)
#13 4.262 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.7/5.7 MB 28.3 MB/s eta 0:00:00
#13 4.322 Collecting platformdirs<5,>=3.9.1
#13 4.328 Downloading platformdirs-4.2.2-py3-none-any.whl (18 kB)
#13 4.349 Collecting distlib<1,>=0.3.7
#13 4.367 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 KB 55.5 MB/s eta 0:00:00
#13 4.404 Collecting filelock<4,>=3.12.2
#13 4.410 Downloading filelock-3.15.4-py3-none-any.whl (16 kB)
#13 4.410 Downloading filelock-3.15.4-py3-none-any.whl (16 kB)
#13 4.491 Installing collected packages: distlib, platformdirs, filelock, virtualenv
#13 4.676 Successfully installed distlib-0.3.8 filelock-3.15.4 platformdirs-4.2.2 virtualenv-20.26.3
#13 DONE 4.8s
#14 [7/8] COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
#14 DONE 0.0s
---
DirectMap4k: 178112 kB
DirectMap2M: 6113280 kB
DirectMap1G: 12582912 kB
##[endgroup]
Executing TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
+ TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
Finished `dev` profile [unoptimized] target(s) in 0.04s
##[endgroup]
downloading https://ci-artifacts.rust-lang.org/rustc-builds-alt/89103466d77a3ae068bab0fd17c53bf7104f627b/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz
extracting /checkout/obj/build/cache/llvm-89103466d77a3ae068bab0fd17c53bf7104f627b-true/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm
---
Diff in /checkout/src/librustdoc/html/sources.rs:346:
} else {
None
},
- }.render_into(&mut writer).unwrap();
+ .render_into(&mut writer)
+ .unwrap();
}
fmt error: Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/rustfmt/bin/rustfmt" "--config-path" "/checkout" "--edition" "2021" "--unstable-features" "--skip-children" "--check" "/checkout/src/librustdoc/html/markdown.rs" "/checkout/src/librustdoc/html/markdown/tests.rs" "/checkout/src/librustdoc/html/static_files.rs" "/checkout/src/librustdoc/html/highlight/fixtures/sample.rs" "/checkout/src/librustdoc/html/highlight/fixtures/union.rs" "/checkout/src/librustdoc/html/highlight/tests.rs" "/checkout/src/librustdoc/html/url_parts_builder.rs" "/checkout/src/librustdoc/html/render/search_index/encode.rs" "/checkout/src/librustdoc/html/render/type_layout.rs" "/checkout/src/librustdoc/html/render/search_index.rs" "/checkout/src/librustdoc/html/render/print_item.rs" "/checkout/src/librustdoc/html/render/sorted_template/tests.rs" "/checkout/src/librustdoc/html/render/write_shared.rs" "/checkout/src/librustdoc/html/render/mod.rs" "/checkout/src/librustdoc/html/render/context.rs" "/checkout/src/librustdoc/html/render/write_shared/tests.rs" "/checkout/src/librustdoc/html/render/span_map.rs" "/checkout/src/librustdoc/html/render/ordered_json.rs" "/checkout/src/librustdoc/html/render/sorted_template.rs" "/checkout/src/librustdoc/html/render/sidebar.rs" "/checkout/src/librustdoc/html/render/tests.rs" "/checkout/src/librustdoc/html/render/ordered_json/tests.rs" "/checkout/src/librustdoc/html/sources.rs" "/checkout/src/librustdoc/html/escape.rs" "/checkout/src/librustdoc/html/tests.rs" "/checkout/src/librustdoc/html/format.rs" "/checkout/src/librustdoc/visit.rs" "/checkout/src/librustdoc/formats/mod.rs" "/checkout/src/librustdoc/formats/item_type.rs" "/checkout/src/librustdoc/formats/cache.rs" "/checkout/src/librustdoc/formats/renderer.rs" "/checkout/src/librustdoc/doctest.rs" "/checkout/src/librustdoc/externalfiles.rs" "/checkout/src/tools/cargotest/main.rs" "/checkout/src/tools/run-make-support/src/macros.rs" "/checkout/src/tools/run-make-support/src/symbols.rs" "/checkout/src/tools/run-make-support/src/diff/mod.rs" "/checkout/src/tools/run-make-support/src/diff/tests.rs" "/checkout/library/alloc/src/collections/btree/map/entry.rs" "/checkout/library/alloc/src/collections/btree/map/tests.rs" "/checkout/library/alloc/src/collections/btree/mem.rs" "/checkout/library/alloc/src/collections/btree/remove.rs" "/checkout/library/alloc/src/collections/btree/split.rs" "/checkout/library/alloc/src/collections/btree/navigate.rs" "/checkout/library/alloc/src/collections/btree/borrow.rs" "/checkout/library/alloc/src/collections/btree/search.rs" "/checkout/library/alloc/src/collections/btree/merge_iter.rs" "/checkout/library/alloc/src/collections/mod.rs" "/checkout/library/alloc/src/collections/linked_list.rs" "/checkout/library/alloc/src/collections/binary_heap/mod.rs" "/checkout/library/alloc/src/collections/binary_heap/tests.rs" "/checkout/src/tools/run-make-support/src/external_deps/llvm.rs" "/checkout/src/tools/run-make-support/src/external_deps/cc.rs" "/checkout/src/tools/run-make-support/src/external_deps/rustc.rs" "/checkout/src/tools/run-make-support/src/external_deps/mod.rs" "/checkout/src/tools/run-make-support/src/external_deps/c_build.rs" "/checkout/src/tools/run-make-support/src/external_deps/python.rs" "/checkout/src/tools/run-make-support/src/external_deps/rustdoc.rs" "/checkout/src/tools/run-make-support/src/external_deps/clang.rs" "/checkout/src/tools/run-make-support/src/external_deps/htmldocck.rs" "/checkout/src/tools/run-make-support/src/artifact_names.rs" "/checkout/src/tools/run-make-support/src/path_helpers.rs" "/checkout/src/tools/run-make-support/src/scoped_run.rs" "/checkout/src/librustdoc/html/url_parts_builder/tests.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.
local time: Sun Aug 25 14:28:16 UTC 2024
network time: Sun, 25 Aug 2024 14:28:16 GMT
##[error]Process completed with exit code 1.
Post job cleanup.
Much better! Thanks!
The job mingw-check-tidy failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
COPY host-x86_64/mingw-check/validate-error-codes.sh /scripts/
# NOTE: intentionally uses python2 for x.py so we can test it still works.
# validate-toolstate only runs in our CI, so it's ok for it to only support python3.
ENV SCRIPT TIDY_PRINT_DIFF=1 python2.7 ../x.py test \
--stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --allow-unsafe --generate-hashes reuse-requirements.in
---
#13 3.043 Building wheels for collected packages: reuse
#13 3.045 Building wheel for reuse (pyproject.toml): started
#13 3.287 Building wheel for reuse (pyproject.toml): finished with status 'done'
#13 3.288 Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132715 sha256=dfa09868353292d98f811d3efdb0d54d07389e808efc71d68e3b93c514bf8bec
#13 3.288 Stored in directory: /tmp/pip-ephem-wheel-cache-xb15ochd/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#13 3.290 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#13 3.687 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#13 3.687 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#13 4.208 Collecting virtualenv
#13 4.208 Collecting virtualenv
#13 4.258 Downloading virtualenv-20.26.3-py3-none-any.whl (5.7 MB)
#13 4.461 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.7/5.7 MB 28.4 MB/s eta 0:00:00
#13 4.515 Collecting platformdirs<5,>=3.9.1
#13 4.522 Downloading platformdirs-4.2.2-py3-none-any.whl (18 kB)
#13 4.545 Collecting distlib<1,>=0.3.7
#13 4.562 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 KB 56.3 MB/s eta 0:00:00
#13 4.601 Collecting filelock<4,>=3.12.2
#13 4.608 Downloading filelock-3.15.4-py3-none-any.whl (16 kB)
#13 4.608 Downloading filelock-3.15.4-py3-none-any.whl (16 kB)
#13 4.687 Installing collected packages: distlib, platformdirs, filelock, virtualenv
#13 4.875 Successfully installed distlib-0.3.8 filelock-3.15.4 platformdirs-4.2.2 virtualenv-20.26.3
#13 DONE 5.0s
#14 [7/8] COPY host-x86_64/mingw-check/validate-toolstate.sh /scripts/
#14 DONE 0.0s
---
DirectMap4k: 223168 kB
DirectMap2M: 9213952 kB
DirectMap1G: 9437184 kB
##[endgroup]
Executing TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
+ TIDY_PRINT_DIFF=1 python2.7 ../x.py test --stage 0 src/tools/tidy tidyselftest --extra-checks=py:lint,cpp:fmt
Finished `dev` profile [unoptimized] target(s) in 0.06s
##[endgroup]
downloading https://ci-artifacts.rust-lang.org/rustc-builds-alt/89103466d77a3ae068bab0fd17c53bf7104f627b/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz
extracting /checkout/obj/build/cache/llvm-89103466d77a3ae068bab0fd17c53bf7104f627b-true/rust-dev-nightly-x86_64-unknown-linux-gnu.tar.xz to /checkout/obj/build/x86_64-unknown-linux-gnu/ci-llvm
---
Diff in /checkout/src/librustdoc/html/sources.rs:346:
} else {
None
},
- }.render_into(&mut writer).unwrap();
+ .render_into(&mut writer)
+ .unwrap();
}
fmt error: Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/rustfmt/bin/rustfmt" "--config-path" "/checkout" "--edition" "2021" "--unstable-features" "--skip-children" "--check" "/checkout/src/librustdoc/html/render/tests.rs" "/checkout/library/core/tests/array.rs" "/checkout/library/core/tests/lib.rs" "/checkout/library/core/tests/option.rs" "/checkout/library/core/tests/str_lossy.rs" "/checkout/src/librustdoc/html/render/ordered_json/tests.rs" "/checkout/library/core/tests/async_iter/mod.rs" "/checkout/library/core/tests/ops.rs" "/checkout/library/core/tests/convert.rs" "/checkout/library/core/tests/alloc.rs" "/checkout/library/core/tests/waker.rs" "/checkout/library/core/tests/nonzero.rs" "/checkout/library/core/tests/mem.rs" "/checkout/library/core/tests/atomic.rs" "/checkout/library/core/tests/io/borrowed_buf.rs" "/checkout/library/core/tests/io/mod.rs" "/checkout/library/core/tests/future.rs" "/checkout/library/core/tests/result.rs" "/checkout/library/core/tests/ffi/cstr.rs" "/checkout/library/core/tests/slice.rs" "/checkout/library/core/tests/ascii_char.rs" "/checkout/library/core/tests/pin.rs" "/checkout/library/core/tests/str.rs" "/checkout/library/core/tests/net/socket_addr.rs" "/checkout/library/core/tests/net/mod.rs" "/checkout/library/core/tests/net/ip_addr.rs" "/checkout/library/core/tests/net/parser.rs" "/checkout/library/core/tests/num/flt2dec/strategy/dragon.rs" "/checkout/src/librustdoc/html/sources.rs" "/checkout/library/core/tests/num/flt2dec/strategy/grisu.rs" "/checkout/src/librustdoc/html/escape.rs" "/checkout/src/librustdoc/html/tests.rs" "/checkout/library/core/tests/num/flt2dec/mod.rs" "/checkout/src/librustdoc/html/format.rs" "/checkout/library/core/tests/num/flt2dec/random.rs" "/checkout/library/core/tests/num/flt2dec/estimator.rs" "/checkout/src/librustdoc/visit.rs" "/checkout/library/core/tests/num/int_macros.rs" "/checkout/library/core/tests/num/ieee754.rs" "/checkout/library/core/tests/num/i128.rs" "/checkout/library/core/tests/num/u128.rs" "/checkout/library/core/tests/num/bignum.rs" "/checkout/library/core/tests/num/u32.rs" "/checkout/library/core/tests/num/mod.rs" "/checkout/library/core/tests/num/uint_macros.rs" "/checkout/library/core/tests/num/wrapping.rs" "/checkout/library/core/tests/num/u16.rs" "/checkout/src/librustdoc/formats/mod.rs" "/checkout/src/librustdoc/formats/item_type.rs" "/checkout/src/librustdoc/formats/cache.rs" "/checkout/src/librustdoc/formats/renderer.rs" "/checkout/src/librustdoc/doctest.rs" "/checkout/src/librustdoc/externalfiles.rs" "/checkout/library/core/tests/num/dec2flt/float.rs" "/checkout/library/core/tests/num/dec2flt/mod.rs" "/checkout/library/core/tests/num/dec2flt/lemire.rs" "/checkout/library/core/tests/num/dec2flt/parse.rs" "/checkout/library/core/tests/num/i16.rs" "/checkout/library/core/tests/num/nan.rs" "/checkout/library/core/tests/num/u64.rs" "/checkout/library/core/tests/num/const_from.rs" "/checkout/library/core/tests/num/float_iter_sum_identity.rs" "/checkout/library/core/tests/num/ops.rs" "/checkout/src/librustdoc/html/render/sidebar.rs"` failed.
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.
local time: Sun Aug 25 15:29:11 UTC 2024
network time: Sun, 25 Aug 2024 15:29:11 GMT
##[error]Process completed with exit code 1.
Post job cleanup.
The job mingw-check failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
#16 2.858 Building wheels for collected packages: reuse
#16 2.859 Building wheel for reuse (pyproject.toml): started
#16 3.104 Building wheel for reuse (pyproject.toml): finished with status 'done'
#16 3.105 Created wheel for reuse: filename=reuse-4.0.3-cp310-cp310-manylinux_2_35_x86_64.whl size=132715 sha256=dfa09868353292d98f811d3efdb0d54d07389e808efc71d68e3b93c514bf8bec
#16 3.105 Stored in directory: /tmp/pip-ephem-wheel-cache-3whth5se/wheels/3d/8d/0a/e0fc6aba4494b28a967ab5eaf951c121d9c677958714e34532
#16 3.108 Installing collected packages: boolean-py, binaryornot, tomlkit, reuse, python-debian, markupsafe, license-expression, jinja2, chardet, attrs
#16 3.515 Successfully installed attrs-23.2.0 binaryornot-0.4.4 boolean-py-4.0 chardet-5.2.0 jinja2-3.1.4 license-expression-30.3.0 markupsafe-2.1.5 python-debian-0.1.49 reuse-4.0.3 tomlkit-0.13.0
#16 3.516 WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
#16 DONE 3.6s
---
info: ES-Check: there were no ES version matching errors! 🎉
+ eslint -c ../src/librustdoc/html/static/.eslintrc.js ../src/librustdoc/html/static/js/externs.js ../src/librustdoc/html/static/js/main.js ../src/librustdoc/html/static/js/scrape-examples.js ../src/librustdoc/html/static/js/search.js ../src/librustdoc/html/static/js/settings.js ../src/librustdoc/html/static/js/src-script.js ../src/librustdoc/html/static/js/storage.js
/checkout/src/librustdoc/html/static/js/main.js
1494:19 error 'target' is assigned a value but never used. Allowed unused vars must match /^_/u no-unused-vars
/checkout/src/librustdoc/html/static/js/storage.js
/checkout/src/librustdoc/html/static/js/storage.js
283:15 error 'currentCrate' is assigned a value but never used. Allowed unused vars must match /^_/u no-unused-vars
✖ 2 problems (2 errors, 0 warnings)
local time: Sun Aug 25 16:11:29 UTC 2024
network time: Sun, 25 Aug 2024 16:11:29 GMT
##[error]Process completed with exit code 1.
Post job cleanup.
The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
FFFFFFFFFF (120/129)
FFFFFFFFF (129/129)
/checkout/tests/rustdoc-gui/help-page.goml help-page... FAILED
[ERROR] `tests/rustdoc-gui/help-page.goml` line 7: "#help-button > a" not found: for command `click: "#help-button > a"`
/checkout/tests/rustdoc-gui/item-info.goml item-info... FAILED
/checkout/tests/rustdoc-gui/item-info.goml item-info... FAILED
[ERROR] `tests/rustdoc-gui/item-info.goml` line 23: Condition `711 != 734 && 711 == 688 && 734 == 711` was evaluated as false: for command `assert: |first_line_y| != |second_line_y| && |first_line_y| == 688 && |second_line_y| == 711`
/checkout/tests/rustdoc-gui/mobile.goml mobile... FAILED
[ERROR] `tests/rustdoc-gui/mobile.goml` line 10: The following errors happened (for selector `.main-heading`): [expected `flex` for key `display`, found `grid`; expected `column` for key `flex-direction`, found `row`]: for command `assert-css: (".main-heading", {
"display": "flex",
"flex-direction": "column"
})`
[ERROR] `tests/rustdoc-gui/mobile.goml` line 19: ".content .out-of-band .since" not found: for command `assert-css: (".content .out-of-band .since::before", { "content": "\"Since \"" })`
[ERROR] `tests/rustdoc-gui/mobile.goml` line 23: ".content .out-of-band .since" not found: for command `assert-css-false: (".content .out-of-band .since::before", { "content": "\"Since \"" })`
[ERROR] `tests/rustdoc-gui/mobile.goml` around line 27: JS errors occurred: TypeError: Cannot set properties of null (setting 'onclick')
/checkout/tests/rustdoc-gui/notable-trait.goml notable-trait... FAILED
[ERROR] `tests/rustdoc-gui/notable-trait.goml` around line 221
from `tests/rustdoc-gui/notable-trait.goml` line 227: JS errors occurred: TypeError: Cannot set properties of null (setting 'onclick')
/checkout/tests/rustdoc-gui/scrape-examples-layout.goml scrape-examples-layout... FAILED
[ERROR] `tests/rustdoc-gui/scrape-examples-layout.goml` line 42: The following errors happened: [different Y values: 253 (or 253) != 226]: for command `assert-position: (".scraped-example .code-wrapper", {"y": 226})`
[ERROR] `tests/rustdoc-gui/scrape-examples-layout.goml` line 43: The following errors happened: [different Y values: 257 (or 257) != 230]: for command `assert-position: (".scraped-example .code-wrapper .prev", {"y": 226 + |offset_y|})`
/checkout/tests/rustdoc-gui/search-error.goml search-error... FAILED
/checkout/tests/rustdoc-gui/search-error.goml search-error... FAILED
[ERROR] `tests/rustdoc-gui/utils.goml` around line 8
from `tests/rustdoc-gui/search-error.goml` line 10
from `tests/rustdoc-gui/search-error.goml` line 16: JS errors occurred: TypeError: Cannot set properties of null (setting 'onclick')
/checkout/tests/rustdoc-gui/search-filter.goml search-filter... FAILED
[ERROR] `tests/rustdoc-gui/utils.goml` around line 8
from `tests/rustdoc-gui/search-filter.goml` line 63: JS errors occurred: TypeError: Cannot set properties of null (setting 'onclick')
/checkout/tests/rustdoc-gui/search-form-elements.goml search-form-elements... FAILED
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 32
from `tests/rustdoc-gui/search-form-elements.goml` line 95: The following errors happened (for selector `#help-button`): [expected `#c5c5c5` for key `border-color`, found `#808080`]: for command `assert-css: (
"#help-button",
{"border-color": |menu_button_border|},
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 36
from `tests/rustdoc-gui/search-form-elements.goml` line 95: The following errors happened (for selector `#help-button > a`): [expected `#fff` for key `color`, found `#c5c5c5`; expected `#5c6773` for key `border-color`, found `#00000000`; expected `#141920` for key `background-color`, found `#00000000`]: for command `assert-css: (
"#help-button > a",
{
"color": |menu_button_a_color|,
"border-color": |border|,
"background-color": |background|,
)`
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 46
from `tests/rustdoc-gui/search-form-elements.goml` line 95: The following errors happened (for selector `#help-button:hover`): [expected `#c5c5c5` for key `border-color`, found `#808080`]: for command `assert-css: (
"#help-button:hover",
{"border-color": |menu_button_border|},
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 50
from `tests/rustdoc-gui/search-form-elements.goml` line 95: The following errors happened (for selector `#help-button > a`): [expected `#fff` for key `color`, found `#c5c5c5`; expected `#141920` for key `background-color`, found `#00000000`]: for command `assert-css: (
"#help-button > a",
{
"color": |menu_button_a_color|,
"border-color": |menu_button_a_border_hover|,
"background-color": |background|,
)`
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 66
from `tests/rustdoc-gui/search-form-elements.goml` line 95: The following errors happened (for selector `#settings-menu`): [expected `#c5c5c5` for key `border-color`, found `#808080`]: for command `assert-css: (
"#settings-menu",
{"border-color": |menu_button_border|},
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 70
from `tests/rustdoc-gui/search-form-elements.goml` line 95: The following errors happened (for selector `#settings-menu > a`): [expected `#fff` for key `color`, found `#c5c5c5`; expected `#5c6773` for key `border-color`, found `#00000000`; expected `#141920` for key `background-color`, found `#00000000`]: for command `assert-css: (
"#settings-menu > a",
{
"color": |menu_button_a_color|,
"border-color": |border|,
"background-color": |background|,
)`
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 80
from `tests/rustdoc-gui/search-form-elements.goml` line 95: The following errors happened (for selector `#settings-menu:hover`): [expected `#c5c5c5` for key `border-color`, found `#808080`]: for command `assert-css: (
"#settings-menu:hover",
{"border-color": |menu_button_border|},
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 84
from `tests/rustdoc-gui/search-form-elements.goml` line 95: The following errors happened (for selector `#settings-menu:hover > a`): [expected `#fff` for key `color`, found `#c5c5c5`; expected `#141920` for key `background-color`, found `#00000000`]: for command `assert-css: (
"#settings-menu:hover > a",
{
"color": |menu_button_a_color|,
"border-color": |menu_button_a_border_hover|,
"background-color": |background|,
)`
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 32
from `tests/rustdoc-gui/search-form-elements.goml` line 109: The following errors happened (for selector `#help-button`): [expected `#ddd` for key `border-color`, found `#808080`]: for command `assert-css: (
"#help-button",
{"border-color": |menu_button_border|},
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 36
from `tests/rustdoc-gui/search-form-elements.goml` line 109: The following errors happened (for selector `#help-button > a`): [expected `#000` for key `color`, found `#ddd`; expected `#e0e0e0` for key `border-color`, found `#00000000`; expected `#f0f0f0` for key `background-color`, found `#00000000`]: for command `assert-css: (
"#help-button > a",
{
"color": |menu_button_a_color|,
"border-color": |border|,
"background-color": |background|,
)`
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 46
from `tests/rustdoc-gui/search-form-elements.goml` line 109: The following errors happened (for selector `#help-button:hover`): [expected `#ddd` for key `border-color`, found `#808080`]: for command `assert-css: (
"#help-button:hover",
{"border-color": |menu_button_border|},
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 50
from `tests/rustdoc-gui/search-form-elements.goml` line 109: The following errors happened (for selector `#help-button > a`): [expected `#000` for key `color`, found `#ddd`; expected `#f0f0f0` for key `background-color`, found `#00000000`]: for command `assert-css: (
"#help-button > a",
{
"color": |menu_button_a_color|,
"border-color": |menu_button_a_border_hover|,
"background-color": |background|,
)`
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 66
from `tests/rustdoc-gui/search-form-elements.goml` line 109: The following errors happened (for selector `#settings-menu`): [expected `#ddd` for key `border-color`, found `#808080`]: for command `assert-css: (
"#settings-menu",
{"border-color": |menu_button_border|},
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 70
from `tests/rustdoc-gui/search-form-elements.goml` line 109: The following errors happened (for selector `#settings-menu > a`): [expected `#000` for key `color`, found `#ddd`; expected `#e0e0e0` for key `border-color`, found `#00000000`; expected `#f0f0f0` for key `background-color`, found `#00000000`]: for command `assert-css: (
"#settings-menu > a",
{
"color": |menu_button_a_color|,
"border-color": |border|,
"background-color": |background|,
)`
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 80
from `tests/rustdoc-gui/search-form-elements.goml` line 109: The following errors happened (for selector `#settings-menu:hover`): [expected `#ddd` for key `border-color`, found `#808080`]: for command `assert-css: (
"#settings-menu:hover",
{"border-color": |menu_button_border|},
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 84
from `tests/rustdoc-gui/search-form-elements.goml` line 109: The following errors happened (for selector `#settings-menu:hover > a`): [expected `#000` for key `color`, found `#ddd`; expected `#f0f0f0` for key `background-color`, found `#00000000`]: for command `assert-css: (
"#settings-menu:hover > a",
{
"color": |menu_button_a_color|,
"border-color": |menu_button_a_border_hover|,
"background-color": |background|,
)`
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 32
from `tests/rustdoc-gui/search-form-elements.goml` line 123: The following errors happened (for selector `#help-button`): [expected `#000` for key `border-color`, found `#808080`]: for command `assert-css: (
"#help-button",
{"border-color": |menu_button_border|},
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 36
from `tests/rustdoc-gui/search-form-elements.goml` line 123: The following errors happened (for selector `#help-button > a`): [expected `#e0e0e0` for key `border-color`, found `#00000000`; expected `#fff` for key `background-color`, found `#0000`]: for command `assert-css: (
"#help-button > a",
{
"color": |menu_button_a_color|,
"border-color": |border|,
"background-color": |background|,
)`
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 46
from `tests/rustdoc-gui/search-form-elements.goml` line 123: The following errors happened (for selector `#help-button:hover`): [expected `#000` for key `border-color`, found `#808080`]: for command `assert-css: (
"#help-button:hover",
{"border-color": |menu_button_border|},
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 50
from `tests/rustdoc-gui/search-form-elements.goml` line 123: The following errors happened (for selector `#help-button > a`): [expected `#fff` for key `background-color`, found `#0000`]: for command `assert-css: (
"#help-button > a",
{
"color": |menu_button_a_color|,
"border-color": |menu_button_a_border_hover|,
"background-color": |background|,
)`
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 66
from `tests/rustdoc-gui/search-form-elements.goml` line 123: The following errors happened (for selector `#settings-menu`): [expected `#000` for key `border-color`, found `#808080`]: for command `assert-css: (
"#settings-menu",
{"border-color": |menu_button_border|},
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 70
from `tests/rustdoc-gui/search-form-elements.goml` line 123: The following errors happened (for selector `#settings-menu > a`): [expected `#e0e0e0` for key `border-color`, found `#00000000`; expected `#fff` for key `background-color`, found `#0000`]: for command `assert-css: (
"#settings-menu > a",
{
"color": |menu_button_a_color|,
"border-color": |border|,
"background-color": |background|,
)`
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 80
from `tests/rustdoc-gui/search-form-elements.goml` line 123: The following errors happened (for selector `#settings-menu:hover`): [expected `#000` for key `border-color`, found `#808080`]: for command `assert-css: (
"#settings-menu:hover",
{"border-color": |menu_button_border|},
)`
[ERROR] `tests/rustdoc-gui/search-form-elements.goml` line 84
from `tests/rustdoc-gui/search-form-elements.goml` line 123: The following errors happened (for selector `#settings-menu:hover > a`): [expected `#fff` for key `background-color`, found `#0000`]: for command `assert-css: (
"#settings-menu:hover > a",
{
"color": |menu_button_a_color|,
"border-color": |menu_button_a_border_hover|,
"background-color": |background|,
)`
/checkout/tests/rustdoc-gui/search-no-result.goml search-no-result... FAILED
/checkout/tests/rustdoc-gui/search-no-result.goml search-no-result... FAILED
[ERROR] `tests/rustdoc-gui/utils.goml` around line 8
from `tests/rustdoc-gui/search-no-result.goml` line 10
from `tests/rustdoc-gui/search-no-result.goml` line 21: JS errors occurred: TypeError: Cannot set properties of null (setting 'onclick')
/checkout/tests/rustdoc-gui/search-result-color.goml search-result-color... FAILED
[ERROR] `tests/rustdoc-gui/utils.goml` around line 8
from `tests/rustdoc-gui/search-result-color.goml` line 13
from `tests/rustdoc-gui/search-result-color.goml` line 149: JS errors occurred: TypeError: Cannot set properties of null (setting 'onclick')
/checkout/tests/rustdoc-gui/search-result-display.goml search-result-display... FAILED
[WARNING] `tests/rustdoc-gui/search-result-display.goml` line 37: Delta is 0 for "x", maybe try to use `compare-elements-position` instead?
[ERROR] `tests/rustdoc-gui/search-result-display.goml` line 54: The following errors happened (for selector `.search-results-title`): [expected `50px` for key `height`, found `38px`; expected `640px` for key `width`, found `388px`]: for command `assert-css: (".search-results-title", {"height": "50px", "width": "640px"})`
[ERROR] `tests/rustdoc-gui/search-result-display.goml` line 64: The following errors happened: [expected a width of `527`, found `760`]: for command `assert-size: ("#crate-search", {"width": 527})`
[ERROR] `tests/rustdoc-gui/search-result-display.goml` line 65: The following errors happened: [expected a width of `640`, found `873`; expected a height of `50`, found `38`]: for command `assert-size: (".search-results-title", {"height": 50, "width": 640})`
[ERROR] `tests/rustdoc-gui/utils.goml` around line 8
from `tests/rustdoc-gui/search-result-display.goml` line 75
from `tests/rustdoc-gui/search-result-display.goml` line 86: JS errors occurred: TypeError: Cannot set properties of null (setting 'onclick')
/checkout/tests/rustdoc-gui/search-tab.goml search-tab... FAILED
[ERROR] `tests/rustdoc-gui/utils.goml` around line 8
from `tests/rustdoc-gui/search-tab.goml` line 12
from `tests/rustdoc-gui/search-tab.goml` line 40: JS errors occurred: TypeError: Cannot set properties of null (setting 'onclick')
/checkout/tests/rustdoc-gui/setting-go-to-only-result.goml setting-go-to-only-result... FAILED
[ERROR] `testsError: ()
/rustdoc-gui/setting-go-to-only-result.goml` around line 28: JS errors occurred: TypeError: Cannot set properties of null (setting 'onclick')
/checkout/tests/rustdoc-gui/settings-button.goml settings-button... FAILED
[ERROR] `tests/rustdoc-gui/settings-button.goml` line 12
from `tests/rustdoc-gui/settings-button.goml` line 20: The following errors happened (for selector `#settings-menu > a`): [expected `22px` for key `width`, found `18px`; expected `22px` for key `height`, found `18px`]: for command `assert-css: ("#settings-menu > a::before", {
"filter": |filter|,
"width": "22px",
"height": "22px",
})`
[ERROR] `tests/rustdoc-gui/settings-button.goml` line 12
from `tests/rustdoc-gui/settings-button.goml` line 24: The following errors happened (for selector `#settings-menu > a`): [expected `none` for key `filter`, found `invert(0.65)`; expected `22px` for key `width`, found `18px`; expected `22px` for key `height`, found `18px`]: for command `assert-css: ("#settings-menu > a::before", {
"filter": |filter|,
"width": "22px",
"height": "22px",
})`
[ERROR] `tests/rustdoc-gui/settings-button.goml` line 12
from `tests/rustdoc-gui/settings-button.goml` line 28: The following errors happened (for selector `#settings-menu > a`): [expected `none` for key `filter`, found `invert(0.35)`; expected `22px` for key `width`, found `18px`; expected `22px` for key `height`, found `18px`]: for command `assert-css: ("#settings-menu > a::before", {
"filter": |filter|,
"width": "22px",
"height": "22px",
})`
/checkout/tests/rustdoc-gui/settings.goml settings... FAILED
/checkout/tests/rustdoc-gui/settings.goml settings... FAILED
[ERROR] `tests/rustdoc-gui/settings.goml` line 23: Error: The following CSS selector "#settings" was not found: for command `wait-for-css: ("#settings", {"display": "none"})`
/checkout/tests/rustdoc-gui/shortcuts.goml shortcuts... FAILED
/checkout/tests/rustdoc-gui/shortcuts.goml shortcuts... FAILED
[ERROR] `tests/rustdoc-gui/shortcuts.goml` line 13: "#help-button .popover" not found: for command `assert-css: ("#help-button .popover", {"display": "none"})`
[ERROR] `tests/rustdoc-gui/shortcuts.goml` line 16: The following errors happened: [`
Summary
` isn't equal to `[−]`]: for command `assert-text: ("#toggle-all-docs", "[−]")`
[ERROR] `tests/rustdoc-gui/shortcuts.goml` line 18: Error: The following checks still fail: [`
Show all
` isn't equal to `[+]`]: for command `wait-for-text: ("#toggle-all-docs", "[+]")`
/checkout/tests/rustdoc-gui/sidebar-mobile.goml sidebar-mobile... FAILED
/checkout/tests/rustdoc-gui/sidebar-mobile.goml sidebar-mobile... FAILED
[ERROR] `tests/rustdoc-gui/utils.goml` around line 8
from `tests/rustdoc-gui/sidebar-mobile.goml` line 66
from `tests/rustdoc-gui/sidebar-mobile.goml` line 78: JS errors occurred: TypeError: Cannot set properties of null (setting 'onclick')
/checkout/tests/rustdoc-gui/sidebar-resize-setting.goml sidebar-resize-setting... FAILED
[ERROR] `tests/rustdoc-gui/sidebar-resize-setting.goml` line 12: Error: The following CSS selector "#settings" was not found: for command `wait-for-css: ("#settings", {"display": "none"})`
/checkout/tests/rustdoc-gui/sidebar-source-code-display.goml sidebar-source-code-display... FAILED
[ERROR] `tests/rustdoc-gui/sidebar-source-code-display.goml` line 145: The following errors happened: [expected `2493` for window property `pageYOffset`, found `2550`]: for command `assert-window-property: {"pageYOffset": |y_offset|}`
[ERROR] `tests/rustdoc-gui/sidebar-source-code-display.goml` line 152: The following errors happened: [expected `2493` for window property `pageYOffset`, found `2550`]: for command `assert-window-property: {"pageYOffset": |y_offset|}`
/checkout/tests/rustdoc-gui/sidebar.goml sidebar... FAILED
/checkout/tests/rustdoc-gui/sidebar.goml sidebar... FAILED
[ERROR] `tests/rustdoc-gui/sidebar.goml` line 165: The following errors happened: [`
Show all
` isn't equal to `[+]`]: for command `assert-text: ("#toggle-all-docs", "[+]")`
[ERROR] `tests/rustdoc-gui/sidebar.goml` line 168: The following errors happened: [`
Summary
` isn't equal to `[−]`]: for command `assert-text: ("#toggle-all-docs", "[−]")`
/checkout/tests/rustdoc-gui/source-anchor-scroll.goml source-anchor-scroll... FAILED
[ERROR] `tests/rustdoc-gui/source-anchor-scroll.goml` line 11: The following errors happened (for selector `html`): [expected `123` for property `"scrollTop"`, found `180`]: for command `assert-property: ("html", {"scrollTop": "123"})`
[ERROR] `tests/rustdoc-gui/source-anchor-scroll.goml` line 13: The following errors happened (for selector `html`): [expected `154` for property `"scrollTop"`, found `211`]: for command `assert-property: ("html", {"scrollTop": "154"})`
[ERROR] `tests/rustdoc-gui/source-anchor-scroll.goml` line 15: The following errors happened (for selector `html`): [expected `51` for property `"scrollTop"`, found `108`]: for command `assert-property: ("html", {"scrollTop": "51"})`
[ERROR] `tests/rustdoc-gui/source-anchor-scroll.goml` line 20: The following errors happened (for selector `html`): [expected `51` for property `"scrollTop"`, found `108`]: for command `assert-property: ("html", {"scrollTop": "51"})`
/checkout/tests/rustdoc-gui/source-code-page.goml source-code-page... FAILED
/checkout/tests/rustdoc-gui/source-code-page.goml source-code-page... FAILED
[ERROR] `tests/rustdoc-gui/source-code-page.goml` line 92: The following errors happened: [different Y values: 162 (or 162) != 86]: for command `assert-position: ("//*[@id='1']", {"x": 88, "y": 86})`
/checkout/tests/rustdoc-gui/theme-change.goml theme-change... FAILED
/checkout/tests/rustdoc-gui/theme-change.goml theme-change... FAILED
[ERROR] `tests/rustdoc-gui/theme-change.goml` around line 29: JS errors occurred: TypeError: Cannot set properties of null (setting 'onclick')
/checkout/tests/rustdoc-gui/theme-in-history.goml theme-in-history... FAILED
[ERROR] `tests/rustdoc-gui/theme-in-history.goml` around line 12: JS errors occurred: TypeError: Cannot set properties of null (setting 'onclick')
/checkout/tests/rustdoc-gui/toggle-docs.goml toggle-docs... FAILED
[ERROR] `tests/rustdoc-gui/toggle-docs.goml` line 5: The following errors happened: [`
Summary
` isn't equal to `[−]`]: for command `assert-text: ("#toggle-all-docs", "[−]")`
[ERROR] `tests/rustdoc-gui/toggle-docs.goml` line 10: The following errors happened: [`
Show all
` isn't equal to `[+]`]: for command `assert-text: ("#toggle-all-docs", "[+]")`
[ERROR] `tests/rustdoc-gui/toggle-docs.goml` line 18: The following errors happened: [`
Summary
` isn't equal to `[−]`]: for command `assert-text: ("#toggle-all-docs", "[−]")`
[ERROR] `tests/rustdoc-gui/toggle-docs.goml` line 23: The following errors happened: [`
Summary
` isn't equal to `[−]`]: for command `assert-text: ("#toggle-all-docs", "[−]")`
[ERROR] `tests/rustdoc-gui/toggle-docs.goml` line 34: Error: The following checks still fail: [`
Show all
` isn't equal to `[+]`]: for command `wait-for-text: ("#toggle-all-docs", "[+]")`
/checkout/tests/rustdoc-gui/type-declation-overflow.goml type-declation-overflow... FAILED
/checkout/tests/rustdoc-gui/type-declation-overflow.goml type-declation-overflow... FAILED
[ERROR] `tests/rustdoc-gui/type-declation-overflow.goml` line 58: ".main-heading .out-of-band" not found: for command `compare-elements-position-false: (".main-heading h1", ".main-heading .out-of-band", ["y"])`
[ERROR] `tests/rustdoc-gui/type-declation-overflow.goml` line 60: ".main-heading .out-of-band" not found: for command `compare-elements-position: (".main-heading h1", ".main-heading .out-of-band", ["y"])`
[ERROR] `tests/rustdoc-gui/type-declation-overflow.goml` line 62: ".main-heading .out-of-band" not found: for command `compare-elements-position-near-false: (".main-heading h1", ".main-heading .out-of-band", {"x": 550})`
[ERROR] `tests/rustdoc-gui/type-declation-overflow.goml` line 67: ".main-heading .out-of-band" not found: for command `compare-elements-position-false: (".main-heading h1", ".main-heading .out-of-band", ["y"])`
[ERROR] `tests/rustdoc-gui/type-declation-overflow.goml` line 69: ".main-heading .out-of-band" not found: for command `compare-elements-position-false: (".main-heading h1", ".main-heading .out-of-band", ["y"])`
Build completed unsuccessfully in 0:10:12
local time: Mon Aug 26 03:42:47 UTC 2024
network time: Mon, 26 Aug 2024 03:42:47 GMT
##[error]Process completed with exit code 1.
Just to say: I LOVE IT! It looks so good. Well done!
Some changes occurred in HTML/CSS/JS.
cc @GuillaumeGomez, @jsha
Some changes occurred in src/tools/compiletest
cc @jieyouxu
This PR modifies tests/run-make/. If this PR is trying to port a Makefile
run-make test to use rmake.rs, please update the
run-make port tracking issue
so we can track our progress. You can either modify the tracking issue
directly, or you can comment on the tracking issue and link this PR.
cc @jieyouxu
Some changes occurred in GUI tests.
cc @GuillaumeGomez
The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
.......... (120/129)
........F (129/129)
/checkout/tests/rustdoc-gui/item-info.goml item-info... FAILED
[ERROR] `tests/rustdoc-gui/item-info.goml` line 23: Condition `715 != 738 && 715 == 711 && 738 == 734` was evaluated as false: for command `assert: |first_line_y| != |second_line_y| && |first_line_y| == 711 && |second_line_y| == 734`
Error: ()
Build completed unsuccessfully in 0:03:10
local time: Tue Aug 27 04:31:49 UTC 2024
network time: Tue, 27 Aug 2024 04:31:49 GMT
So about the help button: it has important information like a link to the rustdoc book or the version of rustdoc used to generate this doc. So displaying it only on the search results page is not an improvement imo.
It can’t be that important. It was already hidden on mobile.
Maybe the problem here is that this menu contains too many different kind of information:
- Shortcuts
- Search tricks
- Link to rustdoc book
- Version used to generate this doc
2 can be hidden away on mobile all the time, 3 and 4 seems like we're not providing all information we should. 1 is only useful on desktop, but then it'd be better to display it all the time.
I'm not hiding the button because it contains too much information after you open it. I'm hiding the button because the button itself takes up space.
Here is what it looks on an iPad emulated by Firefox in portrait, with a real, but somewhat deep, path in the standard library
I'm not hiding the button because it contains too much information after you open it. I'm hiding the button because the button itself takes up space.
Yes. And my point was that hiding the help button, even as we do currently on mobile, is a bad idea as it contains many useful information. So maybe we should try to figure out what to do with this menu or eventually, how to not need these information to be part of this menu.
As for the buttons, maybe they're just too big? Why did you pick this size?
As for the buttons, maybe they're just too big? Why did you pick this size?
Alignment.
p.s. I actually need to tweak the text part a bit to align it properly, but that needs to reach consensus about this help button, so why mess with it right now?
Is it really worth it though?
It's also not clear what "making the button smaller" would actually mean.
- Shrinking the icon won't help, because it's the text that's actually the problem.
- How much smaller could we even make the text without hurting legibility?
- I don't want to just get rid of the text, because the Summary icon is just something I made up. Without the label, it's mystery meat.
I thought about reducing both icon's and text's size and also reduce margins/paddings. But beyond that, I don't have any idea.
@GuillaumeGomez Could you put together a mock-up of what you mean?
Sure. I'm in holiday currently so it might take some time. ^^'
:umbrella: The latest upstream changes (presumably #129809) made this pull request unmergeable. Please resolve the merge conflicts.
I was thinking that we could reduce the width of the icons as the width of the viewport goes down. For example on iPad it would be:
To do this, I made the following changes:
- reduce the icons width and height to 16px
- reduce font size to 0.9em
- Changed width of
#settings-menu > a, #help-button > a, button#toggle-all-docstofit-contentand addedpadding: 2px.
I think the result is ok with this? And in any case, we remove the text under a given width so I think it's fine to also reduce size of icons as long as they're visible.
PS: I said it already but I really love this new display!
I don't really like fit-content, since it causes layout shift when you toggle the summary. Watch the settings button.
https://github.com/user-attachments/assets/41a761c3-b925-412d-8e34-d830fe5a8846
I'm also iffy about 14px text, but that might be acceptable here. Does any other part of rustdoc use text this small?
For this button, we can force its width to prevent that. As for the text, unlike other buttons in rustdoc, these ones both have text and an image, so I think it's fine if the text is a bit smaller.
I still don't like using text that's smaller than the natural size, and, even with two buttons it looks pretty bad. How does this preview screenshot look, for a way to prevent the excessive line wrapping?
I love it. :+1:
Should we hide the "show all" button on the search results?