Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UI issues with Rustdoc scrape-examples feature. #104967

Merged
merged 3 commits into from
Dec 6, 2022

Conversation

willcrichton
Copy link
Contributor

A few regressions have been introduced into scrape-examples in the last few months. This commit fixes those regressions:

  • Help file was being loaded from the wrong place (introduced in f9e1f6f).
  • CSS selector in JS has a typo (introduced in 1489718).
  • Line numbers in scraped example code snippets are overflowing (not sure if this was ever fixed). Changing from flexbox to grid display fixed this issue.

@rustbot
Copy link
Collaborator

rustbot commented Nov 27, 2022

r? @jsha

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Nov 27, 2022
@rustbot
Copy link
Collaborator

rustbot commented Nov 27, 2022

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

@willcrichton
Copy link
Contributor Author

Also a heads up: now that there is momentum on the Cargo side (rust-lang/cargo#10343 was merged!), I am currently pushing to get this feature ready for deployment on docs.rs. I will have a separate PR soon on this repo with some UI improvements, but this PR will just focus on fixing bugs.

* 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.
@notriddle
Copy link
Contributor

Can a regression test case be added alongside https://github.com/rust-lang/rust/blob/master/src/test/rustdoc-gui/scrape-examples-button-focus.goml for the “.next” button?

@willcrichton
Copy link
Contributor Author

I just added a test for the .next/.prev buttons.

@willcrichton
Copy link
Contributor Author

This PR is ready for review whenever y'all get a chance! @jsha or @notriddle

@willcrichton
Copy link
Contributor Author

@bors r=notriddle

@bors
Copy link
Contributor

bors commented Dec 5, 2022

@willcrichton: 🔑 Insufficient privileges: Not in reviewers

@notriddle
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Dec 5, 2022

📌 Commit f7a7059 has been approved by notriddle

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 5, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 6, 2022
Rollup of 10 pull requests

Successful merges:

 - rust-lang#104967 (Fix UI issues with Rustdoc scrape-examples feature.)
 - rust-lang#105207 (interpret: clobber return place when calling function)
 - rust-lang#105246 (Fix --pass in compiletest)
 - rust-lang#105256 (Add small comment explaining what `method-margins.goml` test is about)
 - rust-lang#105289 (Fix dupe word typos)
 - rust-lang#105309 (rustdoc: remove no-op mobile CSS `.sidebar { margin: 0; padding: 0 }`)
 - rust-lang#105313 (Update books)
 - rust-lang#105315 (Normalize inherent associated types after substitution)
 - rust-lang#105324 (Point at GAT `where` clause when an obligation is unsatisfied)
 - rust-lang#105338 (Tweak "the following other types implement trait")

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 532fe7b into rust-lang:master Dec 6, 2022
@rustbot rustbot added this to the 1.67.0 milestone Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants