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

Improve settings loading strategy #96741

Merged

Conversation

GuillaumeGomez
Copy link
Member

I learned about this thanks to @jsha who suggested this approach:

It improves the settings loading strategy by loading CSS and JS at the same time to prevent the style to be applied afterwards on slow connections.

r? @jsha

…ime to prevent the style to be applied afterwards on slow connections
@GuillaumeGomez GuillaumeGomez added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-rustdoc-ui Area: Rustdoc UI (generated HTML) A-rustdoc-js Area: Rustdoc's JS front-end labels May 5, 2022
@rust-highfive
Copy link
Collaborator

Some changes occurred in HTML/CSS/JS.

cc @GuillaumeGomez,@Folyd,@jsha

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 5, 2022
@jsha
Copy link
Contributor

jsha commented May 5, 2022

@bors r+ rollup

To be clear, this doesn't prevent the settings page from being rendered before its CSS is loaded, but it gives the CSS a fighting chance of getting there on time.

@bors
Copy link
Contributor

bors commented May 5, 2022

📌 Commit 87b6326 has been approved by jsha

@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 May 5, 2022
compiler-errors added a commit to compiler-errors/rust that referenced this pull request May 5, 2022
…ding-strategy, r=jsha

Improve settings loading strategy

I learned about this thanks to `@jsha` who suggested this approach:

It improves the settings loading strategy by loading CSS and JS at the same time to prevent the style to be applied afterwards on slow connections.

r? `@jsha`
compiler-errors added a commit to compiler-errors/rust that referenced this pull request May 6, 2022
…ding-strategy, r=jsha

Improve settings loading strategy

I learned about this thanks to ``@jsha`` who suggested this approach:

It improves the settings loading strategy by loading CSS and JS at the same time to prevent the style to be applied afterwards on slow connections.

r? ``@jsha``
bors added a commit to rust-lang-ci/rust that referenced this pull request May 6, 2022
…piler-errors

Rollup of 7 pull requests

Successful merges:

 - rust-lang#96174 (mark ptr-int-transmute test as no_run)
 - rust-lang#96639 (Fix typo in `offset_from` documentation)
 - rust-lang#96704 (Add rotation animation on settings button when loading)
 - rust-lang#96730 (Add a regression test for rust-lang#64173 and rust-lang#66152)
 - rust-lang#96741 (Improve settings loading strategy)
 - rust-lang#96744 (Implement [OsStr]::join)
 - rust-lang#96747 (Add `track_caller` to `DefId::expect_local()`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7cdad77 into rust-lang:master May 6, 2022
@rustbot rustbot added this to the 1.62.0 milestone May 6, 2022
@GuillaumeGomez GuillaumeGomez deleted the improve-settings-loading-strategy branch May 6, 2022 09:06
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 12, 2022
…iddle

Fix settings page CSS

In rust-lang#96741, I moved the CSS loading outside of `settings.js`. The result was that on the settings page, there isn't the settings CSS anymore:

![Screenshot from 2022-05-11 11-09-24](https://user-images.githubusercontent.com/3050060/167817969-6750931b-3e6e-4178-b5a9-ee3851e983be.png)

I also used this opportunity to remove unused CSS rules (we don't have `<select>` elements anymore in the settings).

cc `@jsha`
r? `@notriddle`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-js Area: Rustdoc's JS front-end A-rustdoc-ui Area: Rustdoc UI (generated HTML) 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