Merge current dev and refresh PR #6741 from the 7011 integration

This commit is contained in:
pewdiepie-archdaemon
2026-10-26 16:21:28 +00:00
295 changed files with 24233 additions and 1587 deletions
+36 -2
View File
@@ -18,11 +18,12 @@ STYLE = (ROOT / "static/css/13-image-editor.css").read_text(encoding="utf-8")
SW = (ROOT / "static/sw.js").read_text(encoding="utf-8")
WINDOW_ACTIONS = {
"quick-edit",
"options", "layers", "properties", "character", "adjustments",
"swatches", "gradients", "channels", "paths", "patterns", "histogram",
"info", "navigator", "history", "actions",
"workspace-essentials", "workspace-photography", "workspace-painting",
"workspace-graphic", "shortcuts",
"workspace-graphic", "workspace-minimal", "workspace-custom", "shortcuts",
}
@@ -48,8 +49,12 @@ def test_window_menu_is_a_real_toggle_kept_open():
assert "function _syncWindowMenuChecks(menu)" in GALLERY
assert "panelVisibility.isVisible(action)" in GALLERY
assert "state.historyPanelEl" in GALLERY
assert "ge-shortcuts-popover" in GALLERY
assert "_shortcutsPopover?.isOpen?.()" in GALLERY
assert "togglePanel: (id) => panelVisibility.toggle(id)," in GALLERY
# Quick Edit has no dock panel: the Window row mirrors its collapse control.
assert "else if (action === 'quick-edit') toggleQuickEdit?.();" in WIRE
assert "wrap.dispatchEvent(new CustomEvent(collapsed ? 'ge-ai-command-open' : 'ge-ai-command-close'));" in GALLERY
assert "on = !!wrap && !wrap.classList.contains('ge-ai-command-collapsed');" in GALLERY
def test_history_row_stays_toggleable():
@@ -74,3 +79,32 @@ def test_window_dot_uses_shared_active_glyph_css():
def test_sw_cache_name_bumped_for_window_dots():
assert re.search(r"odysseus-v\d+-pr40-editor-precache", SW)
def test_shortcuts_row_toggles_off():
# The shortcuts popover dismisses itself on document mousedown; a click on
# a topbar dropdown row (the Window menu "Keyboard Shortcuts" row) must not
# count as click-away, or the row's own click would immediately reopen it
# and the row could only ever turn it on.
POPOVER = (ROOT / "static/js/editor/shortcuts-popover.js").read_text(encoding="utf-8")
assert "e.target.closest('.ge-topbar .dropdown')" in POPOVER
def test_workspace_choice_closes_the_window_menu():
assert "const closeWindowMenu = () => {" in WIRE
assert "menu.hidden = true;" in WIRE
# both the preset rows and the Save Current row close the menu
assert "closeWindowMenu();" in WIRE
def test_save_current_workspace_option():
assert 'data-window-action="workspace-save"' in TOPBAR
assert "<span>Save Current</span>" in TOPBAR
assert 'data-window-action="workspace-custom"' in TOPBAR
assert "saveWorkspace?.();" in WIRE
assert "saveWorkspace: _saveCurrentWorkspace," in GALLERY
assert "const _saveCurrentWorkspace = () => {" in GALLERY
assert "localStorage.setItem('ge-workspace-custom'" in GALLERY
# applyWorkspace resolves a user-saved slot from localStorage
WS = (ROOT / "static/js/editor/workspaces.js").read_text(encoding="utf-8")
assert "localStorage.getItem(`ge-workspace-${name}`)" in WS