mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-11-03 11:42:23 +01:00
feat(photo-editor): Ajax Image Editor client (Photoshop-parity tools)
Photoshop-parity editor client: layers, selection/masking, brushes,
smart filters, LUT import, Quick Edit, mobile gestures, workspaces,
batch operations, and the service-worker versioning (v978->v1006).
Source: vendor/photocraft (ad1cff44) photo-editor client files, merged
onto upstream/dev (a8c147b2). Conflict resolution documented in
pr_work/A_conflicts.md; editor files taken from vendor/photocraft
(upstream's editor is an earlier snapshot of the same feature).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c74f475679
commit
5fac693c1c
@@ -0,0 +1,37 @@
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
CSS = (ROOT / "static/css/13-image-editor.css").read_text(encoding="utf-8")
|
||||
GALLERY = (ROOT / "static/js/galleryEditor.js").read_text(encoding="utf-8")
|
||||
STUDIO = (ROOT / "static/js/editor/panels/studio-panels.js").read_text(encoding="utf-8")
|
||||
SW = (ROOT / "static/sw.js").read_text(encoding="utf-8")
|
||||
|
||||
|
||||
def test_tab_tear_off_icon_sits_inside_the_tab():
|
||||
# The undock pop is absolutely positioned inside the tab item, not a sibling
|
||||
# control that takes up its own space next to the tab.
|
||||
item_block = CSS[CSS.index(".ge-dock-tab-item {"):CSS.index(".ge-dock-tab-pop {")]
|
||||
assert "position: relative;" in item_block
|
||||
pop_block = CSS[CSS.index(".ge-dock-tab-pop {"):CSS.index(".ge-dock-tab-pop {") + 400]
|
||||
assert "position: absolute;" in pop_block
|
||||
assert "right: 1px;" in pop_block
|
||||
|
||||
|
||||
def test_adjustment_grid_button_passes_itself_as_anchor():
|
||||
assert "button.addEventListener('click', () => onAddAdjustment(type, button));" in STUDIO
|
||||
|
||||
|
||||
def test_on_add_adjustment_forwards_the_anchor():
|
||||
assert "onAddAdjustment: (type, anchor) => {" in GALLERY
|
||||
assert "anchor || document.getElementById('ge-add-fx')" in GALLERY
|
||||
|
||||
|
||||
def test_open_adj_popup_prefers_the_clicked_anchor():
|
||||
assert "_openAdjPopup(layer, type, anchorEl || row, layer.adjustment);" in GALLERY
|
||||
|
||||
|
||||
def test_sw_cache_name_is_version_agnostic():
|
||||
m = re.search(r"CACHE_NAME = '(odysseus-v\d+-pr40-editor-precache)'", SW)
|
||||
assert m, "sw.js CACHE_NAME not found"
|
||||
assert re.fullmatch(r"odysseus-v\d+-pr40-editor-precache", m.group(1))
|
||||
Reference in New Issue
Block a user