Merge current dev and refresh PR #6741 from the 7011 integration

This commit is contained in:
pewdiepie-archdaemon
2026-10-26 16:21:28 +00:00
295 changed files with 24233 additions and 1587 deletions
+30 -1
View File
@@ -96,7 +96,36 @@ def test_bucket_tool_is_registered_and_wired():
assert "const _bucketTool = createBucketTool({" in editor
assert "if (state.tool === 'bucket') return _bucketTool.fill(e);" in editor
assert "'fill.flood':" in editor
assert "_pixelPaintTools = new Set(['brush', 'eraser', 'clone', 'heal', 'smudge', 'dodge', 'burn', 'gradient', 'bucket'])" in editor
assert "_pixelPaintTools = new Set(['brush', 'pixel', 'eraser', 'clone', 'heal', 'smudge', 'dodge', 'burn', 'gradient', 'bucket', 'liquify'])" in editor
state = (ROOT / "static/js/editor/state.js").read_text()
assert "bucketTolerance: 32" in state
def test_bucket_rasterizes_a_pixel_layer_in_one_click():
# A text/shape/placed layer used to bounce the user through a rasterize
# dialog that could then sit behind the canvas, so the bucket looked broken.
# Now the layer is rasterized silently (undoable) and filled in one click.
editor = (ROOT / "static/js/galleryEditor.js").read_text()
assert "function _rasterizeLayerNow(layer) {" in editor
assert '_saveState(`Rasterize "${layer.name}"`);' in editor
assert "if (!_rasterizeLayerNow(layer)) { void _offerRasterizeForTool(); return; }" in editor
assert "if (!_pixelPaintTools.has(toolId)) void _offerRasterizeForTool(toolId);" in editor
def test_all_paint_tools_rasterize_silently_instead_of_prompting():
# Clone/heal/brush/etc. hit the same rasterize prompt on text/shape/placed
# layers, so every paint tool now rasterizes silently and continues.
editor = (ROOT / "static/js/galleryEditor.js").read_text()
assert "// fall through — `layer` is a pixel layer now, so the tool runs below." in editor
assert "if (_pixelPaintTools.has(state.tool) && !_getActiveMaskLayer() && !state.quickMaskActive &&" in editor
def test_smudge_and_dodge_icons_are_distinct():
toolbar = (ROOT / "static/js/editor/build/toolbar.js").read_text()
# Smudge is a pointing hand/finger, not a swirl.
assert "M12.5 12V5.5a1.75 1.75 0 1 1 3.5 0V12" in toolbar
assert "M16 12v-1.5a1.5 1.5 0 0 1 3 0V16a5 5 0 0 1-5 5h-2.2" in toolbar
# Dodge is the mirrored, filled dot.
assert "m9.5 14.5-6 6" in toolbar
assert '<circle cx="14" cy="10" r="6" fill="currentColor"/>' in toolbar