Fix duplicate media import bug and rename MediaSidebar to MediaManager

- Renamed src/MediaSidebar.html to src/MediaManager.html to align with modal UI.
- Fixed race condition in Photo Picker polling preventing duplicate imports.
- Updated global.ts, initMenu.ts, and mediaHandlers.ts used in the fix.
- Fixed unit tests for mediaHandlers.
This commit is contained in:
Ben Miller
2025-12-26 22:57:46 -07:00
parent 3da46958f7
commit 8554ae9610
5 changed files with 114 additions and 95 deletions

View File

@ -7,11 +7,12 @@ import { Shop } from "./shopifyApi"
import { Config } from "./config"
import { Product } from "./Product"
export function showMediaSidebar() {
const html = HtmlService.createHtmlOutputFromFile("MediaSidebar")
export function showMediaManager() {
const html = HtmlService.createHtmlOutputFromFile("MediaManager")
.setTitle("Media Manager")
.setWidth(350);
SpreadsheetApp.getUi().showSidebar(html);
.setWidth(1100)
.setHeight(750);
SpreadsheetApp.getUi().showModalDialog(html, "Media Manager");
}
export function getSelectedSku(): string | null {