MM-44221: Add admin console setting to enable/disable App Bar (#20224)

* Revert "[MM-39820] Add AppBarEnabled feature flag (#18967)"

This reverts commit ba1b279c5f.

* Add EnableAppBar admin setting

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Alejandro García Montoro
2022-05-25 22:53:51 +02:00
коммит произвёл GitHub
родитель ea5bfe3fd9
Коммит b10ff1b1f7
4 изменённых файлов: 7 добавлений и 4 удалений

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

@@ -56,6 +56,7 @@ func GenerateClientConfig(c *model.Config, telemetryID string, license *model.Li
props["ExperimentalEnableClickToReply"] = strconv.FormatBool(*c.ExperimentalSettings.EnableClickToReply)
props["ExperimentalCloudBilling"] = strconv.FormatBool(*c.ExperimentalSettings.CloudBilling)
props["EnableAppBar"] = strconv.FormatBool(*c.ExperimentalSettings.EnableAppBar)
props["ExperimentalEnableAutomaticReplies"] = strconv.FormatBool(*c.TeamSettings.ExperimentalEnableAutomaticReplies)
props["ExperimentalTimezone"] = strconv.FormatBool(*c.DisplaySettings.ExperimentalTimezone)

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

@@ -949,6 +949,7 @@ type ExperimentalSettings struct {
CloudBilling *bool `access:"experimental_features,write_restrictable"`
EnableSharedChannels *bool `access:"experimental_features"`
EnableRemoteClusterService *bool `access:"experimental_features"`
EnableAppBar *bool `access:"experimental_features"`
}
func (s *ExperimentalSettings) SetDefaults() {
@@ -987,6 +988,10 @@ func (s *ExperimentalSettings) SetDefaults() {
if s.EnableRemoteClusterService == nil {
s.EnableRemoteClusterService = NewBool(false)
}
if s.EnableAppBar == nil {
s.EnableAppBar = NewBool(false)
}
}
type AnalyticsSettings struct {

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

@@ -25,9 +25,6 @@ type FeatureFlags struct {
// AppsEnabled toggles the Apps framework functionalities both in server and client side
AppsEnabled bool
// AppBarEnabled toggles the App Bar component on client side
AppBarEnabled bool
// Feature flags to control plugin versions
PluginPlaybooks string `plugin_id:"playbooks"`
PluginApps string `plugin_id:"com.mattermost.apps"`
@@ -81,7 +78,6 @@ func (f *FeatureFlags) SetDefaults() {
f.CollapsedThreads = true
f.EnableRemoteClusterService = false
f.AppsEnabled = true
f.AppBarEnabled = false
f.PluginApps = ""
f.PluginFocalboard = ""
f.PermalinkPreviews = true

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

@@ -718,6 +718,7 @@ func (ts *TelemetryService) trackConfig() {
"cloud_billing": *cfg.ExperimentalSettings.CloudBilling,
"enable_shared_channels": *cfg.ExperimentalSettings.EnableSharedChannels,
"enable_remote_cluster_service": *cfg.ExperimentalSettings.EnableRemoteClusterService && cfg.FeatureFlags.EnableRemoteClusterService,
"enable_app_bar": *cfg.ExperimentalSettings.EnableAppBar,
})
ts.SendTelemetry(TrackConfigAnalytics, map[string]interface{}{