status-desktop
status-desktop copied to clipboard
feat(GroupChats): Implemented group admin permissions
Closes #5941 Depends on: https://github.com/status-im/StatusQ/pull/860
What does the PR do
Implements group admin permissions
Affected areas
Group chats
Screenshot of functionality (including design for compari
https://user-images.githubusercontent.com/31625338/185178867-98f09194-f930-4b48-9905-ae24d59cea61.mov
Jenkins Builds
Click to see older builds (13)
:grey_question: | Commit | :hash: | Finished (UTC) | Duration | Platform | Result |
---|---|---|---|---|---|---|
:heavy_check_mark: | 30021936 | #1 | 2022-08-17 15:27:40 | ~8 min | macos |
:package:dmg |
:heavy_check_mark: | 30021936 | #1 | 2022-08-17 15:31:21 | ~12 min | linux |
:package:tgz |
:x: | 30021936 | #1 | 2022-08-17 15:36:57 | ~18 min | e2e |
:page_facing_up:log |
:heavy_check_mark: | 30021936 | #1 | 2022-08-17 15:41:06 | ~22 min | windows |
:package:exe |
:interrobang: | 050a0b0f | #1 | 2022-09-05 08:34:13 | ~4 min | linux-cpp |
:page_facing_up:log |
:heavy_check_mark: | 050a0b0f | #2 | 2022-09-05 08:38:19 | ~8 min | macos |
:package:dmg |
:heavy_check_mark: | 050a0b0f | #2 | 2022-09-05 08:40:39 | ~11 min | linux |
:package:tgz |
:heavy_check_mark: | 050a0b0f | #2 | 2022-09-05 08:54:41 | ~25 min | windows |
:package:exe |
:interrobang: | 06f120fd | #2 | 2022-09-06 10:55:14 | ~13 min | linux-cpp |
:page_facing_up:log |
:heavy_check_mark: | 06f120fd | #3 | 2022-09-06 10:56:52 | ~14 min | macos |
:package:dmg |
:heavy_check_mark: | 06f120fd | #3 | 2022-09-06 11:04:36 | ~22 min | linux |
:package:tgz |
:heavy_check_mark: | 06f120fd | #3 | 2022-09-06 11:07:15 | ~25 min | windows |
:package:exe |
:x: | 06f120fd | #3 | 2022-09-06 12:22:34 | ~56 min | e2e |
:page_facing_up:log |
:grey_question: | Commit | :hash: | Finished (UTC) | Duration | Platform | Result |
---|---|---|---|---|---|---|
:interrobang: | 14170dda | #3 | 2022-09-06 14:39:02 | ~5 min | linux-cpp |
:page_facing_up:log |
:heavy_check_mark: | 14170dda | #4 | 2022-09-06 14:45:15 | ~11 min | linux |
:package:tgz |
:heavy_check_mark: | 14170dda | #4 | 2022-09-06 14:53:36 | ~19 min | macos |
:package:dmg |
:heavy_check_mark: | 14170dda | #4 | 2022-09-06 14:58:03 | ~23 min | windows |
:package:exe |
:interrobang: | 18b16b5d | #4 | 2022-09-08 14:23:20 | ~5 min | linux-cpp |
:page_facing_up:log |
:heavy_check_mark: | 18b16b5d | #5 | 2022-09-08 14:30:21 | ~11 min | macos |
:package:dmg |
:heavy_check_mark: | 18b16b5d | #5 | 2022-09-08 14:30:29 | ~12 min | linux |
:package:tgz |
:heavy_check_mark: | 18b16b5d | #5 | 2022-09-08 14:42:36 | ~24 min | windows |
:package:exe |
This looks really cool! Only thing that jumps straight into my face is that the scrollable area inside of the tag list seems to be too small. There's a lot of empty space left in the input that could be used to render the tags.
Issues Found
1. CLOSED (CANNOT REPLICATE) When starting chat pill is missing remove button if selected from dropdown
Actual
2. MOVED | On To field, pressing enter with the dropdown open creates a pill with no contact
Moved to https://github.com/status-im/status-desktop/issues/7234
Actual
3. MOVED | When multiple contacts are displayed in drop-down it is not possible to use arrow keys to select one
Moved to https://github.com/status-im/status-desktop/issues/7235
Actual
4. MOVED After clicking on "Add to group" 1 of 2 non contacts are shown using username instead of display name
Moved to https://github.com/status-im/status-desktop/issues/7236
Actual
5. OPEN After clicking on "Add to group" 2 contacts are shown with the X to remove icon in pill
Actual
6. OPEN After clicking on "Add to group" the pills are blue despite them not being editable
Actual
7. MOVED At minimum width it is not possible to view/edit all users in the field with either keyboard or mouse
Moved to https://github.com/status-im/status-desktop/issues/7237
Actual
8. MOVED There is a large margin on the right hand side of the field (even when max user label is not shown)
Moved to https://github.com/status-im/status-desktop/issues/7238
Actual
9. MOVED Dropdown does not always align under current cursor position
Moved to https://github.com/status-im/status-desktop/issues/7239
Actual
10. MOVED 5 user limit is not enforced
Moved to https://github.com/status-im/status-desktop/issues/7240
Expected
Actual
Other observations:
- It is not possible to right click to paste into the To field
- It is not possible to highlight text in the To field with a mouse
- After adding or removing users the default group name may no longer be accurate
This looks really cool! Only thing that jumps straight into my face is that the scrollable area inside of the tag list seems to be too small. There's a lot of empty space left in the input that could be used to render the tags.
@PascalPrecht could you please open a new issue for that? I think @glitchminer is mentioning it as well.
@glitchminer issues 5,6 should be fixed. Issues 2,3, 7, 8, 9, 10 are not relevant to https://github.com/status-im/status-desktop/issues/5941, so could you please open new issues for these? Issue 1: there is no requirement that admin is on the names list when opening to create a new group chat see https://www.figma.com/file/17fc13UBFvInrLgNUKJJg5/Kuba%E2%8E%9CDesktop?node-id=391%3A99912. Issue 4, please check again it might be that not all users have set a display name, in this case the username appears.
Hi @alexandraB99, retested and issue 5 and 6 appear unresolved. A user who is not admin is still seeing other users in blue and is still given the cross to remove. If it's not possible to resolve in this one, the missing display names can be moved with issue 4.
@alexandraB99, per comment, I've created and moved the following issues: 2. https://github.com/status-im/status-desktop/issues/7234 3. https://github.com/status-im/status-desktop/issues/7235 4. https://github.com/status-im/status-desktop/issues/7236 7. https://github.com/status-im/status-desktop/issues/7237 8. https://github.com/status-im/status-desktop/issues/7238 9. https://github.com/status-im/status-desktop/issues/7239 10. https://github.com/status-im/status-desktop/issues/7240
1, 5 and 6 remain open. I know you mentioned issues 1 above but it's actually regarding the close button not appearing when it should, not about the admin user.
@alexandraB99 Looks like @glitchminer beat me to it: https://github.com/status-im/status-desktop/issues/7238
Hi @alexandraB99, retested and issue 5 and 6 appear unresolved. A user who is not admin is still seeing other users in blue and is still given the cross to remove. If it's not possible to resolve in this one, the missing display names can be moved with issue 4.
@glitchminer thanks for re-testing! issues 1, 5 and 6 should be fixed now. As about the empty display names is it reported in a separate issue?
Hi @alexandraB99, regarding 5 & 6 is it expected that a user should be able to remove themselves from the group via this mechanism?
Issue 1 is now closed.
Empty display names are covered by https://github.com/status-im/status-desktop/issues/7236
Hi @alexandraB99, regarding 5 & 6 is it expected that a user should be able to remove themselves from the group via this mechanism?
Issue 1 is now closed.
Empty display names are covered by #7236
@glitchminer I think yes, from the requirements in the issue:
When a user who is not an admin enters the 'edit mode', all users who are already in the chat are represented by grey pillis without an "X".
only the other users shouldn't have a "x".
@glitchminer I think yes, from the requirements in the issue:
When a user who is not an admin enters the 'edit mode', all users who are already in the chat are represented by grey pillis without an "X".
only the other users shouldn't have a "x".
Thanks @alexandraB99, looking at that now. To me, it doesn't specifically say that the non-admin user has a separate behavior from "all users..". I'd expect them all to be grey. Also, the current behaviour when a non-admin user removes themselves like this is different from "Leave group" function.
- Leave group: Group chat immediately closes and is removed from sidebar
- Remove button on pill: Group chat remains open with previous messages visible
@glitchminer I think yes, from the requirements in the issue:
When a user who is not an admin enters the 'edit mode', all users who are already in the chat are represented by grey pillis without an "X".
only the other users shouldn't have a "x".
Thanks @alexandraB99, looking at that now. To me, it doesn't specifically say that the non-admin user has a separate behavior from "all users..". I'd expect them all to be grey. Also, the current behaviour when a non-admin user removes themselves like this is different from "Leave group" function.
* Leave group: Group chat immediately closes and is removed from sidebar * Remove button on pill: Group chat remains open with previous messages visible
@John-44 could we have some clarifications here?
Also one more question, when opening the panel to create a new group, should the admin pill be present?
In an ad-hoc group chat, there is no such thing as 'all users', a user is either an 'admin of the ad-hoc group chat' or 'not an admin of the ad-hoc group chat'.
When a user who is 'not an admin of the ad-hoc group chat' opens this edit mode, they can add new users to the ad-hoc group chat (as long as those users are mutual contacts, and as long as the total number of people in the ad-hoc group chat does not exceed the max number of participants).
This means that when a user who is 'not an admin of the ad-hoc group chat' opens this edit mode, all existing members of the ad-hoc group chat should have grey pills without an 'X'. When the user who is 'not an admin of the ad-hoc group chat' adds more users, they should be displayed as blue pills with an 'X' until the user hits 'Confirm'. If after adding users and then exiting the edit mode, the same user who is 'not an admin of the ad-hoc group chat' opens edit mode again, they should see all current members of the ad-hoc group chat (including those that user added previously) displayed as grey pills without an 'X'.
This is because users who are not 'not an admin of the ad-hoc group chat' can add mutual contacts to the group chat, but only the admin of that ad-hoc group chat can remove users after they are added.
@alexandraB99 does this answer your question? cc'ing @osmaczko
@alexandraB99 there is a PR that addresses all the issues related to members selector. I have removed GroupChatPanel
because it is unmaintainable with its imperative filtering and sorting. Also if you take a look at the console there are a lot of warnings from StatusTagSelector
because of incompatible models - the names model is not compatible with the delegate that expects a complete user model with properties like displayName, localNickname, isContact, etc.
I am not sure if you should focus on finalizing this PR because GroupChatPanel
will get removed eventually. Also mentioned PR covers task you are working on.
@alexandraB99 there is a PR that addresses all the issues related to members selector. I have removed
GroupChatPanel
because it is unmaintainable with its imperative filtering and sorting. Also if you take a look at the console there are a lot of warnings fromStatusTagSelector
because of incompatible models - the names model is not compatible with the delegate that expects a complete user model with properties like displayName, localNickname, isContact, etc.I am not sure if you should focus on finalizing this PR because
GroupChatPanel
will get removed eventually. Also mentioned PR covers task you are working on.
@osmaczko good to know, closing this PR as it's not relevant anymore.