mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-17 12:22:21 +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,36 @@
|
||||
"""Mobile layer-row layout: compact rows + single-line active action strip.
|
||||
|
||||
At phone widths the layers sheet gave every idle row a 102px height (a reserved
|
||||
empty grid track) and wrapped the active row's action strip onto a second line,
|
||||
where it overflowed onto the next layer. These tests pin the CSS fixes.
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
CSS = (ROOT / "static" / "css" / "13-image-editor.css").read_text()
|
||||
SW = (ROOT / "static" / "sw.js").read_text()
|
||||
|
||||
|
||||
def test_mobile_layer_rows_use_two_tracks():
|
||||
# Both the layer-item and group-row rules drop the reserved third track.
|
||||
assert CSS.count("grid-template-rows: 44px auto;") >= 2
|
||||
assert "grid-template-rows: 40px auto 40px;" not in CSS
|
||||
|
||||
|
||||
def test_active_action_strip_does_not_wrap():
|
||||
marker = (
|
||||
".ge-right-panel .ge-layers-list > .ge-layer-item"
|
||||
":not(.ge-adj-sub-item):not(.ge-mask-sub-item).active > .ge-layer-controls"
|
||||
)
|
||||
assert marker in CSS
|
||||
idx = CSS.index(marker)
|
||||
block = CSS[idx : idx + 400]
|
||||
assert "flex-wrap: nowrap;" in block
|
||||
assert "overflow-x: auto;" in block
|
||||
|
||||
|
||||
def test_sw_cache_bumped():
|
||||
# Version-agnostic: every commit bumps the SW cache.
|
||||
import re
|
||||
assert re.search(r"CACHE_NAME = 'odysseus-v\d+-pr40-editor-precache'", SW)
|
||||
Reference in New Issue
Block a user