Skip to content

Only load one CSS theme by default - #106915

Merged
bors merged 5 commits into
rust-lang:masterfrom
notriddle:notriddle/load-only-one-theme
Mar 10, 2023
Merged

Only load one CSS theme by default#106915
bors merged 5 commits into
rust-lang:masterfrom
notriddle:notriddle/load-only-one-theme

Conversation

@notriddle

Copy link
Copy Markdown
Contributor

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

@rustbot

Copy link
Copy Markdown
Collaborator

r? @jsha

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

@rustbotrustbot 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 Jan 15, 2023
@rustbot

Copy link
Copy Markdown
Collaborator

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez, @Folyd, @jsha

@rust-log-analyzer

This comment has been minimized.

@GuillaumeGomez

Copy link
Copy Markdown
Member

Looks good to me but I'll let @jsha have the final word on this.

@rustbotrustbot added A-testsuite Area: The testsuite used to check the correctness of rustc T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jan 16, 2023
@bors

bors commented Jan 30, 2023

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #107472) made this pull request unmergeable. Please resolve the merge conflicts.

@notriddle
notriddleforce-pushed the notriddle/load-only-one-theme branch from 2ddc164 to 3f46624CompareFebruary 17, 2023 21:56
Comment threadsrc/librustdoc/html/static/js/storage.js Outdated
@GuillaumeGomez

Copy link
Copy Markdown
Member

Looks good to me, thanks!

@bors

bors commented Mar 7, 2023

Copy link
Copy Markdown
Collaborator

☔ The latest upstream changes (presumably #108863) made this pull request unmergeable. Please resolve the merge conflicts.

@jsha

jsha commented Mar 8, 2023

Copy link
Copy Markdown
Contributor

Looks great to me. r=me with the merge conflicts resolved.

notriddleand others added 5 commits March 8, 2023 12:49
To avoid generating a FOUC at startup, this commit uses `document.write` to
load the stylesheet initially.
Co-Authored-By: Guillaume Gomez <guillaume1.gomez@gmail.com>
Use NEAR check to allow one pixel difference between scroll positions.
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
@notriddle
notriddleforce-pushed the notriddle/load-only-one-theme branch from c9bb98c to 255fdb3CompareMarch 8, 2023 19:49
@notriddle

Copy link
Copy Markdown
ContributorAuthor

@bors r=GuillaumeGomez,jsha rollup

@bors

bors commented Mar 8, 2023

Copy link
Copy Markdown
Collaborator

📌 Commit 255fdb3 has been approved by GuillaumeGomez,jsha

It is now in the queue for this repository.

@borsbors 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 Mar 8, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 10, 2023
…iaskrgr
Rollup of 8 pull requests
Successful merges:
- rust-lang#106915 (Only load one CSS theme by default)
- rust-lang#108294 (Place binder correctly for arbitrary trait bound suggestion)
- rust-lang#108778 (x fmt: Don't print all modified files if there's more than 10)
- rust-lang#108854 (feat/refactor: improve errors in case of ident with number at start)
- rust-lang#108870 (Fix invalid inlining of reexport of reexport of private item)
- rust-lang#108917 (Consider target_family as pal)
- rust-lang#108922 (Add auto notification for changes to stable mir)
- rust-lang#108929 (Fix typo in span_map.rs)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
@bors
bors merged commit 83791f9 into rust-lang:masterMar 10, 2023
@rustbotrustbot added this to the 1.70.0 milestone Mar 10, 2023
@notriddle
notriddle deleted the notriddle/load-only-one-theme branch March 10, 2023 13:31
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-testsuiteArea: The testsuite used to check the correctness of rustcS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.T-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.T-rustdocRelevant 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.

rustdoc: CSS for all three themes is fetched

6 participants

@notriddle@rustbot@rust-log-analyzer@GuillaumeGomez@bors@jsha