-
Notifications
You must be signed in to change notification settings - Fork 371
Refactor of views for Groups, Organizations and Events Social Links. #1392
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
Conversation
Thank you for the pull request! ❤️The activist team will do our best to address your contribution as soon as we can. If you're not already a member of our public Matrix community, please consider joining! We'd suggest that you use the Element client as well as Element X for a mobile app, and definitely join the |
Maintainer ChecklistThe following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)
|
✅ Deploy Preview for activist-org canceled.
|
@sh-ran, would you be able to fix the merge conflicts here and then I'll bring this in next? :) |
I need to look into social links now not updating on the frontend, but maybe this is a similar issue with admins not having the right to do changes or make new ones. |
I mean in the tests unless the user has a |
Hey @andrewtavis sorry for getting back to you about this so late. But I think I found why the links wont update in the frontend. So while looking at the logs i saw that while trying to update through the frontend, we are using the |
Sure let me know the timings @andrewtavis and Thank you! |
Okkk, @sh-ran 😊 Our idea worked :) I've added create methods into the views and have written the modal such that it saves the original size of the links array, and if there are more links than at the start then the new ones are created :) Is working well. Good enough to bring this in and we can test further in the coming days. |
Put methods within the views have been switched to updates to match faqs as the tests were failing without it. |
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 so much for the amazing work here, @sh-ran! Note that on update the order of the social links is at times shifting, but we can figure this out later :) Great to have this level of standardization of the backend now! 🚀
Tests at 89% locally and 84% here... Will end up reducing the cover threshold. |
Contributor checklist
Description
The models for the respective entity has been updated to have their own social links model rather than a shared social link model like before. The views have been refactored to handle deletion and updating of old links in a cleaner way. Tests include a 403 error to check if the user who is trying to update the links is either the creator of the group or is a staff/admin.
PS: Thank you @enrouxlibre. Your PR helped a ton while I was working on this issue.
Related issue