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

Prevent font flashing in the docs #23622

Merged
merged 3 commits into from
May 27, 2024

Conversation

nilslindemann
Copy link
Contributor

... by moving the Google font includes near the top of the head. By including them as early as possible, they are known, when the browser starts rendering the body.

Test it by making the change manually in doc/html/system.html and then press ctrl+f5 (reload without cache). This removes the font flashing.

Tested in Chrome and Firefox.

... by moving the Google font includes near the top of the head. By including them as early as possible, they are known, when the browser starts rendering the body.

Test it by making the change manually in `doc/html/system.html` and then press ctrl+f5 (reload without cache). This removes the font flashing.

Tested in Chrome and Firefox.
@Araq
Copy link
Member

Araq commented May 20, 2024

You need to update the tests too via nim c -r -d:nimTestsNimdocFixup nimdoc/tester.nim

... by running `nim c -r -d:nimTestsNimdocFixup nimdoc/tester.nim`
@nilslindemann
Copy link
Contributor Author

Thanks for the tip. I do not understand the seven failing checks, let me know if that's a problem.

@ire4ever1190
Copy link
Contributor

Seems its the RST tests failing. Same steps except with rsttester.nim

nim c -r -d:nimTestsNimdocFixup nimdoc/rsttester.nim

@nilslindemann
Copy link
Contributor Author

nilslindemann commented May 23, 2024

Execution of an external program failed

For the records, I get this error too locally, when I run nim c -r -d:nimTestsNimdocFixup nimdoc/tester.nim the first time:


C:\Nim\is_Repo\Nim>nim c -r -d:nimTestsNimdocFixup nimdoc/tester.nim

... (lots of lines) ...

11 failures occurred; see note in nimdoc/tester.nim regarding -d:nimTestsNimdocFixup
Error: execution of an external program failed: 'C:\Nim\is_Repo\Nim\nimdoc\tester.exe'

C:\Nim\is_Repo\Nim>

When I then run the same command again, it succeeds.

Let me know if you need precise steps to reproduce.

@ire4ever1190
Copy link
Contributor

Don't worry thats fine. It updates the local files after running the tests.
Just commit the changes and it should be fine this time

@nilslindemann
Copy link
Contributor Author

nilslindemann commented May 25, 2024

Don't worry thats fine. It updates the local files after running the tests. Just commit the changes and it should be fine this time

@ire4ever1190, but that's what I did. It is the second commit, the current state of this PR. After running the command nim c -r -d:nimTestsNimdocFixup nimdoc/tester.nim a second time. When I run this command again, GitHub Desktop shows no changes.

@ire4ever1190
Copy link
Contributor

Ah, think you are running the same file twice rsttester.nim needs to be ran with -d:nimTestsNimdocFixup just like you did with tester.nim

... by running `nim c -r -d:nimTestsNimdocFixup nimdoc/rsttester.nim` twice.
@nilslindemann
Copy link
Contributor Author

Seems its the RST tests failing. Same steps except with rsttester.nim

nim c -r -d:nimTestsNimdocFixup nimdoc/rsttester.nim

Ah, now I got you, you meant "NILS, DO the same steps ...". I have read it as "I DID the same steps ...". OK, my bad. So, I ran this command twice, and there was indeed another change. I just pushed it. Let's see if it works. Looks good.

@Araq
Copy link
Member

Araq commented May 27, 2024

Irrelevant CI failure, merging.

@Araq Araq merged commit ce85b81 into nim-lang:devel May 27, 2024
17 of 19 checks passed
Copy link
Contributor

Thanks for your hard work on this PR!
The lines below are statistics of the Nim compiler built from ce85b81

Hint: mm: orc; opt: speed; options: -d:release
178575 lines; 8.337s; 753.043MiB peakmem

@nilslindemann nilslindemann deleted the prevent-font-flashing-in-docs branch May 27, 2024 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants