-
Notifications
You must be signed in to change notification settings - Fork 708
i18n: fix invalid SVG markup that caused doc build failure #22011
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
i18n: fix invalid SVG markup that caused doc build failure #22011
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Summary of ChangesHello @Oreoxmt, 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 addresses a critical issue where an invalid SVG tag was causing the documentation build process to fail. By replacing the malformed SVG markup with a correctly structured and complete SVG element, the PR ensures the documentation can be built successfully and displayed as intended, particularly for internationalized content. Highlights
Using Gemini Code AssistThe 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 by creating a comment using either
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 Limitations & Feedback Gemini Code Assist 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. 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
|
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 successfully fixes an invalid SVG tag that was causing a build failure in the documentation. However, the fix introduces a large, inlined SVG element directly into the Markdown file. This approach is inconsistent with the established practice in this repository, which utilizes a reusable <MDSvgIcon> component for icons. My review includes a suggestion to refactor this to use the component, which will improve the code's readability and maintainability, aligning it with the project's existing patterns.
|
|
||
| - 将右上角 <MDSvgIcon name="icon-top-organization" /> **Organization** 和 <MDSvgIcon name="icon-top-account-settings" /> **Account** 合并至左侧导航栏。 | ||
| - 将左侧导航栏 <svg ...></svg> **Admin** 合并至 <MDSvgIcon name="icon-left-projects" /> **Project**,并移除左上角 ☰ 悬浮菜单。现在可通过 <MDSvgIcon name="icon-left-projects" /> 切换项目及修改项目设置。 | ||
| - 将左侧导航栏 <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke-width="1.5" xmlns="http://www.w3.org/2000/svg"><path d="M12 14.5H7.5C6.10444 14.5 5.40665 14.5 4.83886 14.6722C3.56045 15.06 2.56004 16.0605 2.17224 17.3389C2 17.9067 2 18.6044 2 20M14.5 6.5C14.5 8.98528 12.4853 11 10 11C7.51472 11 5.5 8.98528 5.5 6.5C5.5 4.01472 7.51472 2 10 2C12.4853 2 14.5 4.01472 14.5 6.5ZM22 16.516C22 18.7478 19.6576 20.3711 18.8054 20.8878C18.7085 20.9465 18.6601 20.9759 18.5917 20.9911C18.5387 21.003 18.4613 21.003 18.4083 20.9911C18.3399 20.9759 18.2915 20.9465 18.1946 20.8878C17.3424 20.3711 15 18.7478 15 16.516V14.3415C15 13.978 15 13.7962 15.0572 13.6399C15.1077 13.5019 15.1899 13.3788 15.2965 13.2811C15.4172 13.1706 15.5809 13.1068 15.9084 12.9791L18.2542 12C18.3452 11.9646 18.4374 11.8 18.4374 11.8H18.5626C18.5626 11.8 18.6548 11.9646 18.7458 12L21.0916 12.9791C21.4191 13.1068 21.5828 13.1706 21.7035 13.2811C21.8101 13.3788 21.8923 13.5019 21.9428 13.6399C22 13.7962 22 13.978 22 14.3415V16.516Z" stroke="currentColor" stroke-width="inherit" stroke-linecap="round" stroke-linejoin="round"></path></svg> **Admin** 合并至 <MDSvgIcon name="icon-left-projects" /> **Project**,并移除左上角 ☰ 悬浮菜单。现在可通过 <MDSvgIcon name="icon-left-projects" /> 切换项目及修改项目设置。 |
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.
While this change correctly fixes the invalid SVG markup, it introduces a large, inlined SVG into the document. This harms readability and is inconsistent with the rest of the file, which uses the <MDSvgIcon> component for icons (e.g., <MDSvgIcon name="icon-left-projects" />).12
For better maintainability and consistency, please use the <MDSvgIcon> component instead. I've suggested using icon-left-admin as the name, but please verify if this is the correct name in your icon library or add it if it's a new icon.
| - 将左侧导航栏 <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke-width="1.5" xmlns="http://www.w3.org/2000/svg"><path d="M12 14.5H7.5C6.10444 14.5 5.40665 14.5 4.83886 14.6722C3.56045 15.06 2.56004 16.0605 2.17224 17.3389C2 17.9067 2 18.6044 2 20M14.5 6.5C14.5 8.98528 12.4853 11 10 11C7.51472 11 5.5 8.98528 5.5 6.5C5.5 4.01472 7.51472 2 10 2C12.4853 2 14.5 4.01472 14.5 6.5ZM22 16.516C22 18.7478 19.6576 20.3711 18.8054 20.8878C18.7085 20.9465 18.6601 20.9759 18.5917 20.9911C18.5387 21.003 18.4613 21.003 18.4083 20.9911C18.3399 20.9759 18.2915 20.9465 18.1946 20.8878C17.3424 20.3711 15 18.7478 15 16.516V14.3415C15 13.978 15 13.7962 15.0572 13.6399C15.1077 13.5019 15.1899 13.3788 15.2965 13.2811C15.4172 13.1706 15.5809 13.1068 15.9084 12.9791L18.2542 12C18.3452 11.9646 18.4374 11.8 18.4374 11.8H18.5626C18.5626 11.8 18.6548 11.9646 18.7458 12L21.0916 12.9791C21.4191 13.1068 21.5828 13.1706 21.7035 13.2811C21.8101 13.3788 21.8923 13.5019 21.9428 13.6399C22 13.7962 22 13.978 22 14.3415V16.516Z" stroke="currentColor" stroke-width="inherit" stroke-linecap="round" stroke-linejoin="round"></path></svg> **Admin** 合并至 <MDSvgIcon name="icon-left-projects" /> **Project**,并移除左上角 ☰ 悬浮菜单。现在可通过 <MDSvgIcon name="icon-left-projects" /> 切换项目及修改项目设置。 | |
| - 将左侧导航栏 <MDSvgIcon name="icon-left-admin" /> **Admin** 合并至 <MDSvgIcon name="icon-left-projects" /> **Project**,并移除左上角 ☰ 悬浮菜单。现在可通过 <MDSvgIcon name="icon-left-projects" /> 切换项目及修改项目设置。 |
First-time contributors' checklist
What is changed, added or deleted? (Required)
The previous machine-translated SVG tag caused the doc build to fail. Replaced it with a valid element containing proper attributes and syntax.
Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions.
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?