(extension) make controls interactive in full screen video in main frame [DA-402]#328
(extension) make controls interactive in full screen video in main frame [DA-402]#328
Conversation
|
Task linked: DA-402 Main frame case |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
danmaku-anywhere-web | f4d5724 | Commit Preview URL Branch Preview URL |
Mar 17 2026, 04:02 AM |
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 addresses an issue where extension controls become non-interactive when a video enters fullscreen mode. It introduces a new user-configurable option to enable or disable this interaction. By dynamically adjusting the DOM hierarchy of the extension's popover, the changes ensure that users can continue to interact with the extension's features even when watching videos in fullscreen, significantly improving the user experience for those who prefer interactive controls in this mode. 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 setting enableFullscreenInteraction to allow users to interact with extension controls while in fullscreen mode. The changes include adding the new option to schemas, constants, and UI settings, along with a data migration for existing users. The core logic is implemented in a new reparentPopover utility function, which is then used in the player and controller content scripts to manage the popover's DOM position during fullscreen changes.
My review focuses on improving code robustness and maintainability. I've suggested making the data migration safer, refactoring the new reparentPopover function to reduce duplication, and consolidating duplicated option-handling logic in the player content script.
packages/danmaku-anywhere/src/common/options/extensionOptions/service.ts
Show resolved
Hide resolved
| extensionOptionsService.get().then((options) => { | ||
| enableFullscreenInteraction = | ||
| options.playerOptions.enableFullscreenInteraction | ||
| }) | ||
| extensionOptionsService.onChange((options) => { | ||
| enableFullscreenInteraction = | ||
| options.playerOptions.enableFullscreenInteraction | ||
| }) |
There was a problem hiding this comment.
You're adding new get().then() and onChange() handlers, but similar handlers already exist for other player options on lines 159-183. This introduces code duplication and multiple subscriptions to the same service. To improve maintainability, you should consolidate this logic into the existing handlers.
There was a problem hiding this comment.
Pull request overview
This PR updates the browser extension’s content-script popover handling so the extension UI remains interactive when a main-frame video enters fullscreen, and introduces a new user option to enable/disable this behavior.
Changes:
- Add
reparentPopover()helper to move the popover into the currentdocument.fullscreenElement(or back todocument.body) to preserve pointer interactivity. - Wire fullscreen handling in both the player content script and controller frame manager, gated by a new
playerOptions.enableFullscreenInteractionoption. - Add the new option to defaults, schema, storage migration, settings UI config, and i18n strings.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/danmaku-anywhere/src/content/player/index.ts | Reparents the player popover on fullscreenchange, controlled by the new option. |
| packages/danmaku-anywhere/src/content/controller/danmaku/frame/FrameManager.tsx | Reparents the controller popover when instructed by the player, controlled by the new option. |
| packages/danmaku-anywhere/src/content/common/reparentPopover.ts | New shared helper implementing the reparent + popover re-show logic. |
| packages/danmaku-anywhere/src/common/settings/settingConfigs.ts | Adds an Advanced toggle for fullscreen interactivity. |
| packages/danmaku-anywhere/src/common/options/extensionOptions/service.ts | Adds default value and a storage migration (version 23). |
| packages/danmaku-anywhere/src/common/options/extensionOptions/schema.ts | Extends playerOptionsSchema with enableFullscreenInteraction. |
| packages/danmaku-anywhere/src/common/options/extensionOptions/constant.ts | Adds the new option to defaultExtensionOptions. |
| packages/danmaku-anywhere/src/common/localization/locales/zh/translation.json | Adds zh translation for the new toggle label. |
| packages/danmaku-anywhere/src/common/localization/locales/en/translation.json | Adds en translation for the new toggle label. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.