-
Notifications
You must be signed in to change notification settings - Fork 232
Change : RoomMember moderation #4779
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
|
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4779 +/- ##
===========================================
- Coverage 80.42% 80.37% -0.06%
===========================================
Files 2144 2149 +5
Lines 56771 56855 +84
Branches 7120 7128 +8
===========================================
+ Hits 45660 45696 +36
- Misses 8674 8713 +39
- Partials 2437 2446 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your 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.
LGTM and tested OK using the CI build. Thanks!
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.
I do not see such disabled state on the Figma. Is it OK?
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.
Yes, it's not designed but this has been discussed in the room.
|
||
dependencies { | ||
implementation(projects.libraries.architecture) | ||
implementation(projects.libraries.designsystem) |
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.
I think this dependency can be removed.
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, it's used
dependencies { | ||
implementation(projects.libraries.architecture) | ||
implementation(projects.libraries.designsystem) | ||
implementation(projects.libraries.uiStrings) |
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.
I think this dependency can be removed.
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, it's used
@@ -0,0 +1,21 @@ | |||
/* | |||
* Copyright 2025 New Vector Ltd. |
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.
2025? There are other new files with 2024. This is maybe because some files has been moved and git see them as new files and previous files as deleted files?
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.
I think it should be 2025 for all files in this module, as I've rewritten all the code in the end.
} | ||
if (canBan) { | ||
if (membership == RoomMembershipState.BAN) { | ||
add(ModerationActionState(action = ModerationAction.UnbanUser, isEnabled = canModerateThisUser)) |
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.
Sorry, I have forgotten: the code coverage is decreasing a bit, maybe cover this line by a unit test?
|
Content
Extract and rework the RoomMember moderation bottomsheet so you can kick, ban/unban a user/member
Now the BottomSheet will always be displayed, even if the only available action is "View profile".
If you have the power level to kick/ban, the action will be displayed, either enabled or disabled, following the other member power level. In case the other member can't be fetched (in big public room it can be very slow), then we assume we have the power to do the actions.
We'll probably add some actions later, so maybe the name
Moderation
will be changed.Motivation and context
Closes #4555
Screenshots / GIFs
Tests
Tested devices
Checklist