-
-
Notifications
You must be signed in to change notification settings - Fork 829
Add leave room warning for last admin #9452
Conversation
If the last room administrator leaves a room, other users cannot gain admin privilges anymore, leaving the room in an unmoderable state. To help in avoiding this scenario without actually preventing an admin from leaving the room if they really want, this commit adds a new warning message. Attempts to help with: element-hq/element-web#2855 Signed-off-by: Arne Wilken arnepokemon@yahoo.de
Hey @Arnei thanks for your contribution, any chance of satisfying the code coverage test requirement? |
Hi @t3chguy, I could not find a related test suite for this. Could you point me to it or to another test suite that would be a good example for this? |
Actually I take it back, MatrixChat is currently too indebted to be tested, you can skip it for now. The web app team have plans to fix the situation. Just please resolve merge conflicts. |
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.
This will need a signoff from the design team - could you please add a screenshot of the warning to make it easier for them to review the copy?
getContent already does the || {} step Co-authored-by: Robin <robin@robin.town>
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.
The code looks good, just waiting on design now.
Would it be rude to ping Design for their opinion? |
<span className="warning" key="last_admin_warning"> | ||
{ ' '/* Whitespace, otherwise the sentences get smashed together */ } | ||
{ _t("You are the sole person with the highest role in this room. " + | ||
"If you leave, the room could become unmoderable. Consider giving " + |
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.
unmoderable
doesn't feel like a word. unmoderatable
sounds better to me but I also don't see it as a real word so probably need to rearrange the prose to accommodate proper English. Perhaps:
"If you leave, the room might not be able to be moderated anymore."
Switches out a made-up word for a real phrase.
Discussed the content with @americanrefugee and here's our suggestion... Headline: Body copy: Consider making someone else <an administrator/ a moderator> before you go. We'd use this copy for both cases as an admin or moderator leaving a private room should know that it's private and should know the circumstances needed for re-entry. It would also be great if we could make that button red instead of green :) |
@daniellekirkwood I think you probably meant to @ the Aaron that works at Element :) |
I'm so sorry! Yes I did :) |
I've resolved the conflicts and incorporated the copy from the feedback, with separate text for the admin / mod case. I left the title as-is because I think this might need splitting out from the general "leave room" action, and not sure if it also wants to apply to the case when there aren't warnings? The type utils file got deleted and we just don't have these kind of type checks in react-sdk (for better or worse) so I've just inlined it. Also put it in strong tags for consistency with the other warnings. Screenshots updated. Probably wants eyes from someone else to check my work. |
@dbkr can you update the screenshots? |
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.
seems plausible.
The coverage gate is, of course, complaining, but I won't insist on it being fixed.
Screenshots should be updated? And yeah, seems like we'd already decided it was okay without the coverage tests. |
If the last room administrator leaves a room, other users cannot gain admin privilges anymore, leaving the room in an unmoderable state. To help in avoiding this scenario without actually preventing an admin from leaving the room if they really want, this commit adds a new warning message.
Attempts to help with: element-hq/element-web#2855
Screenshots as recommended by robintown
With no warnings:
With warnings:
Signed-off-by: Arne Wilken arnepokemon@yahoo.de
type: enhancement
Here's what your changelog entry will look like:
✨ Features