Fix undo remove last child#4619
Merged
rtibbles merged 2 commits intolearningequality:unstablefrom Aug 9, 2024
Merged
Conversation
akolson
requested changes
Jul 29, 2024
Member
akolson
left a comment
There was a problem hiding this comment.
Hi @AlexVelezLl!. Although the fix seems to work sometimes, the bug can still be reproduced.
Screen.Recording.2024-07-29.at.14.43.58.mov
Member
|
@AlexVelezLl, if its useful, I picked up this in the terminal! |
d7c55ad to
ba275eb
Compare
rtibbles
reviewed
Aug 8, 2024
Member
rtibbles
left a comment
There was a problem hiding this comment.
The code changes here make sense to me, as they mostly amount to never including the node itself among its own siblings, which seems semantically correct!
If @akolson can confirm he is no long replicating the error he saw, then we should be good to merge.
akolson
approved these changes
Aug 9, 2024
Member
akolson
left a comment
There was a problem hiding this comment.
I can confirm that the issue has now been fully resolved. Manual QA checks out. Thanks @AlexVelezLl 🚀 . cc @rtibbles
Merged
Merged
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
Description of the change(s) you made
When removing the last child of a folder, the folder was left without nodes, and within the undo transaction there was a resource.where() filter to find the siblings of the recovered node, but as it did not find siblings, it was making an API call, which caused the transaction to end before the api call returned, while there were still operations to be done within the transaction.
This PR just relocates the siblings query so that it is done before the transaction.
Manual verification steps performed
Screenshots (if applicable)
Compartir.pantalla.-.2024-07-24.09_11_14.mp4
Reviewer guidance
How can a reviewer test these changes?
References
Closes #4468
Contributor's Checklist
PR process:
CHANGELOGlabel been added to this PR. Note: items with this label will be added to the CHANGELOG at a later timedocslabel has been added if this introduces a change that needs to be updated in the user docs?requirements.txtfiles also included in this PRStudio-specifc:
notranslateclass been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. icons, user-generated text)pages,components, andlayoutsdirectories as described in the docsTesting:
Reviewer's Checklist
This section is for reviewers to fill out.
yarnandpip)