Repository navigation
feat(panel): show when Before/After is hiding layers and remember panel layers across file reopen - #6
Merged
Conversation
…el layers across file reopen The button turns red with the label 'Anh goc' while the panel layers are hidden, read from the document after each command and on focus. The recorded layer ids are written to the document XMP so closing and reopening a PSD keeps the comparison. Whether layers are hidden is derived from layer visibility, not stored state.
… the user hid, cheaper state reads Stored ids count only while the layer keeps its stored name, so ids reused by other layers after a flatten or in another file are ignored. Commands that flatten or merge show back only the layers a Before hid, and the hidden list is stored with the document. State is read per layer id instead of walking every layer, batch commands skip documents with nothing hidden, and the button also refreshes when the panel opens and when the pointer enters it.
…rs from the recorded list Pressing Before again after the user turned one panel layer back on no longer forgets the others it had hidden, so batch, watermark and frame commands still show them. Deleted layers leave the recorded list, which keeps state reads cheap, and the README notes that undoing the button should be done by pressing it again.
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
jsx/before-after.jsxaccordingly.Test plan
tests/check-*.jspass, including new checks for the button state moduletests/photoshop-before-after-audit.jsxon Photoshop 23.2: 8/16-bit, two documents, no-Background document, and save / close / reopen of a PSD (writing the ids adds no History step)