fix: Prevent Lightbox navigation to open unsaved prompt - #7161
Open
Larsluph wants to merge 3 commits into
Open
Conversation
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.
Description
This PR adds missing unsaved changes guard on the performer edit panel component and updates the existing rule for exclusion.
The new Regex handles both the old case and the new ones:
/${basepath}/${id}(gallery)/${basepath}/${id}/default(performer/group)/${basepath}/${id}/scenes(performer/group)/${basepath}/${id}/galleries(performer)/${basepath}/${id}/images(performer)/${basepath}/${id}/groups(performer)/${basepath}/${id}/appearswith(performer)/${basepath}/${id}/performers(group)/${basepath}/${id}/subgroups(group)Identified from the
validTabsconst found in both edit panel.Related Issue
Closes #7154
Testing
Testing was made beforehand to properly identify the issue and understand the app components contributing to the bug.
Applied the fix and tried opening the lightbox on all identified bugged page to make sure the lightbox hide action doesn't trigger the unsaved message on the performer and group detail page.
Also ensured the existing rule was still working on galleries.
Checked for other pages but no Lightbox can be natively opened there.
Screenshots
Checklist
AI Usage Disclosure
I haven't used any AI tools for this.
Additional Context