mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-20 05:42:20 +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().parents[1]
|
||||
CSS = (ROOT / 'static' / 'css' / '13-image-editor.css').read_text(encoding='utf-8')
|
||||
SW = (ROOT / 'static' / 'sw.js').read_text(encoding='utf-8')
|
||||
|
||||
|
||||
def _block(selector):
|
||||
idx = CSS.index(selector)
|
||||
return CSS[idx:idx + 420]
|
||||
|
||||
|
||||
def test_swatch_row_label_is_more_legible():
|
||||
block = _block('.ge-swatch-row-label {')
|
||||
assert 'font-size: 10px;' in block
|
||||
assert 'opacity: 0.78;' in block
|
||||
assert 'opacity: 0.5;' not in block
|
||||
assert 'font-size: 9px;' not in block
|
||||
|
||||
|
||||
def test_inactive_dock_tabs_raised():
|
||||
block = _block('.ge-dock-tab {')
|
||||
assert 'color: color-mix(in srgb, var(--fg) 72%, transparent);' in block
|
||||
|
||||
|
||||
def test_group_head_glyphs_raised():
|
||||
assert 'color: color-mix(in srgb, var(--fg) 72%, transparent);' in _block('.ge-dock-collapse {')
|
||||
assert 'color: color-mix(in srgb, var(--fg) 72%, transparent);' in _block('.ge-dock-tabs-more {')
|
||||
assert 'color: color-mix(in srgb, var(--fg) 70%, transparent);' in _block('.ge-dock-detach {')
|
||||
|
||||
|
||||
def test_sw_cache_name_is_version_agnostic():
|
||||
m = re.search(r"CACHE_NAME = '([^']+)'", SW)
|
||||
assert m and re.fullmatch(r'odysseus-v\d+-pr40-editor-precache', m.group(1))
|
||||
Reference in New Issue
Block a user