Commit graph

12 commits

Author SHA1 Message Date
Guillaume Gomez
21ebd03e5e Try to reduce rustdoc GUI tests flakyness 2026-01-26 16:18:36 +01:00
Stuart Cook
88df8fd3ef
Rollup merge of #151091 - hide-deprecated-items, r=lolbinarycat
Add new "hide deprecated items" setting in rustdoc

This PR adds a new JS setting which allows the JS to hide deprecated items. This is especially useful for crates like `std` which accumulates deprecated items but never removes them.

Nicely enough, the "deprecation" information was already in the search index, meaning I didn't need to change anything there. Before this PR, it was only used to make the deprecated items rank lower. Well now it's also used to generate an extra CSS class, allowing the JS setting to work.

This is taking over https://github.com/rust-lang/rust/pull/149551.

This feature got approved by the rustdoc team in the [meeting of december](https://rust-lang.zulipchat.com/#narrow/channel/393423-t-rustdoc.2Fmeetings/topic/2025-12-08/near/562553156).

You can give it a try [here](https://rustdoc.crud.net/imperio/hide-deprecated-items/foo/index.html).

r? @lolbinarycat
2026-01-20 18:00:09 +11:00
Guillaume Gomez
aef8112b26 Add test for search results of not yet deprecated search items
Improve the `perform-search` goml function to work when search is already open
2026-01-19 23:14:09 +01:00
Guillaume Gomez
9f965bcf76 Add rustdoc GUI test to ensure that the "hide deprecated items" setting is working as expected 2026-01-19 21:37:15 +01:00
Guillaume Gomez
4bacdf7b8b Reduce rustdoc GUI flakyness, take 2 2026-01-14 22:47:53 +01:00
Guillaume Gomez
945e7c78d2 Use functions more in rustdoc GUI tests 2026-01-08 21:49:29 +01:00
Guillaume Gomez
99836fc6d4 Add GUI regression test for disabled line numbers 2025-12-26 20:13:27 +01:00
Guillaume Gomez
3d92872170 Clean up utils.goml file 2025-12-26 17:20:55 +01:00
Michael Howell
53b775d9c6 rustdoc-search: GUI tests check for // in URL
When this fails, you get output that looks like:

    /home/user/rust/tests/rustdoc-gui/search-result-impl-disambiguation.goml search-result-impl-disambiguation... FAILED
    [ERROR] `tests/rustdoc-gui/utils.goml` around line 49
        from `tests/rustdoc-gui/search-result-impl-disambiguation.goml` line 25: JS errors occurred: Event: Event

Making the error message more informative requires patching browser-ui-test.
2025-08-21 09:24:54 -07:00
Michael Howell
8511e40e72 rustdoc-search: search backend with partitioned suffix tree 2025-08-15 10:26:03 -07:00
Guillaume Gomez
66bc97cc88 Make theme switching closer to reality 2024-04-08 12:14:41 +02:00
Guillaume Gomez
7659ef47f0 Use include command to reduce code duplication 2024-04-05 21:38:55 +02:00