-
-
Notifications
You must be signed in to change notification settings - Fork 71
feat: add dark theme #479
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
base: dev
Are you sure you want to change the base?
feat: add dark theme #479
Conversation
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 @HardyNLee, 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!
此拉取请求主要引入了应用程序的深色主题功能,允许用户根据偏好切换界面主题。此外,它还包含了对模板编辑器的多项改进,例如将图像资源转换为更高效的WebP格式,解决了一些界面元素的本地化问题,并修复了代码编辑器中语法高亮显示不正确的问题,从而全面提升了用户体验和界面的视觉一致性。
Highlights
- 深色主题支持: 引入了深色主题功能,用户现在可以在浅色和深色主题之间切换,并对部分样式颜色进行了微调。
- 模板编辑器优化: 修复了模板编辑器中PNG资源未转换为WebP格式的问题,并解决了底部栏未翻译的缺陷。
- 语法高亮修复: 修正了语法高亮颜色未能正确生效的问题,提升了代码编辑器的可读性。
- Monaco Editor配置增强: Monaco Editor新增了自动布局和自动换行功能,并支持通过消息设置主题。
- 主题配置与本地化更新: 新增了深色主题配置文件,并更新了多语言文件以支持主题切换相关的文本。
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 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
-
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
这个 PR 实现了深色主题功能,做得非常棒。代码改动覆盖了 UI 组件、状态管理、编辑器配置和国际化等多个方面,实现方式很清晰。整体代码质量很高。我发现了一些关于代码风格和类型安全的小问题,可以轻松修复。总的来说,这是一次出色的工作。
{ | ||
"scope": [ | ||
"comment", | ||
"comment.line.webgal" | ||
], | ||
"settings": { | ||
"foreground": "#999999" | ||
} | ||
}, | ||
{ | ||
"scope": [ | ||
"keyword.operator.webgal" | ||
], | ||
"settings": { | ||
"foreground": "#ff2c80", | ||
"fontStyle": "bold" | ||
} | ||
}, | ||
{ | ||
"scope": [ | ||
"string.unquoted.utterance.webgal" | ||
], | ||
"settings": { | ||
"foreground": "#aca21a", | ||
"fontStyle": "bold" | ||
} | ||
}, | ||
{ | ||
"scope": [ | ||
"meta.command.webgal", | ||
"support.function.command.webgal" | ||
], | ||
"settings": { | ||
"foreground": "#0075d4", | ||
"fontStyle": "bold" | ||
} | ||
}, | ||
{ | ||
"scope": [ | ||
"meta.character.webgal", | ||
"entity.name.type.character.webgal" | ||
], | ||
"settings": { | ||
"foreground": "#8db118", | ||
"fontStyle": "bold underline" | ||
} | ||
}, | ||
{ | ||
"scope": [ | ||
"variable.parameter.webgal", | ||
], | ||
"settings": { | ||
"foreground": "#d88a14", | ||
} | ||
}, | ||
{ | ||
"scope": [ | ||
"variable.other.webgal", | ||
], | ||
"settings": { | ||
"foreground": "#16c441", | ||
} | ||
}, |
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.
{ | ||
"scope": [ | ||
"comment", | ||
"comment.line.webgal" | ||
], | ||
"settings": { | ||
"foreground": "#757575" | ||
} | ||
}, | ||
{ | ||
"scope": [ | ||
"keyword.operator.webgal" | ||
], | ||
"settings": { | ||
"foreground": "#ff2c80", | ||
"fontStyle": "bold" | ||
} | ||
}, | ||
{ | ||
"scope": [ | ||
"string.unquoted.utterance.webgal" | ||
], | ||
"settings": { | ||
"foreground": "#e6dd7e", | ||
"fontStyle": "bold" | ||
} | ||
}, | ||
{ | ||
"scope": [ | ||
"meta.command.webgal", | ||
"support.function.command.webgal" | ||
], | ||
"settings": { | ||
"foreground": "#5feaff", | ||
"fontStyle": "bold" | ||
} | ||
}, | ||
{ | ||
"scope": [ | ||
"meta.character.webgal", | ||
"entity.name.type.character.webgal" | ||
], | ||
"settings": { | ||
"foreground": "#ddff6f", | ||
"fontStyle": "bold underline" | ||
} | ||
}, | ||
{ | ||
"scope": [ | ||
"variable.parameter.webgal", | ||
], | ||
"settings": { | ||
"foreground": "#ffb84a", | ||
} | ||
}, | ||
{ | ||
"scope": [ | ||
"variable.other.webgal", | ||
], | ||
"settings": { | ||
"foreground": "#6ef48f", | ||
} | ||
}, |
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.
// @ts-ignore id type problem | ||
{ | ||
label: 'WebGAL Black', | ||
path: '/black.json', | ||
uiTheme: 'vs', | ||
}, |
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.
这里使用了 @ts-ignore
来抑制类型检查错误。为了提高代码的健壮性和可维护性,建议解决这个类型问题而不是忽略它。根据 VSCode 扩展的规范,为主题(theme)贡献点添加一个唯一的 id
是一个好习惯,这可能能解决此处的类型问题。建议为 WebGAL Black
和 WebGAL White
主题都添加上 id
。
// @ts-ignore id type problem | |
{ | |
label: 'WebGAL Black', | |
path: '/black.json', | |
uiTheme: 'vs', | |
}, | |
{ | |
id: 'webgal-black', | |
label: 'WebGAL Black', | |
path: '/black.json', | |
uiTheme: 'vs', | |
}, |
介绍