-
Notifications
You must be signed in to change notification settings - Fork 716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes user selection getting lost on closing the sidepanel #12160
fixes user selection getting lost on closing the sidepanel #12160
Conversation
Build Artifacts
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, code change makes sense and I tried some use cases and the bug has been fixed.
But the fact that there was a call to clearSelectedQuestions
when closing the side Panel made me question if perhaps the intention was to clear the replacements.
Because these are not cleared anywhere, and if you do multiple replacements in a row, the references from the previous replacements continue. So probably instead of a clearSelectedQuestions
there should be a clearReplacements
on the beforeRouterLeave @nucleogenesis?
Compartir.pantalla.-.2024-05-12.19_04_51.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original page's selection is updated but replacements
is not being cleared. I think that you could set the value of replacements
in handleConfirmClose
where we handle when the user says "Continue" to the alert telling them they'll lose their changes.
2024-05-14.14-11-20.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The updates here LGTM after some testing! Thanks Allan
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @AllanOXDi The error still happens when we save the questions. Because we are only clearing the replacements when we exit without saving the questions:
Compartir.pantalla.-.2024-05-20.23_51_20.mp4
My suggestion would be to clean the replacements on this line, on router leave. So it would work for both cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @AllanOXDi! LGTM 🎉
Summary
Fixes user selection getting lost on closing the sidepanel
Closes #12135
References
#12135
Reviewer guidance
…
Testing checklist
PR process
Reviewer checklist
yarn
andpip
)