-
-
Notifications
You must be signed in to change notification settings - Fork 291
feat: redesign all ui #766
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?
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!
此拉取请求对用户界面进行了全面彻底的重新设计,旨在提升多分辨率兼容性和触屏操作体验。核心目标是提供更灵活的UI定制能力,优化启动流程,并通过引入丰富的动画效果,为用户带来更流畅、更现代的交互感受。
Highlights
- UI完全重新设计: UI已完全重新设计,以适应多分辨率和触屏友好。
- 样式自定义能力增强: applyStyle现在覆盖了99%的UI,用户几乎可以完全自定义任何UI而无需更改源码。
- 异步初始化脚本: 初始化脚本现在是异步的,因为必须等待某些资源完全加载后才能获得正确参数。
- 界面入场退场动画: 现在几乎所有界面都有入场退场动画,包括intro、choose等脚本UI。
- index.html简化: index.html现在仅包含3个主要元素:root、launchScreen(开屏画面)和panicOverlay容器,ebg已被完全移除。
- 控制面板统一: BottomControlPanel更名为ControlPanel,并从UI目录移动到Stage目录,两种模式共用同一种UI,并分为常驻栏和详细列表。
- 文本框功能优化: 文本框大幅调整了元素的嵌套关系,不再有单独的背景元素,高度会适应超长文字,且textSize参数现在由样式文件控制。
- 选择列表可滚动: 现在选择列表是可滚动的。
- 全局对话框按钮统一: 全局对话框的'yes'和'no'被替换为'confirm'和'cancel',并且'confirm'统一在右边。
- 鉴赏界面功能增强: 鉴赏界面现在cg和bgm可以显示名称与所属系列,可以按系列筛选条目,cg和bgm现分开为两个界面,且不再为cg分页。
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。新的设计是现代的、响应式的,并且高度可定制。代码经过了大量的重构,带来了更好的结构、可读性和可维护性。关键的改进包括转向基于CSS的响应式布局、异步初始化以及为UI组件引入动画过渡。带有可固定按钮的新控制面板是一个很棒的功能。
我发现了一些需要注意的潜在问题。
if (vocal) { | ||
playVocal(sentence); | ||
} else if (key || pos) { | ||
} else if (key || pos !== undefined) { |
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.
这个条件判断似乎有误。pos
被定义为字符串,所以 pos !== undefined
总是为 true
。这会导致 key || true
的结果始终为 true
,使得 performSimulateVocal()
在没有 vocal
参数时总是被调用,这可能不是预期的行为。之前的逻辑 key || pos
似乎更合理,如果意图是当 key
存在或 pos
不是空字符串时触发,那么 key || pos !== ''
会是更明确和健壮的写法。
} else if (key || pos !== undefined) { | |
} else if (key || pos !== '') { |
const handleCtrlKeydown = useCallback((e) => { | ||
if (isCtrlKey(e) && isGameActive()) { | ||
startFast(); | ||
stopAll(); | ||
} | ||
}, []); |
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.
handleCtrlKeydown
的逻辑似乎不正确。当用户按下 Ctrl 键时,应该启动快进模式,但当前代码调用了 stopAll()
,这会停止快进。正确的逻辑应该是在 keydown
事件中调用 startFast()
。
const handleCtrlKeydown = useCallback((e) => { | |
if (isCtrlKey(e) && isGameActive()) { | |
startFast(); | |
stopAll(); | |
} | |
}, []); | |
const handleCtrlKeydown = useCallback((e) => { | |
if (isCtrlKey(e) && isGameActive()) { | |
startFast(); | |
} | |
}, []); |
fix: fast save preview position fix: save load scss path fix: minor issue feat: custom stage resolution fix: spine stage resolution
介绍
Caution
此 PR 包含两个巨大的字体文件,拉取时需耐心等待
主要更改
Apply Style
脚本初始化
脚本初始化函数现在是异步的,并且后一步必须等待前一步完成
翻译
补充了一些缺失的翻译
入场退场动画
现在几乎所有界面都有入场退场动画,包括 intro, choose 等脚本 UI
HTML
开屏画面 launch screen
LOGO
Logo 元素已被移除,因为现在已经迁移至 launch screen
Full Screen Perform
Full Screen Perform 元素被移除,子元素全部搬迁至 Stage 元素下
首次选择语言
标题界面
文本框
--textbox-background-opacity
变量,用户自行使用before
或者background-color: rgba(255, 255, 255, var(--textbox-background-opacity));
.textbox_text_small
.textbox_text_small
.textbox_text_large
文本框(电影模式)
.textbox_film_text_small
.textbox_film_text_small
.textbox_film_text_large
控制面板
BottomControlPanel
更名为ControlPanel
ControlPanel
从 UI 目录移动到 Stage 目录,从 UI 元素下移动到 Stage 元素下选择列表
黑屏文字
获取用户输入
全局对话框
yes
和no
被替换为confirm
和cancel
,并且confirm
统一在右边菜单
设置
关于
页面现在是独立的页面存档读档
鉴赏界面
其他