google / comprehensive-rust

This is the Rust course used by the Android team at Google. It provides you the material to quickly teach Rust.
https://google.github.io/comprehensive-rust/
Apache License 2.0
27.98k stars 1.67k forks source link

Evaluate if the embedded code examples have a visible scrollbar #2450

Open michael-kerscher opened 3 weeks ago

michael-kerscher commented 3 weeks ago

This implements the idea I drafted in https://github.com/google/comprehensive-rust/issues/2012#issuecomment-2441514504

If the embedded code examples, shown in the ACE editor have any visible scrollbar (vertical or horizontal), the evaluator indicates this with CodeExampleVScrollbar or CodeExampleHScrollbar in the result.

Additionally ignore the default mdbook redirect pages. These render in the browser but looking at the canonical pages is enough and there is a massive speedup when evaluating the entire book.

The previous version showed the size of the main content element in the result. This is not really relevant as only violations to the policy are of interest, so the size was removed from the result.

the open pull request https://github.com/google/comprehensive-rust/pull/2013 also references this idea