-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
Make distinct code
and console
admonitions so readers are less likely to miss them
#20585
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
Make distinct code
and console
admonitions so readers are less likely to miss them
#20585
Conversation
…kely to miss them Signed-off-by: Harry Mellor <[email protected]>
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels. Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can either: Add 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @hmellor, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request significantly enhances the readability and clarity of the project's documentation by introducing new, visually distinct admonition types for code examples and console commands. The changes standardize the presentation of these critical information blocks, making it easier for users to quickly identify and understand them.
Highlights
- New Admonition Types: Introduced two new admonition types,
code
andconsole
, to visually differentiate code snippets and console commands within the documentation. This aims to make these important sections more noticeable to readers. - Enhanced Visual Styling: Defined distinct SVG icons and a consistent green color scheme (
#64dd17
) for the newcode
andconsole
admonitions indocs/mkdocs/stylesheets/extra.css
. This provides a clear visual cue, making them stand out from genericnote
admonitions. - Documentation Standardization: Applied the new
code
andconsole
admonition types across a wide range of documentation files. This involved replacing various less specific admonition labels (e.g.,Code
,Command
,Examples
,Logs
,Output
,Response
,Request
,Config
,Yaml
,Json
,CLI example
,Dependency versions
,note
) to ensure consistent and improved presentation throughout the documentation.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces new code
and console
admonition types to improve the visual distinction of code blocks and console interactions in the documentation. The changes are applied consistently across a large number of markdown files. The implementation in CSS is also correct. I've provided feedback to improve consistency and code quality.
@@ -95,7 +95,7 @@ Notes: | |||
- The below example assumes GPU backend used. If you are using CPU backend, remove `--gpus device=ID`, add `VLLM_CPU_KVCACHE_SPACE` and `VLLM_CPU_OMP_THREADS_BIND` environment variables to the docker run command. | |||
- Adjust the model name that you want to use in your vLLM servers if you don't want to use `Llama-2-7b-chat-hf`. | |||
|
|||
??? Commands | |||
??? console "Commands" | |||
|
|||
```console |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.md-typeset .admonition.code, | ||
.md-typeset details.code { | ||
border-color: #64dd17 | ||
} | ||
.md-typeset .admonition.console, | ||
.md-typeset details.console { | ||
border-color: #64dd17 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CSS rules for .admonition.code
, details.code
, .admonition.console
, and details.console
are identical. To improve maintainability and reduce code duplication, these selectors can be combined into a single rule.
.md-typeset .admonition.code,
.md-typeset details.code,
.md-typeset .admonition.console,
.md-typeset details.console {
border-color: #64dd17;
}
.md-typeset .code > .admonition-title, | ||
.md-typeset .code > summary { | ||
background-color: #64dd171a; | ||
} | ||
.md-typeset .console > .admonition-title, | ||
.md-typeset .console > summary { | ||
background-color: #64dd171a; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CSS rules for the title and summary of code
and console
admonitions are identical. To improve maintainability and reduce code duplication, these selectors can be combined into a single rule.
.md-typeset .code > .admonition-title,
.md-typeset .code > summary,
.md-typeset .console > .admonition-title,
.md-typeset .console > summary {
background-color: #64dd171a;
}
@@ -172,7 +172,7 @@ Alternatively, follow these example steps to implement your own plugin: | |||
|
|||
1. Implement the LoRAResolver interface. | |||
|
|||
??? Example of a simple S3 LoRAResolver implementation | |||
??? code "Example of a simple S3 LoRAResolver implementation" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -642,7 +642,7 @@ Specified using `--task generate`. | |||
|
|||
For the best results, we recommend using the following dependency versions (tested on A10 and L40): | |||
|
|||
??? Dependency versions | |||
??? code "Dependency versions" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks much better, thanks! |
…kely to miss them (vllm-project#20585) Signed-off-by: Harry Mellor <[email protected]>
…kely to miss them (vllm-project#20585) Signed-off-by: Harry Mellor <[email protected]>
…kely to miss them (vllm-project#20585) Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: Patrick von Platen <[email protected]>
…kely to miss them (vllm-project#20585) Signed-off-by: Harry Mellor <[email protected]>
…kely to miss them (vllm-project#20585) Signed-off-by: Harry Mellor <[email protected]> Signed-off-by: avigny <[email protected]>
…kely to miss them (vllm-project#20585) Signed-off-by: Harry Mellor <[email protected]>
…kely to miss them (vllm-project#20585) Signed-off-by: Harry Mellor <[email protected]>
Adds two new admonition types:
code
console
They have the colours of the question admonition (which we do not use) and each have their own icon.
This was done so that they are visually disinct from the default
note
admonition so users are more likely to notice them. It was noted in #19926 (comment) that the admonitions as they were could easily be missed.cc @davidxia