Commit graph

30 commits

Author SHA1 Message Date
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00
Guillaume Gomez
009064f890 Use new block syntax for define-function in goml scripts 2023-01-06 17:52:42 +01:00
Michael Howell
49111eced6 rustdoc: fix buggy JS check for absolute URL
The old code did the wrong thing when faced with a crate named "http".
2023-01-03 20:10:14 -07:00
Michael Howell
399fe5d0cd rustdoc: add test case for dir entry summary position 2023-01-01 19:52:30 -07:00
Michael Howell
f451717157 rustdoc: make line number CSS for doc comment and scraped the same
Discussed in
https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/Line.20number.20styling
2022-12-23 22:55:04 -07:00
Michael Howell
a84483eb59 rustdoc: name the source page sidebar-toggle #src-sidebar-toggle
The old name doesn't get across where it's really supposed to be used.
2022-12-15 16:29:52 -07:00
Yuki Okushi
96753eb0e0
Rollup merge of #103650 - notriddle:notriddle/line-anchors, r=GuillaumeGomez
rustdoc: change `.src-line-numbers > span` to `.src-line-numbers > a`

Example: https://notriddle.com/notriddle-rustdoc-demos/line-anchors/test_dingus/fn.test.html

This allows people to treat them like real links, such as right-click to copy URL, and makes the line numbers in a scraped example work at all, when before this commit was added, they had the clickable pointer cursor but did not actually do anything when clicked.
2022-11-13 16:41:44 +09:00
Michael Howell
21894801c6 rustdoc: add test case for huge logo 2022-11-05 14:26:13 -07:00
Michael Howell
ba4ae13528 rustdoc: remove left border from .src-line-numbers > a 2022-10-31 13:59:52 -07:00
Michael Howell
07bb2f701e rustdoc: change .src-line-numbers > span to .src-line-numbers > a
This allows people to treat them like real links, such as right-click to
copy URL, and makes the line numbers in a scraped example work at all,
when before this commit was added, they had the clickable pointer cursor
but did not actually do anything when clicked.
2022-10-31 13:59:52 -07:00
Guillaume Gomez
71e824de26 Add tests for source line numbers colors 2022-10-27 13:07:32 +02:00
Michael Howell
f6dd4708cf rustdoc: improve appearance of source page navigation bar
This commit changes things so that the search bar is exactly centered between
the top of the page and the top of the source code content area.
2022-10-20 13:31:06 -07:00
Guillaume Gomez
8d19d53c60 Update rustdoc-gui test to new browser-ui-test version 2022-10-07 20:17:22 +02:00
Michael Howell
0b97831af7 rustdoc: give .line-number / .line-numbers meaningful names 2022-09-26 11:48:03 -07:00
Michael Howell
e710ac12fa rustdoc: add test case for source sidebar spacing 2022-07-02 09:42:49 -07:00
Michael Howell
2852443f48 rustdoc: use <details> tag for the source code sidebar
This fixes the extremely poor accessibility of the old system, making it
possible to navigate the sidebar by keyboard, and also implicitly gives the
sidebar items the correct ARIA roles.
2022-07-01 12:01:36 -07:00
Jacob Hoffman-Andrews
b37a05bd01 rustdoc: optimize loading of source sidebar
The source sidebar has a setting to remember whether it should be open or
closed. Previously, this setting was handled in source-script.js, which
is loaded with `defer`, meaning it is often run after the document is rendered.
Since CSS renders the source sidebar as closed by default, changing this
after the initial render results in a relayout.

Instead, handle the setting in storage.js, which is the first script to load
and is the only script that blocks render. This avoids a relayout and means
navigating between files with the sidebar open is faster.
2022-06-20 15:08:02 -07:00
Guillaume Gomez
a70c14aecc Add GUI test for sidebar items expand/collapse 2022-06-14 20:09:09 +02:00
Guillaume Gomez
d286df1402 Add line number click GUI test 2022-05-30 17:15:41 +02:00
Guillaume Gomez
16d5cdc570 Improve source-code-page.goml GUI test code 2022-05-30 17:07:21 +02:00
Guillaume Gomez
f23d6d3a47 Add GUI test to ensure that line numbers text is aligned to the right 2022-03-07 12:08:14 +01:00
Guillaume Gomez
78cee22fb4 Add missing GUI test explanations 2022-01-21 20:41:47 +01:00
Guillaume Gomez
1e55c31cbb Fix remaining bugs 2021-12-02 14:17:20 +01:00
cynecx
e2467f2c45 rustdoc: fix source-code-page test 2021-11-29 11:07:20 +01:00
Jakub Beránek
ccd550ee56
[rustdoc] Wrap code blocks in <code> tag 2021-08-19 10:30:08 +02:00
Guillaume Gomez
5c9e10eec3 Add check to ensure that the line numbers are aligned with the source code 2021-06-22 11:17:53 +02:00
Guillaume Gomez
3af9c9157e Update browser-ui-test version 2021-06-22 11:11:45 +02:00
Guillaume Gomez
1e222ba58a Update browser-ui-test version 2021-06-19 14:19:39 +02:00
Guillaume Gomez
d5a24b0a33 Move rustdoc-gui rust libraries into their own folder and prepare the field for more libraries 2021-05-11 20:56:16 +02:00
Guillaume Gomez
4e3fb6858a Add test for source code clickable line number 2021-05-10 14:12:00 +02:00