Status: Done
Overview
This ticket covers the implementation of a user-facing mechanism to request the window-management permission from the browser. This is a prerequisite for Phase 3 of the EPIC-Dashboard-Drag-And-Drop.md, which involves creating and moving popup windows during a drag operation.
Implementation Details
UI Button:
- A new button, "Enable Window Management," was added to
apps/colors/view/HeaderToolbar.mjs.
- This button serves as the user-initiated entry point for the permission request.
Controller Logic:
- An event handler,
onEnableWindowManagementClick, was added to apps/colors/view/ViewportController.mjs.
- This handler calls the new remote method on the
DragDrop main thread addon.
- It updates the button's appearance (text, icon, disabled state) based on the success or failure of the permission request, providing clear feedback to the user.
Main Thread Addon Method:
- A new remote method,
requestWindowManagementPermission, was created in src/main/addon/DragDrop.mjs.
- This method encapsulates the browser API interaction, calling
window.getScreenDetails() to trigger the permission prompt.
- It includes checks for a secure context (
window.isSecureContext) and API availability, returning a detailed success or error status.
Status: Done
Overview
This ticket covers the implementation of a user-facing mechanism to request the
window-managementpermission from the browser. This is a prerequisite for Phase 3 of the EPIC-Dashboard-Drag-And-Drop.md, which involves creating and moving popup windows during a drag operation.Implementation Details
UI Button:
apps/colors/view/HeaderToolbar.mjs.Controller Logic:
onEnableWindowManagementClick, was added toapps/colors/view/ViewportController.mjs.DragDropmain thread addon.Main Thread Addon Method:
requestWindowManagementPermission, was created insrc/main/addon/DragDrop.mjs.window.getScreenDetails()to trigger the permission prompt.window.isSecureContext) and API availability, returning a detailed success or error status.