mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-22 23:02:23 +02: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,35 @@
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parent.parent
|
||||
DOCK_JS = (ROOT / "static/js/editor/build/dock.js").read_text(encoding="utf-8")
|
||||
CSS = (ROOT / "static/css/13-image-editor.css").read_text(encoding="utf-8")
|
||||
SW = (ROOT / "static/sw.js").read_text(encoding="utf-8")
|
||||
|
||||
|
||||
def test_dock_head_button_glyphs_are_16px():
|
||||
# The group-head buttons (collapse/expand, more) use the same 16px glyph
|
||||
# as the float-window dock button. (The group detach glyph was removed.)
|
||||
assert DOCK_JS.count('width="16" height="16"') >= 4
|
||||
assert 'width="11" height="11"' not in DOCK_JS
|
||||
|
||||
|
||||
def test_dock_head_buttons_match_float_dock_size():
|
||||
for cls in (".ge-dock-collapse {", ".ge-dock-detach {", ".ge-dock-tabs-more {"):
|
||||
idx = CSS.index(cls)
|
||||
block = CSS[idx:idx + 240]
|
||||
assert "width: 26px;" in block, cls
|
||||
assert "height: 26px;" in block, cls
|
||||
assert "padding: 0;" in block, cls
|
||||
|
||||
|
||||
def test_dock_head_svg_rule_present():
|
||||
assert (
|
||||
".ge-dock-collapse svg, .ge-dock-detach svg, .ge-dock-tabs-more svg "
|
||||
"{ width: 16px; height: 16px; flex: 0 0 auto; }" in CSS
|
||||
)
|
||||
|
||||
|
||||
def test_sw_cache_name_bumped():
|
||||
m = re.search(r"CACHE_NAME\s*=\s*'([^']+)'", SW)
|
||||
assert m and re.fullmatch(r"odysseus-v\d+-pr40-editor-precache", m.group(1))
|
||||
Reference in New Issue
Block a user