Repository navigation
feat(panel): add Before/After toggle for retouch layers - #5
Merged
Merged
Conversation
Remember the layers each retouch command creates and hide or show them with one button, leaving the user's own layers untouched. Each toggle is one History step.
…idden layers before rebuild commands Show hidden layers before frame, watermark, artboard and batch commands so a flatten never drops them, read the toggle state from the document instead of trusting stored state, keep owned ids across Undo/Redo, ignore a command that left another document active, and read only the layer properties needed.
…d text/logo commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
js/panel.jsrecords the layers each layer-creating command adds (layer-id diff around the command), so Photoshop Actions with unknown layer names are covered. The user's own layers and layers they hid themselves are never touched.jsx/before-after.jsxholds the state per document for the Photoshop session; each toggle is one History step.Not included
Batch (
BA), Chữ / Logo, Brush and RAW open are not tracked. Layers created outside the panel (manual Action runs) are not tracked.Test plan
tests/check-*.jspass (23 files, including the newcheck-before-after.js)tests/photoshop-before-after-audit.jsxon Photoshop 23.2: 8-bit and 16-bit scratch documents, 22 checks pass (empty toggle, groups, user layers keep visibility, one History step, new tool restores, deleted layer)MLXG,mcwl) through the real loader: 2 panel layers hidden and shown, Background untouched