(extension) improve danmaku offset control [DA-399]#326
Conversation
|
Task linked: DA-399 Improve danmaku offset control UI |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
danmaku-anywhere-ui-preview | 72bd248 | Commit Preview URL Branch Preview URL |
Mar 16 2026, 07:05 PM |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary of ChangesHello, 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 focuses on improving the user interface for numerical input, particularly for the danmaku time offset setting. It introduces a versatile Highlights
Changelog
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 a new NumberScrubber component to provide a more advanced and user-friendly way to control numeric values, specifically for the danmaku time offset. This is a significant improvement over the previous slider-and-input implementation, resulting in cleaner and more maintainable code. My review includes a couple of suggestions for the new components: one to improve the robustness of timer handling in NumberScrubber.tsx, and another to correct the usage of Material-UI's Grid component in LabeledScrubber.tsx to fix a layout issue. Overall, this is a great enhancement to the extension's UI.
packages/danmaku-anywhere/src/content/common/DanmakuStyles/LabeledScrubber.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Updates the browser extension’s danmaku style UI to provide finer, more discoverable time-offset control via a new scrubber input component, with supporting i18n strings and minor dev-server config tweaks.
Changes:
- Add a reusable
NumberScrubbercontrol (drag/wheel, modifier precision, double-click manual entry, reset). - Replace the offset slider+input in
DanmakuStylesFormwith the new scrubber and update offset formatting. - Add new
form.*localization strings and adjust offset label text.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/danmaku-anywhere/vite.config.ts | Changes dev server ports for Chrome/Firefox targets. |
| packages/danmaku-anywhere/src/content/common/DanmakuStyles/LabeledScrubber.tsx | Adds a labeled wrapper around NumberScrubber with a precision help tooltip. |
| packages/danmaku-anywhere/src/content/common/DanmakuStyles/DanmakuStylesForm.tsx | Switches offset control to LabeledScrubber and updates formatting/tooltip key. |
| packages/danmaku-anywhere/src/common/localization/locales/zh/translation.json | Adds form.* strings and updates offset label/tooltip key. |
| packages/danmaku-anywhere/src/common/localization/locales/en/translation.json | Adds form.* strings and updates offset label/tooltip key. |
| packages/danmaku-anywhere/src/common/components/form/NumberScrubber.tsx | Introduces the new numeric scrubber component and interaction logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/danmaku-anywhere/src/content/common/DanmakuStyles/LabeledScrubber.tsx
Show resolved
Hide resolved
packages/danmaku-anywhere/src/content/common/DanmakuStyles/DanmakuStylesForm.tsx
Outdated
Show resolved
Hide resolved
packages/danmaku-anywhere/src/content/common/DanmakuStyles/LabeledScrubber.tsx
Show resolved
Hide resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Screen.Recording.2026-03-16.114757.mp4