mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-16 11:52:25 +02:00
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>
53 lines
2.0 KiB
Python
53 lines
2.0 KiB
Python
"""Editor controls must use the app's design tokens (theme audit, part 2).
|
|
|
|
Extends tests/test_editor_theme_tokens.py: buttons, segmented toggles, tabs,
|
|
list rows, panel headers, badges, focus rings and colour-picker chrome are
|
|
mapped onto the shared tokens (existing tokens only, no new colours). These
|
|
markers assert the second alignment block stays in place.
|
|
"""
|
|
|
|
import pathlib
|
|
|
|
ROOT = pathlib.Path(__file__).resolve().parents[1]
|
|
CSS = (ROOT / "static" / "css" / "documents-gallery-editor.css").read_text()
|
|
|
|
|
|
def test_muted_aliases_map_to_app_tokens():
|
|
assert "--fg-muted: var(--color-muted);" in CSS
|
|
assert "--bg-secondary: var(--panel);" in CSS
|
|
|
|
|
|
def test_buttons_use_the_app_recipe():
|
|
assert "body.ge-editor-open .ge-btn {" in CSS
|
|
assert "border-radius: 5px;" in CSS
|
|
assert "body.ge-editor-open .ge-btn-primary {" in CSS
|
|
assert "color: var(--bg);" in CSS
|
|
assert "body.ge-editor-open .ge-win-close:hover {" in CSS
|
|
|
|
|
|
def test_segmented_toggles_use_the_accent_token():
|
|
assert "body.ge-editor-open .ge-opt-mode.active," in CSS
|
|
assert "body.ge-editor-open .ge-crop-preset.active," in CSS
|
|
assert "body.ge-editor-open .ge-command-item.active," in CSS
|
|
assert "background: var(--accent, var(--red));" in CSS
|
|
|
|
|
|
def test_tab_and_swatch_states_use_the_accent_token():
|
|
assert "body.ge-editor-open .ge-dock-tab.active {" in CSS
|
|
assert "border-bottom-color: var(--accent, var(--red));" in CSS
|
|
assert "body.ge-editor-open .ge-swatch.active {" in CSS
|
|
assert "outline-color: var(--accent, var(--red));" in CSS
|
|
|
|
|
|
def test_panel_headers_and_badges_use_app_tokens():
|
|
assert "body.ge-editor-open .ge-panel-title," in CSS
|
|
assert "color: var(--color-muted);" in CSS
|
|
assert "body.ge-editor-open .ge-tool-clear {" in CSS
|
|
|
|
|
|
def test_focus_rings_use_the_app_recipe():
|
|
assert "body.ge-editor-open .ge-btn:focus-visible," in CSS
|
|
assert "body.ge-editor-open .ge-history-row:focus-visible," in CSS
|
|
assert "body.ge-editor-open .ge-stepper button:focus-visible {" in CSS
|
|
assert "outline-offset: 1px;" in CSS
|