Post-refactoring and improving of the new batch tags update flow#580
Draft
MareStare wants to merge 30 commits intophilomena-dev:masterfrom
Draft
Post-refactoring and improving of the new batch tags update flow#580MareStare wants to merge 30 commits intophilomena-dev:masterfrom
MareStare wants to merge 30 commits intophilomena-dev:masterfrom
Conversation
Member
|
You should've asked me why there was mass_revert_tags... I intend to implement per-tag reverts as a mod tool in the future, so that mods can select individual tags to be reverted as opposed to whole batches. Hence why this whole structure and tag_changes relation preloads on TagChanges.Tag. |
13a8114 to
3d1e53e
Compare
Member
|
Split refactoring / logic fixes, and unit tests, into two separate PRs, this PR is becoming way too large. Maybe even more PRs to be honest, your initial fixes were small and easily mergeable, but this has gotten really, really huge now. |
24d2985 to
73eaa68
Compare
…ntly probably not the intended behavior?
73eaa68 to
bc24332
Compare
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.
There are several changes packed in this single PR
Zero changes edge case
Fixed this edge case when the user doesn't select any tags to revert at all and clicks on the "Revert selected" button:

(this bug should active be in prod too).
Eliminate redundant preloads
I removed the redundant
:tagand:tag_change(reverse) preloads for the initialTagChangeselect. The insideImages.batch_updatedoesn't need the fullTagChange.Tagstruct, it can simply work with tag_ids lists.More info in the flash
Also added the number of actually updated tags to the result of the revert:

TODO
I'll try to add some auto tests for this code