diff --git a/e2e-tests/cypress/tests/support/api/on_prem_default_config.json b/e2e-tests/cypress/tests/support/api/on_prem_default_config.json index 1f397e1cc29..43141ca38d7 100644 --- a/e2e-tests/cypress/tests/support/api/on_prem_default_config.json +++ b/e2e-tests/cypress/tests/support/api/on_prem_default_config.json @@ -370,7 +370,7 @@ "LinkMetadataTimeoutMilliseconds": 5000, "RestrictSystemAdmin": false, "UseNewSAMLLibrary": false, - "EnableAppBar": true + "DisableAppBar": false }, "AnalyticsSettings": { "MaxUsersForStatistics": 2500 diff --git a/e2e-tests/playwright/support/server/default_config.ts b/e2e-tests/playwright/support/server/default_config.ts index 8c6467b437b..36004c218bb 100644 --- a/e2e-tests/playwright/support/server/default_config.ts +++ b/e2e-tests/playwright/support/server/default_config.ts @@ -36,7 +36,7 @@ const onPremServerConfig = (): Partial => { ClusterName: testConfig.haClusterName, }, ExperimentalSettings: { - EnableAppBar: true, + DisableAppBar: false, }, PasswordSettings: { MinimumLength: 5, @@ -534,7 +534,7 @@ const defaultServerConfig: AdminConfig = { UseNewSAMLLibrary: false, EnableSharedChannels: false, EnableRemoteClusterService: false, - EnableAppBar: false, + DisableAppBar: true, DisableRefetchingOnBrowserFocus: false, DelayChannelAutocomplete: false, }, diff --git a/server/config/client.go b/server/config/client.go index 95037e774bc..e0ddd6f75cc 100644 --- a/server/config/client.go +++ b/server/config/client.go @@ -55,7 +55,7 @@ func GenerateClientConfig(c *model.Config, telemetryID string, license *model.Li // This setting is only temporary, so keep using the old setting name for the mobile and web apps props["ExperimentalEnablePostMetadata"] = "true" - props["EnableAppBar"] = strconv.FormatBool(*c.ExperimentalSettings.EnableAppBar) + props["DisableAppBar"] = strconv.FormatBool(*c.ExperimentalSettings.DisableAppBar) props["ExperimentalEnableAutomaticReplies"] = strconv.FormatBool(*c.TeamSettings.ExperimentalEnableAutomaticReplies) props["ExperimentalTimezone"] = strconv.FormatBool(*c.DisplaySettings.ExperimentalTimezone) diff --git a/server/config/client_test.go b/server/config/client_test.go index 34af837d06a..2405d6281af 100644 --- a/server/config/client_test.go +++ b/server/config/client_test.go @@ -326,6 +326,19 @@ func TestGetClientConfig(t *testing.T) { "ExperimentalSharedChannels": "true", }, }, + { + "Disable App Bar", + &model.Config{ + ExperimentalSettings: model.ExperimentalSettings{ + DisableAppBar: model.NewBool(true), + }, + }, + "", + nil, + map[string]string{ + "DisableAppBar": "true", + }, + }, } for _, testCase := range testCases { diff --git a/server/platform/services/telemetry/telemetry.go b/server/platform/services/telemetry/telemetry.go index 455dbd90dc8..a2618c3043c 100644 --- a/server/platform/services/telemetry/telemetry.go +++ b/server/platform/services/telemetry/telemetry.go @@ -780,7 +780,7 @@ func (ts *TelemetryService) trackConfig() { "use_new_saml_library": *cfg.ExperimentalSettings.UseNewSAMLLibrary, "enable_shared_channels": *cfg.ExperimentalSettings.EnableSharedChannels, "enable_remote_cluster_service": *cfg.ExperimentalSettings.EnableRemoteClusterService && cfg.FeatureFlags.EnableRemoteClusterService, - "enable_app_bar": *cfg.ExperimentalSettings.EnableAppBar, + "enable_app_bar": !*cfg.ExperimentalSettings.DisableAppBar, "disable_refetching_on_browser_focus": *cfg.ExperimentalSettings.DisableRefetchingOnBrowserFocus, "delay_channel_autocomplete": *cfg.ExperimentalSettings.DelayChannelAutocomplete, }) diff --git a/server/public/model/config.go b/server/public/model/config.go index 9837a654188..df57ed765f3 100644 --- a/server/public/model/config.go +++ b/server/public/model/config.go @@ -996,7 +996,7 @@ type ExperimentalSettings struct { UseNewSAMLLibrary *bool `access:"experimental_features,cloud_restrictable"` EnableSharedChannels *bool `access:"experimental_features"` EnableRemoteClusterService *bool `access:"experimental_features"` - EnableAppBar *bool `access:"experimental_features"` + DisableAppBar *bool `access:"experimental_features"` DisableRefetchingOnBrowserFocus *bool `access:"experimental_features"` DelayChannelAutocomplete *bool `access:"experimental_features"` } @@ -1030,8 +1030,8 @@ func (s *ExperimentalSettings) SetDefaults() { s.EnableRemoteClusterService = NewBool(false) } - if s.EnableAppBar == nil { - s.EnableAppBar = NewBool(false) + if s.DisableAppBar == nil { + s.DisableAppBar = NewBool(false) } if s.DisableRefetchingOnBrowserFocus == nil { diff --git a/webapp/channels/src/components/admin_console/admin_definition.jsx b/webapp/channels/src/components/admin_console/admin_definition.jsx index 75845e939b8..eb717682de0 100644 --- a/webapp/channels/src/components/admin_console/admin_definition.jsx +++ b/webapp/channels/src/components/admin_console/admin_definition.jsx @@ -6953,11 +6953,11 @@ const AdminDefinition = { }, { type: Constants.SettingsTypes.TYPE_BOOL, - key: 'ExperimentalSettings.EnableAppBar', - label: t('admin.experimental.enableAppBar.title'), - label_default: 'Enable App Bar:', - help_text: t('admin.experimental.enableAppBar.desc'), - help_text_default: 'When true, all integrations move from the channel header to the App Bar. Channel header plugin icons that haven\'t explicitly registered an App Bar icon will be moved to the App Bar which may result in rendering issues. [See the documentation to learn more](https://docs.mattermost.com/welcome/what-changed-in-v70.html).', + key: 'ExperimentalSettings.DisableAppBar', + label: t('admin.experimental.disableAppBar.title'), + label_default: 'Disable Apps Bar:', + help_text: t('admin.experimental.disableAppBar.desc'), + help_text_default: 'When false, all integrations move from the channel header to the Apps Bar. Channel header plugin icons that haven\'t explicitly registered an Apps Bar icon will be moved to the Apps Bar which may result in rendering issues.', help_text_markdown: true, isHidden: it.licensedForFeature('Cloud'), isDisabled: it.not(it.userHasWritePermissionOnResource(RESOURCE_KEYS.EXPERIMENTAL.FEATURES)), diff --git a/webapp/channels/src/components/app_bar/__snapshots__/app_bar.test.tsx.snap b/webapp/channels/src/components/app_bar/__snapshots__/app_bar.test.tsx.snap index 528d89c4269..eda1e765c78 100644 --- a/webapp/channels/src/components/app_bar/__snapshots__/app_bar.test.tsx.snap +++ b/webapp/channels/src/components/app_bar/__snapshots__/app_bar.test.tsx.snap @@ -165,4 +165,167 @@ exports[`components/app_bar/app_bar should match snapshot on mount 1`] = ` `; -exports[`components/app_bar/app_bar should match snapshot on mount when App Bar is disabled 1`] = ``; +exports[`components/app_bar/app_bar should match snapshot on mount when App Bar is disabled 1`] = ` + +
+
+ + + + Playbooks Tooltip + + + } + placement="left" + trigger={ + Array [ + "hover", + "focus", + ] + } + > + + + Playbooks Tooltip + + + } + placement="left" + trigger={ + Array [ + "hover", + "focus", + ] + } + > +
+
+ fallback_component +
+
+
+
+
+
+ + + + Create Subscription + + + } + placement="left" + trigger={ + Array [ + "hover", + "focus", + ] + } + > + + + Create Subscription + + + } + placement="left" + trigger={ + Array [ + "hover", + "focus", + ] + } + > +
+
+ +
+
+
+
+
+
+
+
+`; diff --git a/webapp/channels/src/components/app_bar/app_bar.test.tsx b/webapp/channels/src/components/app_bar/app_bar.test.tsx index 3f8d429853f..b0e1e7b9d21 100644 --- a/webapp/channels/src/components/app_bar/app_bar.test.tsx +++ b/webapp/channels/src/components/app_bar/app_bar.test.tsx @@ -59,7 +59,7 @@ describe('components/app_bar/app_bar', () => { }, general: { config: { - EnableAppBar: 'true', + DisableAppBar: 'false', FeatureFlagAppsEnabled: 'true', } as any, }, @@ -142,7 +142,7 @@ describe('components/app_bar/app_bar', () => { }); test('should match snapshot on mount when App Bar is disabled', async () => { - mockState.entities.general.config.EnableAppBar = 'false'; + mockState.entities.general.config.DisableAppBar = 'false'; const wrapper = mount( , @@ -154,7 +154,7 @@ describe('components/app_bar/app_bar', () => { test('should not show marketplace if disabled or user does not have SYSCONSOLE_WRITE_PLUGINS permission', async () => { mockState.entities.general = { config: { - EnableAppBar: 'true', + DisableAppBar: 'true', FeatureFlagAppsEnabled: 'true', EnableMarketplace: 'true', PluginsEnabled: 'true', @@ -171,7 +171,7 @@ describe('components/app_bar/app_bar', () => { test('should show marketplace if enabled and user has SYSCONSOLE_WRITE_PLUGINS permission', async () => { mockState.entities.general = { config: { - EnableAppBar: 'true', + DisableAppBar: 'false', FeatureFlagAppsEnabled: 'true', EnableMarketplace: 'true', PluginsEnabled: 'true', diff --git a/webapp/channels/src/i18n/en.json b/webapp/channels/src/i18n/en.json index b6551f0aeb9..9b72fe08584 100644 --- a/webapp/channels/src/i18n/en.json +++ b/webapp/channels/src/i18n/en.json @@ -900,6 +900,8 @@ "admin.experimental.defaultTheme.title": "Default Theme:", "admin.experimental.delayChannelAutocomplete.desc": "When true, the autocomplete for channel links (such as ~town-square) will only trigger after typing a tilde followed by a couple letters. When false, the autocomplete will appear as soon as the user types a tilde.", "admin.experimental.delayChannelAutocomplete.title": "Delay Channel Autocomplete:", + "admin.experimental.disableAppBar.desc": "When false, all integrations move from the channel header to the Apps Bar. Channel header plugin icons that haven't explicitly registered an Apps Bar icon will be moved to the Apps Bar which may result in rendering issues.", + "admin.experimental.disableAppBar.title": "Disable Apps Bar:", "admin.experimental.disableRefetchingOnBrowserFocus.desc": "When true, Mattermost will not refetch channels and channel members when the browser regains focus. This may result in improved performance for users with many channels and channel members.", "admin.experimental.disableRefetchingOnBrowserFocus.title": "Disable data refetching on browser refocus:", "admin.experimental.emailBatchingBufferSize.desc": "Specify the maximum number of notifications batched into a single email.", @@ -914,8 +916,6 @@ "admin.experimental.emailSettingsLoginButtonColor.title": "Email Login Button Color:", "admin.experimental.emailSettingsLoginButtonTextColor.desc": "Specify the color of the email login button text for white labeling purposes. Use a hex code with a #-sign before the code. This setting only applies to the mobile apps.", "admin.experimental.emailSettingsLoginButtonTextColor.title": "Email Login Button Text Color:", - "admin.experimental.enableAppBar.desc": "When true, all integrations move from the channel header to the App Bar. Channel header plugin icons that haven't explicitly registered an App Bar icon will be moved to the App Bar which may result in rendering issues. [See the documentation to learn more](https://docs.mattermost.com/welcome/what-changed-in-v70.html).", - "admin.experimental.enableAppBar.title": "Enable App Bar:", "admin.experimental.enableChannelViewedMessages.desc": "This setting determines whether `channel_viewed` WebSocket events are sent, which synchronize unread notifications across clients and devices. Disabling the setting in larger deployments may improve server performance.", "admin.experimental.enableChannelViewedMessages.title": "Enable Channel Viewed WebSocket Messages:", "admin.experimental.enableOnboardingFlow.desc": "When true, new users are shown steps to complete as part of an onboarding process", diff --git a/webapp/channels/src/packages/mattermost-redux/src/selectors/entities/apps.ts b/webapp/channels/src/packages/mattermost-redux/src/selectors/entities/apps.ts index 556188f65af..e50a141e920 100644 --- a/webapp/channels/src/packages/mattermost-redux/src/selectors/entities/apps.ts +++ b/webapp/channels/src/packages/mattermost-redux/src/selectors/entities/apps.ts @@ -32,7 +32,7 @@ export const appBarEnabled = createSelector( 'appBarEnabled', (state: GlobalState) => getConfig(state), (config?: Partial) => { - return config?.EnableAppBar === 'true'; + return config?.DisableAppBar === 'false'; }, ); diff --git a/webapp/platform/types/src/config.ts b/webapp/platform/types/src/config.ts index 982c5256758..29453d1e55d 100644 --- a/webapp/platform/types/src/config.ts +++ b/webapp/platform/types/src/config.ts @@ -191,7 +191,7 @@ export type ClientConfig = { WebsocketSecurePort: string; WebsocketURL: string; ExperimentalSharedChannels: string; - EnableAppBar: string; + DisableAppBar: string; EnableComplianceExport: string; PostPriority: string; ReduceOnBoardingTaskList: string; @@ -738,7 +738,7 @@ export type ExperimentalSettings = { UseNewSAMLLibrary: boolean; EnableSharedChannels: boolean; EnableRemoteClusterService: boolean; - EnableAppBar: boolean; + DisableAppBar: boolean; DisableRefetchingOnBrowserFocus: boolean; DelayChannelAutocomplete: boolean; };