| Age | Commit message (Collapse) | Author | Lines |
|
|
|
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`
|
|
setting
|
|
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``
|
|
|
|
|
|
|
|
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
|
|
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 |
|------------|----------|
|  |  |
## After
| index.html | all.html |
|------------|----------|
|  |  |
|
|
Use NEAR check to allow one pixel difference between scroll positions.
|
|
This avoids a subtle layout shift when switching from the crate page
to all items.
|
|
|
|
|
|
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.
|
|
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>

</details>
Fixes #91100
Preview: <https://notriddle.com/notriddle-rustdoc-demos/simplify-doctest-tooltip/std/vec/struct.Vec.html#indexing>
Screenshot:

|
|
|
|
This switches from using `<div>` to the more semantic `<ul>`, and
using class names that rhyme with the classes the search results
table uses.
|
|
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.
|
|
|
|
Stopped being used in CSS with
73d0f7c7b68784f1db0a1f53855c20d118a7e8b0
|
|
Fixes https://discord.com/channels/442252698964721669/443150878111694848/1066420140167680000
Fixes #91100
|
|
r=GuillaumeGomez
rustdoc: remove mostly-unused CSS classes `import-item` and `module-item`
|
|
rustdoc: make item links consistently use `title="{shortty} {path}"`
The ordering in item tables was flipped in 3030cbea957adbd560bf2eaa34c1b8a56daee16a, making it inconsistent with the ordering in method signatures.
Compare these (before this PR is merged):
https://github.com/rust-lang/rust/blob/c8e6a9e8b6251bbc8276cb78cabe1998deecbed7/src/librustdoc/html/render/print_item.rs#L455-L459
https://github.com/rust-lang/rust/blob/c8e6a9e8b6251bbc8276cb78cabe1998deecbed7/src/librustdoc/html/format.rs#L903-L908
|
|
|
|
* Changes the class names so that they all start with `setting-`.
That should make it harder to accidentally use a setting class outside
the settings popover, where loading the CSS might accidentally change
the styles of something unrelated.
* Get rid of an unnecessary wrapper DIV around the radio button line.
* Simplify CSS selectors by making the DOM easier and more intuitive
to target.
|
|
The ordering in item tables was flipped in 3030cbea957adbd560bf2eaa34c1b8a56daee16a, making it
inconsistent with the ordering in method signatures.
Compare these:
https://github.com/rust-lang/rust/blob/c8e6a9e8b6251bbc8276cb78cabe1998deecbed7/src/librustdoc/html/render/print_item.rs#L455-L459
https://github.com/rust-lang/rust/blob/c8e6a9e8b6251bbc8276cb78cabe1998deecbed7/src/librustdoc/html/format.rs#L903-L908
|
|
|
|
|
|
r=GuillaumeGomez
rustdoc: remove redundant CSS rule `#settings .setting-line`
Since the current version of settings.js always nests things below a div with ID `settings`, this rule always overrode the one above.
|
|
|
|
This extends the special case with checkbox settings to also cover radios.
|
|
This prevents some strange blur-event-related bugs with the "?" command
by ensuring that the focus remains in the same spot when the settings
area closes.
|
|
|
|
r=GuillaumeGomez
rustdoc: remove redundant item kind class from `.item-decl > pre`
This class originated in the very first commit of `rustdoc_ng`, and was used to add a color border around the item decl based on its kind.
https://github.com/rust-lang/rust/blob/4fd061c426902b0904c65e64a3780b21f9ab3afb/src/rustdoc_ng/html/static/main.css#L102-L106
The item decl no longer has a border, and there aren't any kind-specific styles in modern rustdoc's rendering of this UI item.
Most of this PR is updating test cases so that they use `item-decl` to find the `<pre>` tag instead of relying on the fact that the class name had `rust {kind}` in it while other `<pre>` tags only had class `rust`.
|
|
Add tidy check to ensure that rustdoc GUI tests start with a small description
The first commit comes from https://github.com/rust-lang/rust/pull/106865 to prevent CI to fail.
This PR adds a tidy check to enforce having a small description at the top of the GUI test. Although the format is made to be as easy as possible to read, it's not always obvious what a test is actually checking. I think enforcing this will make it easier for us to come back on these tests if needed.
r? `@notriddle`
|
|
|
|
Add explanation comment for GUI test
r? `@notriddle`
|
|
This class originated in the very first commit of `rustdoc_ng`, and was used
to add a color border around the item decl based on its kind.
https://github.com/rust-lang/rust/blob/4fd061c426902b0904c65e64a3780b21f9ab3afb/src/rustdoc_ng/html/static/main.css#L102-L106
The item decl no longer has a border, and there aren't any
kind-specific styles in modern rustdoc's rendering of this UI item.
Most of this commit is updating test cases so that they use `item-decl` to
find the `<pre>` tag instead of relying on the fact that the class name
had `rust {kind}` in it while other `<pre>` tags only had class `rust`.
|
|
|
|
rustdoc: remove unnecessary DOM class `h1.fqn`
It's misleading. The main heading sometimes isn't an fully qualified name at all.
It's also redundant. It's always a child of `div.main-heading`, so just use that.
|
|
This swaps things around so that the class that gets used more often has
the shorter name.
|
|
It's misleading. The main heading sometimes isn't an fully qualified name at all.
It's also redundant. It's always a child of `div.main-heading`, so just use that.
|
|
|
|
|