-
Notifications
You must be signed in to change notification settings - Fork 356
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
[CORL-296]7 view conversation rejection reasons #4405
[CORL-296]7 view conversation rejection reasons #4405
Conversation
position modal
…conversation-rejection-reasons
✅ Deploy Preview for gallant-galileo-14878c canceled.
|
@@ -131,7 +133,8 @@ async function moderateComments( | |||
filter: FilterQuery<Comment>, | |||
targetStatus: GQLCOMMENT_STATUS, | |||
now: Date, | |||
isArchived = false | |||
isArchived = false, | |||
rejectionReason?: Moderate["rejectionReason"] |
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.
Should the type here be GQLRejectionReason
?
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 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.
Looks good!
isArchived, | ||
{ | ||
code: GQLREJECTION_REASON_CODE.OTHER, | ||
detailedExplanation: "User account deleted", |
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 can translate this using the following:
import { I18n, translate } from "coral-server/services/i18n";
...
const text = "User account deleted";
const key = "common-userDeletion-userAccountDeleted";
const args = {};
const bundle = this.i18n.getBundle(tenant.locale);
const result = translate(bundle, text, key, args);
Then the translations for this can be specified in common.ftl
under server/src/core/server/lcoales/en-US
.
What does this PR do?
This PR fixes a bug in which the moderation reasons modal doesn't close after seelcting a reason when in the user drawer. It also updates the user deletion flow to include comment rejection reasons when rejecting the deleted users comments.
These changes will impact:
What changes to the GraphQL/Database Schema does this PR introduce?
None.
Does this PR introduce any new environment variables or feature flags?
No.
If any indexes were added, were they added to
INDEXES.md
?n/a
How do I test this PR?
Navigate to a user drawer for any usera as an user with mod privileges, with DSA enabled. Reject a comment from the drawer. Observe that a reason is requried, and when one is supplied, the Moderation Reason modal closes.
Find a user with comments with no replies. As that user, request that your account be deleted. In the database, set the scheduled deletion time to something soon. Observe that the account is successfully deteleted, and the comments with no replies are rejected, and the resulting CommentModerationActions specify a reason.
Where any tests migrated to React Testing Library?
No