fix: unused routing parameters, and related usage - #5604
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
GVodyanov
left a comment
There was a problem hiding this comment.
Hey! Thanks for looking into this
One issue though, in newContact():
if (this.selectedCircle) {
emit('contacts:circles:append', this.selectedCircle.id) selectedCircle comes from RouterMixin as $route.params.selectedCircle, so it's the circle id string, not a Circle model — .id is undefined. This
was latent before because isCirclesView never evaluated true, but switching the guard to selectedCircle makes the branch reachable. The result is
MemberList setting pickerCircle = undefined and addMembersToCircle({ circleId: undefined }) failing with "There was an issue adding members to the team".
Should just be:
emit('contacts:circles:append', this.selectedCircle) So basically when clicking on "add member" on a teams page the adding doesn't work.
Signed-off-by: Roberto Guido <info@madbob.org>
08bb339 to
0cb678b
Compare
|
Oops... I totally missed that... |
|
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.) |
Navigating the app in dev mode, the JS console is filled with warnings like:
I've investigated a bit, and I've found that
selectedGrouphas been introduced in the routing parameters in a0a80c9 to fix #4090.With the migration to Vue3, and the upgrade of vue-router, unused routing parameters are discarded by the router (as described here), and the changes introduced in a0a80c9 broke again.
So I have mostly reverted that commit, and introduced a different approach to select how and when display the "Import Contacts" buttons.
Accidentally, this also fix #5257