Conversation
添加歌词字体大小自适应模式,可根据窗口高度自动缩放歌词大小,避免全屏时过小或窗口时过大。新增设置选项允许用户在固定大小和自适应模式之间切换,并更新了歌词预览和播放器组件以支持新的字体大小计算逻辑。
将多个组件中重复的字体大小计算逻辑提取到统一的工具函数 getFontSize 中 该函数根据字体大小模式(自适应或固定)返回相应的 CSS 值
feat(歌词): 增加自适应歌词字体大小模式 添加歌词字体大小自适应模式,可根据窗口高度自动缩放歌词大小,避免全屏时过小或窗口时过大。新增设置选项允许用户在固定大小和自适应模式之间切换,并更新了歌词预览和播放器组件以支持新的字体大小计算逻辑。
…taskbar-window 🦄 refactor: 优化在任务栏歌词窗口中的开发者工具打开
Summary of ChangesHello @kazukokawagawa, 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! 此拉取请求对歌词显示和开发者体验进行了重要改进。它引入了自适应歌词字体大小机制,可根据窗口高度动态调整字体大小,确保在不同窗口状态下都能获得最佳可读性。此外,通过为任务栏歌词窗口提供 F12 快捷键来切换分离式开发者工具,增强了其调试能力,这对于调试其紧凑界面至关重要。QRC 歌词解析器也得到了增强,能够更稳健地处理格式不正确的 XML 结构,从而提高了歌词解析的可靠性。 Highlights
Changelog
Activity
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.
Code Review
This pull request introduces an adaptive font size feature for lyrics, allowing them to scale with the window height. This is controlled by a new "Adaptive lyric size" setting. The implementation is clean, centralizing the logic in a new getFontSize utility. Additionally, the QRC lyric parser has been improved to handle non-standard files with unescaped quotes, and a developer experience enhancement has been added to open DevTools in a detached window for the taskbar lyric component. The changes are well-implemented. I have one minor suggestion for improving type safety in the new utility function.
| * @param mode 字体大小模式 ('adaptive' | 'fixed') | ||
| * @returns CSS font-size 字符串 | ||
| */ | ||
| export const getFontSize = (size: number, mode: string) => { |
There was a problem hiding this comment.
For better type safety, it's recommended to use a more specific type for the mode parameter instead of string. Based on its usage with settingStore.lyricFontSizeMode, the type should be 'fixed' | 'adaptive'.
| export const getFontSize = (size: number, mode: string) => { | |
| export const getFontSize = (size: number, mode: "fixed" | "adaptive") => { |
No description provided.