GNOME Bugzilla – Bug 728049
Add "Join team" option to teams page
Last modified: 2018-05-22 12:18:03 UTC
At the moment this page https://l10n.gnome.org/teams/ displays a list with the translation teams of GNOME along with the coordinator.It would be nice to add an option to join a team. Also this can be done to the teams pages,somewhere next to the title you could add this option with some information about the role of a user.
Created attachment 274122 [details] Join option in teams list page
Created attachment 274123 [details] Join option in a team page
I'm not fond of the first proposal, but the second one could be nice.
Tom, did you actually work on a patch or are these images just mockups?
(In reply to Alexandre Franke from comment #4) > Tom, did you actually work on a patch or are these images just mockups? Alexandre they are mockups.
Thanks, I'll try to come up with a patch.
Created attachment 309137 [details] [review] Add join/leave buttons to teams page With corresponding views and associated tests. I created new test files because I like to use test_foo when working on module foo but I can put them in test.py if you prefer.
Review of attachment 309137 [details] [review]: ::: teams/test_urls.py @@ +13,3 @@ + def test_team_leave_url(self): + self.assertEqual("/teams/fr/leave/", + reverse('team_leave', args = ['fr'], current_app='teams')) Testing URL resolution does not bring much value IMHO. This is Django's job and I trust it :-) I would simply remove this file. Instead I would use the reverse in test_views.py (self.url = reverse('team_join', args = ['gl']), the less hardcoded urls the better, even in tests. ::: teams/urls.py @@ +25,1 @@ ) There are already team_join/team_leave urls and views in the people app. If you really think they are better placed here, then delete the others. Otherwise, these are simply duplicates.
Created attachment 309207 [details] [review] > Testing URL resolution does not bring much value IMHO. This is Django's job > and I trust it :-) I would simply remove this file. I respectfully disagree :-) While I do trust django, I don't trust me and I think the url tests have some value, especially if using reverse in the view tests: - checking that I did't screw-up the regex and the order of url definitions - checking that the url doesn't change. If you use reverse everywhere this wouldn't break any internal links but it might break links from outside. (it might not be relevant in this particular case though as those views are crsf protected). But I changed the tests to use resolve instead of reverse. > Instead I would use the reverse in test_views.py (self.url = > reverse('team_join', args = ['gl']), the less hardcoded urls the better, even > in tests. Fixed. > There are already team_join/team_leave urls and views in the people app. If > you really think they are better placed here, then delete the others. > Otherwise, these are simply duplicates. Oups, I didn't see those. I have now merged them together but left them in teams.views: I thought that they could be seen as create/delete views for Role objects and Role is defined in teams.models.
The second proposal can be nice.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/damned-lies/issues/54.