Issue #5244 Fix drag & drop to group for contacts without prior click#5291
Issue #5244 Fix drag & drop to group for contacts without prior click#5291kaibrockelt wants to merge 3 commits into
Conversation
Signed-off-by: Kai Brockelt <kaibrockelt@gmail.com>
Signed-off-by: Kai Brockelt <kaibrockelt@gmail.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Signed-off-by: Kai Brockelt <kaibrockelt@gmail.com>
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Fixes #5244
What was broken
Dragging a contact into a group only worked if the contact had been clicked before. Without a prior click, no PUT request was sent and the group assignment was silently dropped.
Root cause
Without a prior click (which triggers a full PROPFIND), the contact object is not set in a satisfactionary way — the contact is only hydrated from the initial listing. By loading the contact before adding the groups, the
updateContactaction now accepts the object, and no longer skipps silently.Fix
Call
fetchFullContactin the drop handler before proceeding with the group assignment.Testing:
The
onDrophandler is hard to unit test in isolation (async DAV calls, Vuex store, DOM events). I added unit tests for theContact.groupssetter which is at the core of the fix. Manual testing was done for the following scenarios — see video below:https://drive.google.com/file/d/1jZ0OnXgLvYKriTLuYLomdrjkNBSkK17N/view?usp=sharing