Content flagging systems console settings (#31411)
* Added enable/disable setting and feature flag * added rest of notifgication settings * Added backend for content flagging setting and populated notification values from server side defaults * WIP user selector * Added common reviewers UI * Added additonal reviewers section * WIP * WIP * Team table base * Added search in teams * Added search in teams * Added additional settings section * WIP * Inbtegrated reviewers settings * WIP * WIP * Added server side validation * cleanup * cleanup * [skip ci] * Some refactoring * type fixes * lint fix * test: add content flagging settings test file * test: add comprehensive unit tests for content flagging settings * enhanced tests * test: add test file for content flagging additional settings * test: add comprehensive unit tests for ContentFlaggingAdditionalSettingsSection * Added additoonal settings test * test: add empty test file for team reviewers section * test: add comprehensive unit tests for TeamReviewersSection component * test: update tests to handle async data fetching in team reviewers section * test: add empty test file for content reviewers component * feat: add comprehensive unit tests for ContentFlaggingContentReviewers component * Added ContentFlaggingContentReviewersContentFlaggingContentReviewers test * test: add notification settings test file for content flagging * test: add comprehensive unit tests for content flagging notification settings * Added ContentFlaggingNotificationSettingsSection tests * test: add user profile pill test file * test: add comprehensive unit tests for UserProfilePill component * refactor: Replace enzyme shallow with renderWithContext in user_profile_pill tests * Added UserProfilePill tests * test: add empty test file for content reviewers team option * test: add comprehensive unit tests for TeamOptionComponent * Added TeamOptionComponent tests * test: add empty test file for reason_option component * test: add comprehensive unit tests for ReasonOption component * Added ReasonOption tests * cleanup * Fixed i18n error * fixed e2e test lijnt issues * Updated test cases * Added snaoshot * Updated snaoshot * lint fix * lint fix * review fixes * updated snapshot * CI * Review fixes * Removed an test, updated comment * CI * Test update
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
254f641182
Коммит
d1e5fdea2c
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import type {ContentFlaggingEvent, NotificationTarget} from './content_flagging';
|
||||
|
||||
export type ClientConfig = {
|
||||
AboutLink: string;
|
||||
AllowBannerDismissal: string;
|
||||
@@ -990,6 +992,36 @@ export type AccessControlSettings = {
|
||||
EnableChannelScopeAccessControl: boolean;
|
||||
};
|
||||
|
||||
export type ContentFlaggingNotificationSettings = {
|
||||
ReviewerSettings: ContentFlaggingReviewerSetting;
|
||||
EventTargetMapping: Record<ContentFlaggingEvent, NotificationTarget[]>;
|
||||
AdditionalSettings: ContentFlaggingAdditionalSettings;
|
||||
}
|
||||
|
||||
export type TeamReviewerSetting = {
|
||||
Enabled: boolean;
|
||||
ReviewerIds: string[];
|
||||
}
|
||||
|
||||
export type ContentFlaggingReviewerSetting = {
|
||||
CommonReviewers: boolean;
|
||||
CommonReviewerIds: string[];
|
||||
TeamReviewersSetting: Record<string, TeamReviewerSetting>;
|
||||
SystemAdminsAsReviewers: boolean;
|
||||
TeamAdminsAsReviewers: boolean;
|
||||
}
|
||||
|
||||
export type ContentFlaggingAdditionalSettings = {
|
||||
Reasons: string[];
|
||||
ReporterCommentRequired: boolean;
|
||||
ReviewerCommentRequired: boolean;
|
||||
HideFlaggedContent: boolean;
|
||||
}
|
||||
|
||||
export type ContentFlaggingSettings = {
|
||||
NotificationSettings: ContentFlaggingNotificationSettings;
|
||||
}
|
||||
|
||||
export type AdminConfig = {
|
||||
ServiceSettings: ServiceSettings;
|
||||
TeamSettings: TeamSettings;
|
||||
@@ -1036,6 +1068,7 @@ export type AdminConfig = {
|
||||
WranglerSettings: WranglerSettings;
|
||||
ConnectedWorkspacesSettings: ConnectedWorkspacesSettings;
|
||||
AccessControlSettings: AccessControlSettings;
|
||||
ContentFlaggingSettings: ContentFlaggingSettings;
|
||||
};
|
||||
|
||||
export type ReplicaLagSetting = {
|
||||
|
||||
6
webapp/platform/types/src/content_flagging.ts
Обычный файл
6
webapp/platform/types/src/content_flagging.ts
Обычный файл
@@ -0,0 +1,6 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
export type ContentFlaggingEvent = 'flagged' | 'assigned' | 'removed' | 'dismissed';
|
||||
|
||||
export type NotificationTarget = 'reviewers' | 'author' | 'reporter';
|
||||
Ссылка в новой задаче
Block a user