mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-48014] Auto-enable Apps Bar by moving EnableAppBar setting to DisableAppBar (#23010)
* auto-enable Apps Bar by moving EnableAppBar setting to DisableAppBar * update playwright config * remove EnableAppBar config setting to avoid confusion * small fixes --------- Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
This commit is contained in:
parent
747b4cf26c
commit
d403c034d4
@ -370,7 +370,7 @@
|
||||
"LinkMetadataTimeoutMilliseconds": 5000,
|
||||
"RestrictSystemAdmin": false,
|
||||
"UseNewSAMLLibrary": false,
|
||||
"EnableAppBar": true
|
||||
"DisableAppBar": false
|
||||
},
|
||||
"AnalyticsSettings": {
|
||||
"MaxUsersForStatistics": 2500
|
||||
|
@ -36,7 +36,7 @@ const onPremServerConfig = (): Partial<TestAdminConfig> => {
|
||||
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,
|
||||
},
|
||||
|
@ -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)
|
||||
|
@ -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 {
|
||||
|
@ -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,
|
||||
})
|
||||
|
@ -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 {
|
||||
|
@ -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)),
|
||||
|
@ -165,4 +165,167 @@ exports[`components/app_bar/app_bar should match snapshot on mount 1`] = `
|
||||
</AppBar>
|
||||
`;
|
||||
|
||||
exports[`components/app_bar/app_bar should match snapshot on mount when App Bar is disabled 1`] = `<AppBar />`;
|
||||
exports[`components/app_bar/app_bar should match snapshot on mount when App Bar is disabled 1`] = `
|
||||
<AppBar>
|
||||
<div
|
||||
className="app-bar"
|
||||
>
|
||||
<div
|
||||
className="app-bar__top"
|
||||
>
|
||||
<AppBarPluginComponent
|
||||
component={
|
||||
Object {
|
||||
"action": [MockFunction],
|
||||
"icon": "fallback_component",
|
||||
"id": "the_component_id",
|
||||
"pluginId": "playbooks",
|
||||
"tooltipText": "Playbooks Tooltip",
|
||||
}
|
||||
}
|
||||
key="the_component_id"
|
||||
>
|
||||
<OverlayTrigger
|
||||
defaultOverlayShown={false}
|
||||
delayShow={400}
|
||||
overlay={
|
||||
<Tooltip
|
||||
bsClass="tooltip"
|
||||
id="pluginTooltip-app-bar-icon-playbooks"
|
||||
placement="right"
|
||||
>
|
||||
<span>
|
||||
Playbooks Tooltip
|
||||
</span>
|
||||
</Tooltip>
|
||||
}
|
||||
placement="left"
|
||||
trigger={
|
||||
Array [
|
||||
"hover",
|
||||
"focus",
|
||||
]
|
||||
}
|
||||
>
|
||||
<OverlayTrigger
|
||||
defaultOverlayShown={false}
|
||||
delayShow={400}
|
||||
overlay={
|
||||
<OverlayWrapper
|
||||
bsClass="tooltip"
|
||||
id="pluginTooltip-app-bar-icon-playbooks"
|
||||
intl={null}
|
||||
placement="right"
|
||||
>
|
||||
<span>
|
||||
Playbooks Tooltip
|
||||
</span>
|
||||
</OverlayWrapper>
|
||||
}
|
||||
placement="left"
|
||||
trigger={
|
||||
Array [
|
||||
"hover",
|
||||
"focus",
|
||||
]
|
||||
}
|
||||
>
|
||||
<div
|
||||
className="app-bar__icon"
|
||||
id="app-bar-icon-playbooks"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
>
|
||||
<div
|
||||
className="app-bar__old-icon app-bar__icon-inner app-bar__icon-inner--centered"
|
||||
>
|
||||
fallback_component
|
||||
</div>
|
||||
</div>
|
||||
</OverlayTrigger>
|
||||
</OverlayTrigger>
|
||||
</AppBarPluginComponent>
|
||||
<hr
|
||||
className="app-bar__divider"
|
||||
key="divider"
|
||||
/>
|
||||
<AppBarBinding
|
||||
binding={
|
||||
Object {
|
||||
"app_id": "com.mattermost.zendesk",
|
||||
"label": "Create Subscription",
|
||||
}
|
||||
}
|
||||
key="com.mattermost.zendesk_Create Subscription"
|
||||
>
|
||||
<OverlayTrigger
|
||||
defaultOverlayShown={false}
|
||||
delayShow={400}
|
||||
overlay={
|
||||
<Tooltip
|
||||
bsClass="tooltip"
|
||||
id="tooltip-app-bar-icon-com.mattermost.zendesk"
|
||||
placement="right"
|
||||
>
|
||||
<span>
|
||||
Create Subscription
|
||||
</span>
|
||||
</Tooltip>
|
||||
}
|
||||
placement="left"
|
||||
trigger={
|
||||
Array [
|
||||
"hover",
|
||||
"focus",
|
||||
]
|
||||
}
|
||||
>
|
||||
<OverlayTrigger
|
||||
defaultOverlayShown={false}
|
||||
delayShow={400}
|
||||
overlay={
|
||||
<OverlayWrapper
|
||||
bsClass="tooltip"
|
||||
id="tooltip-app-bar-icon-com.mattermost.zendesk"
|
||||
intl={null}
|
||||
placement="right"
|
||||
>
|
||||
<span>
|
||||
Create Subscription
|
||||
</span>
|
||||
</OverlayWrapper>
|
||||
}
|
||||
placement="left"
|
||||
trigger={
|
||||
Array [
|
||||
"hover",
|
||||
"focus",
|
||||
]
|
||||
}
|
||||
>
|
||||
<div
|
||||
aria-label="Create Subscription"
|
||||
className="app-bar__icon"
|
||||
id="app-bar-icon-com.mattermost.zendesk"
|
||||
onBlur={[Function]}
|
||||
onClick={[Function]}
|
||||
onFocus={[Function]}
|
||||
onMouseOut={[Function]}
|
||||
onMouseOver={[Function]}
|
||||
>
|
||||
<div
|
||||
className="app-bar__icon-inner"
|
||||
>
|
||||
<img />
|
||||
</div>
|
||||
</div>
|
||||
</OverlayTrigger>
|
||||
</OverlayTrigger>
|
||||
</AppBarBinding>
|
||||
</div>
|
||||
</div>
|
||||
</AppBar>
|
||||
`;
|
||||
|
@ -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(
|
||||
<AppBar/>,
|
||||
@ -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',
|
||||
|
@ -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",
|
||||
|
@ -32,7 +32,7 @@ export const appBarEnabled = createSelector(
|
||||
'appBarEnabled',
|
||||
(state: GlobalState) => getConfig(state),
|
||||
(config?: Partial<ClientConfig>) => {
|
||||
return config?.EnableAppBar === 'true';
|
||||
return config?.DisableAppBar === 'false';
|
||||
},
|
||||
);
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user