1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2026-06-19 20:08:40 +02:00
Commit Graph

9 Commits

Author SHA1 Message Date
Martin Geisler 1063356a1d Re-enable the red box to show available space (#2932)
Way back in #187, I introduced a hacky tool to show the available space
on a slide: it was a `mdbook` plugin which injected the necessary CSS on
each slide. Crude, but it got the job done.

The logic was moved from Python to a real CSS file with associated
JavaScript in #1842. In #1917, the functionality was moved to a
dedicated “instructor menu”, together with functionality for saving the
state of the Playground on each slide.

Unfortunately, the whole thing was disabled in #1935 since I found that
the Playgrounds lost their code with the saving logic. I was also not
100% happy with dedicating space on each slide for a menu only used by
instructors.

However, I really think we need a tool to let slide editors know about
the available space, so I would like to re-introduce the red box. This
time via a keyboard shortcut to make it easy to toggle as needed.

I’m suggesting enabling this for everyone, with the expectation that
most people won’t find the shortcut and will quickly disable the box if
they do (there is a dedicated button to hide it again).

End-to-end tests have been added for the new functionality.
2025-10-19 15:10:01 +00:00
Dmitri Gribenko 00e3e194ae feat(docs): Update and apply kbd tag style guide (#2930)
- Based on feed back from @mgeisler, update the kbd tag guidance in
GEMINI.md to require wrapping each key in its own tag (e.g.,
`<kbd>Ctrl</kbd> + <kbd>S</kbd>`).
- Apply this new convention to existing content in the `src` directory
to ensure consistency.
2025-09-27 11:13:03 +02:00
Dmitri Gribenko 31a8af33a1 docs(gemini): Add kbd tag formatting rule (#2925)
Adds a specific style convention to GEMINI.md for formatting keyboard
key combinations using the `<kbd>` tag.

The required format is `<kbd>Ctrl + S</kbd>`, which is consistent with
existing usage in the course. This rule will be enforced by the AI
assistant to ensure uniformity.
2025-09-24 10:08:19 +02:00
Dmitri Gribenko a77ea82cde feat(docs): Centralize code block style guide (#2922)
- Moves the canonical documentation for code block annotations and
language identifiers into STYLE.md.
- Removes the redundant, partial documentation from GEMINI.md.
- Updates GEMINI.md to instruct the AI assistant to always refer to
STYLE.md for guidance.

This change makes STYLE.md the single source of truth for all markdown
and code style conventions, ensuring consistency for both human and AI
contributors.
2025-09-23 20:17:00 +02:00
Dmitri Gribenko 4ffd664f47 docs(gemini): Explain mdbook's isolated snippet compilation (#2918)
Add a new "Technical Context: mdbook" section to GEMINI.md.

This section clarifies two key behaviors of mdbook that are essential
for accurate code analysis and review:

- Rust code snippets are compiled in isolation.

- Annotations like 'compile_fail' describe the expected test outcome.

This information is added to prevent incorrect assumptions about shared
scope between code blocks, ensuring more accurate analysis in the
future.
2025-09-22 10:34:48 +02:00
Martin Geisler 11f2831933 Optimize apt update calls (#2916)
This introduces a new local GitHub action for installing Debian
packages. I noticed that it often takes several minutes to install a few
small packages, and a large part of that time is spent updating the man
page database:

    2025-09-20T11:39:25.3001853Z Setting up yapf3 (0.33.0-1) ...
2025-09-20T11:39:25.3045329Z Processing triggers for libc-bin
(2.39-0ubuntu8.5) ...
2025-09-20T11:39:25.4420933Z Processing triggers for man-db
(2.12.0-4build2) ...
2025-09-20T11:41:42.8522570Z Processing triggers for install-info
(7.1-3build2) ...

Excluding the documentation files should make the man-db run much
faster. Compare these two runs:

*
[Before](https://github.com/google/comprehensive-rust/actions/runs/17879390708/job/50845084995):
2m 41s.
*
[After](https://github.com/google/comprehensive-rust/actions/runs/17880418155/job/50847334471):
11s.
2025-09-22 09:33:42 +02:00
Martin Geisler 80a2f2ff71 Add more prominent references to cargo xtask (#2904)
I found that Gemini didn’t know how to install the necessary tools
make `dprint fmt` work, so I’m adding more references to `cargo xtask`
in our documentation.
2025-09-20 11:15:28 +00:00
Martin Geisler d6be949511 Give Gemini details on our Markdown conventions (#2905)
This should help it produce more consistent slides. For example, it will
now know not to add sub-headings to slides.

The initial version of this was generated by Gemini itself, and I then
tweaked it by adding some more constraints.
2025-09-18 23:26:12 +02:00
Martin Geisler ad9440d20c Add a GEMINI.md file with instructions for the CLI (#2895)
I’ve been playing with the `gemini` CLI tool
recently (https://google-gemini.github.io/gemini-cli/) and learned that
it will read instructions from it’s own kind of README.

So I asked it to generate one and use it as a basis for this file. I
took the liberty to expand the style guide a little at the same time to
incorporate that instructions I gave Gemini while generating the [many
language fixing PRs][1].

[1]:
https://github.com/google/comprehensive-rust/pulls?q=author%3Amgeisler+%22improve+language%22

---------

Co-authored-by: Dmitri Gribenko <gribozavr@gmail.com>
2025-09-06 18:57:53 +00:00