about summary refs log tree commit diff
path: root/src/librustdoc/html/static/js/scrape-examples.js
AgeCommit message (Collapse)AuthorLines
2025-02-12rustdoc: use better, consistent SVG icons for scraped examplesMichael Howell-4/+8
This continues two ongoing projects: - Replacing ascii art with real icons that don't look like syntax, are understandable to people who're familiar with desktop computers and smart devices, and aren't ugly. - Using labels and tooltips to clarify these icons, when the limits of popular iconography hit us. In this case, I've added tooltips, because, unfortunately, there's not room for always-visible labels.
2025-02-10Move line numbers into the `<code>` directlyGuillaume Gomez-5/+5
2025-01-27rustdoc: add nobuild typescript checking to our JSMichael Howell-0/+3
By nobuild, I mean that the type annotations are all in comments, not in the "native" typescript syntax. This is a bit uglier, but it lets you rapid-prototype without tsc, works with all the native browser debugging tools, and keeps Node out of Rust's bootstrap chain. This pull request mostly just adds ts-ignore annotations and type declarations. To actually take good advantage of typescript, we'll want to "burn down" this pile of unsafe code until we eventually have a version with almost none of these. This PR also adds tsc to the mingw-check Dockerfile, so that it can't fall out of date like the Closure annotations did. https://rust-lang.zulipchat.com/#narrow/channel/266220-t-rustdoc/topic/typescript
2024-09-07Generate scraped examples buttons in JSGuillaume Gomez-17/+34
2024-09-02Simplify CSS but wrapping scraped example into a div and move the title out ↵Guillaume Gomez-2/+2
of the code block
2024-08-31Unify scraped examples with other code examplesGuillaume Gomez-2/+1
2022-12-07Improve calculation of scraped example minimized heightWill Crichton-2/+6
2022-12-07Fix es-checkWill Crichton-1/+1
2022-12-07Include additional documentation for scrape-examples changesWill Crichton-1/+3
2022-12-07Improve several aspects of the Rustdoc scrape-examples UI.Will Crichton-9/+11
* Examples take up less screen height. * Snippets from binary crates are prioritized. * toggle-all-docs does not expand "More examples" sections.
2022-11-26Fix UI issues with Rustdoc scrape-examples feature.Will Crichton-1/+1
* Help file was being loaded from the wrong place. * CSS selector in JS has a typo. * Line numbers are overflowing, change to display: grid to fix.
2022-09-26rustdoc: give `.line-number` / `.line-numbers` meaningful namesMichael Howell-1/+1
2022-05-25Add new eslint rule "space-before-function-paren"Guillaume Gomez-1/+1
2022-05-15Add new eslint rule about brace styleGuillaume Gomez-1/+3
2022-05-07Enforce quote rule for JS source codeGuillaume Gomez-17/+17
2022-05-07Change eslint rules from configuration comments to configuration filesFolyd-4/+0
2022-05-05Use "strict" mode in JS scriptsGuillaume Gomez-0/+2
2022-05-04Move callback to the () => {} syntax.Folyd-10/+11
Fix lint Fix main.js Restore anonymous functions Fix Fix more
2022-04-26Migrate scrape-examples.js to ES6Guillaume Gomez-21/+24
2022-03-27Improve alignment of additional scraped examples, add scrape examples help pageWill Crichton-2/+4
2022-03-27Improve Rustdoc UI for scraped examples with multiline arguments, fixWill Crichton-6/+20
overflow in line numbers
2021-10-08Move more scrape-examples logic from JS to rustWill Crichton-33/+13
Fix failing test Add missing backslash Fix padding issue with horizontal scrollbar
2021-10-07Move some expansion logic into generation-time, fix section header links, ↵Will Crichton-9/+3
remove ID from line numbers, fix horizontal scrolling on non-expanded elements
2021-10-06Fix lint error, change scrape-examples.js minify callWill Crichton-0/+2
2021-10-06Move JS into a standalone fileWill Crichton-0/+110