feat(teams): add public flags to teams to allow easier sharing with other teams #2179
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "waza-ari/vikunja:2173-teams-public-flag"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements #2173
1dfaeaa413
to93672cae09
2173-teams-public-flagto feat(teams): add public flags to teams to allow easier sharing with other teamsHi waza-ari!
Thank you for creating a PR!
I've deployed the frontend changes of this PR on a preview environment under this URL: https://2179-2173-teams-public-flag--vikunja-frontend-preview.netlify.app
You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somewhere. The easiest to use is https://try.vikunja.io/.
This preview does not contain any changes made to the api, only the frontend.
Have a nice day!
Question: right now (even before this PR), empty groups (no team members) are not returned, as
INNER JOIN
is used and therefore those are filtered out. Now I'm struggling to think about any scenario where this would be possible, as regular teams cannot be left when there's only a single team member is left and OIDC teams should be auto deleted. So its probably just an issue that could happen with bogus fixture data, just want to confirm that's not an issue?@ -63,2 +63,4 @@
# Allow using a custom logo via external URL.
customlogourl: ''
# Enables the public team feature. If enabled, it is possible to configure teams to be public, which makes them
# discoverable when sharing a project, therefore not only showing teams the user is member of.
Can you fix the indentation here? That should also fix the generated description in the markdown.
@ -364,0 +368,4 @@
results = await searchService.getAll({}, {s: query, includePublic: true})
} else {
results = await searchService.getAll({}, {s: query})
}
Nitpick, but please refactor to something like this:
I was thinking about that as well, but the entire point of having the abstract
searchService
is that it can be used both for searching teams and users. While the team search service understands theincludePublic
parameter, the user search service doesn't.Gotcha, that makes sense. I stumbled upon this because I forgot the service can be different things.
@ -923,1 +923,3 @@
"member": "Member"
"member": "Member",
"isPublic": "Visibility",
"isPublicDescription": "Make team publicly discoverable"
We should describe what this implies.
@ -305,6 +329,8 @@ async function save() {
}
showErrorTeamnameRequired.value = false
console.log('team.value', team.value)
Please remove the console.log
@ -126,6 +149,50 @@ func TestTeam_ReadAll(t *testing.T) {
assert.Len(t, ts, 1)
assert.Equal(t, int64(2), ts[0].ID)
})
t.Run("public", func(t *testing.T) {
Please split this up in different test cases (with
t.Run
)I can't think of any scenario either, a team with no members does not really have a use-case IMHO.
Hm, I'm uncertain if my changes could cause CI to fail, not sure if anything else was changed?
The desktop build is sometimes flaky, no worries. I've restarted that CI build.
@ -922,2 +922,3 @@
"admin": "Admin",
"member": "Member"
"member": "Member",
"isPublic": "Visibility",
This should be called "Public Team" or something similar, calling it "Visibility" does not really say what it does. In combination with the explanation "Public Team" makes more sense.
LGTM. Thanks!