-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Full implement group display names #8255
Conversation
@nextcloud/javascript who could help? |
Codecov Report
@@ Coverage Diff @@
## master #8255 +/- ##
=============================================
- Coverage 51.87% 34.99% -16.88%
+ Complexity 25422 25376 -46
=============================================
Files 1609 1607 -2
Lines 95343 95159 -184
Branches 1378 1378
=============================================
- Hits 49455 33297 -16158
- Misses 45888 61862 +15974
|
Select2 issue is a big one! |
I'll change my view! I tried a different approach where I fetch the groups on page load only (no need to fetch them on each select2 click). It quickly displays the id for a short moment, the time to requests the groups, then update itself with the proper displayName! |
a76d28e
to
2be5980
Compare
All tests fixed |
Test passes, failure unrelated :) Please review |
apps/workflowengine/js/admin.js
Outdated
}).done(function(response) { | ||
// add admin groups | ||
$.each(response.data.adminGroups, function(id, group) { | ||
self.groups.push({ id: group.id, displayname: group.name+'FIXME' }); |
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.
Still broken
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.
okay, here it works, just need to remove the FIXME
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.
Ahaha oups! 🙈
apps/workflowengine/js/admin.js
Outdated
}); | ||
// add groups | ||
$.each(response.data.groups, function(id, group) { | ||
self.groups.push({ id: group.id, displayname: group.name+'FIXME' }); |
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.
Still broken
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.
okay, here it works, just need to remove the FIXME
settings/js/settings.js
Outdated
id: groupName, | ||
displayname: groupName | ||
id: groupId, | ||
displayname: groupId + 'FIXME' // FIXME |
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.
Still broken (test with "exclude group from sharing")
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.
In file access control or workflow?
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.
AH okay, I see. I did not see it was there :)
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.
Fixed with 3a9297e |
), | ||
Http::STATUS_CREATED | ||
); | ||
$group = $this->groupManager->createGroup($id); |
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.
there's not method to set the group name? not needed?
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.
No not needed atm
if (groupId && groups.length > 0) { | ||
callback({ | ||
id: groupId, | ||
displayname: groups.find(group =>group.id === groupId).displayname |
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.
Hum, this is ES6, I'm not sure IE11 supports 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.
We should not do this yet.
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.
Fixed
|
does this scale? Like even when you are on ldap and there are a few thousand groups? |
@rullzer I have no idea! The request was made anyway, I just did it before loading the select2 instead of after initialising it :) |
Failure related:
EDIT: FIXED! 🚀 |
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
4a2818b
to
23a1553
Compare
Failure unrelated: swift |
Backported the user facing stuff in #8779 |
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.
External storages shows group id, i'm okay if this gets adjusted in a follow up PR though.
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.
Lets do this and fix other occurences when we find them
Need someone with better JS/select2 skills to solve this.
Good patch for testing
Fixes #742