[MM-53102] Add support for multi-word highlights without notifications in web (#24050)

- Adds a new section under settings/notifications for adding custom multi-word keywords that get highlighted without notification
- Adds a new classname for highlighting words although the styling is the same as mentions highlights
- Added a few components to the ReduxFromProps pattern
- Adds supported type for the hook of PluginComponent type
- Add upsell for highlight without notification
- Moved 'setting_item.tsx' to the components folder
- Improved prop names and function structure for setting_item, setting_item_max and setting_item_min
- Moved 'toggle_modal_button.tsx' to the components folder
- Removed t and utility messages from a few components
- Fixed bug where the tooltip was not getting rendered on restrictedButtons
- Improved the mobile view of the settings modal
- Adds E2E for the feature
Этот коммит содержится в:
M-ZubairAhmed
2023-11-11 19:33:28 +05:30
коммит произвёл GitHub
родитель 48bf4e9bd8
Коммит 9ac389f506
101 изменённых файлов: 3145 добавлений и 1477 удалений

Просмотреть файл

@@ -13,17 +13,18 @@ import (
type MattermostFeature string
const (
PaidFeatureGuestAccounts = MattermostFeature("mattermost.feature.guest_accounts")
PaidFeatureCustomUsergroups = MattermostFeature("mattermost.feature.custom_user_groups")
PaidFeatureCreateMultipleTeams = MattermostFeature("mattermost.feature.create_multiple_teams")
PaidFeatureStartcall = MattermostFeature("mattermost.feature.start_call")
PaidFeaturePlaybooksRetrospective = MattermostFeature("mattermost.feature.playbooks_retro")
PaidFeatureUnlimitedMessages = MattermostFeature("mattermost.feature.unlimited_messages")
PaidFeatureUnlimitedFileStorage = MattermostFeature("mattermost.feature.unlimited_file_storage")
PaidFeatureAllProfessionalfeatures = MattermostFeature("mattermost.feature.all_professional")
PaidFeatureAllEnterprisefeatures = MattermostFeature("mattermost.feature.all_enterprise")
UpgradeDowngradedWorkspace = MattermostFeature("mattermost.feature.upgrade_downgraded_workspace")
PluginFeature = MattermostFeature("mattermost.feature.plugin")
PaidFeatureGuestAccounts = MattermostFeature("mattermost.feature.guest_accounts")
PaidFeatureCustomUsergroups = MattermostFeature("mattermost.feature.custom_user_groups")
PaidFeatureCreateMultipleTeams = MattermostFeature("mattermost.feature.create_multiple_teams")
PaidFeatureStartcall = MattermostFeature("mattermost.feature.start_call")
PaidFeaturePlaybooksRetrospective = MattermostFeature("mattermost.feature.playbooks_retro")
PaidFeatureUnlimitedMessages = MattermostFeature("mattermost.feature.unlimited_messages")
PaidFeatureUnlimitedFileStorage = MattermostFeature("mattermost.feature.unlimited_file_storage")
PaidFeatureAllProfessionalfeatures = MattermostFeature("mattermost.feature.all_professional")
PaidFeatureAllEnterprisefeatures = MattermostFeature("mattermost.feature.all_enterprise")
UpgradeDowngradedWorkspace = MattermostFeature("mattermost.feature.upgrade_downgraded_workspace")
PluginFeature = MattermostFeature("mattermost.feature.plugin")
PaidFeatureHighlightWithoutNotification = MattermostFeature("mattermost.feature.highlight_without_notification")
)
var validSKUs = map[string]struct{}{
@@ -33,16 +34,17 @@ var validSKUs = map[string]struct{}{
// These are the features a non admin would typically ping an admin about
var paidFeatures = map[MattermostFeature]struct{}{
PaidFeatureGuestAccounts: {},
PaidFeatureCustomUsergroups: {},
PaidFeatureCreateMultipleTeams: {},
PaidFeatureStartcall: {},
PaidFeaturePlaybooksRetrospective: {},
PaidFeatureUnlimitedMessages: {},
PaidFeatureUnlimitedFileStorage: {},
PaidFeatureAllProfessionalfeatures: {},
PaidFeatureAllEnterprisefeatures: {},
UpgradeDowngradedWorkspace: {},
PaidFeatureGuestAccounts: {},
PaidFeatureCustomUsergroups: {},
PaidFeatureCreateMultipleTeams: {},
PaidFeatureStartcall: {},
PaidFeaturePlaybooksRetrospective: {},
PaidFeatureUnlimitedMessages: {},
PaidFeatureUnlimitedFileStorage: {},
PaidFeatureAllProfessionalfeatures: {},
PaidFeatureAllEnterprisefeatures: {},
UpgradeDowngradedWorkspace: {},
PaidFeatureHighlightWithoutNotification: {},
}
type NotifyAdminToUpgradeRequest struct {

Просмотреть файл

@@ -36,6 +36,7 @@ const (
ChannelMentionsNotifyProp = "channel"
CommentsNotifyProp = "comments"
MentionKeysNotifyProp = "mention_keys"
HighlightsNotifyProp = "highlight_keys"
CommentsNotifyNever = "never"
CommentsNotifyRoot = "root"
CommentsNotifyAny = "any"