Add unexposed account setting for hiding poll creation (#7972)

* Add unexposed account setting for hiding poll creation

This is to match the sticker picker setting we already have, but not exposed in the user settings until we decide if we actually want it to be there.

This is primarily intended to be used in environments that disable it at the config level, though given there's multiple people in the wild who have asked for this, it seems reasonable to expose it as a hidden setting instead. Note that as of writing it's not clear if any of those requests made it as far as an issue tracker.

Typically for the usecase presented we'd add a new UIFeature flag, however this *feels* wrong for the case at hand.

* Move visibility check way higher

* Fix i18n post-merge
This commit is contained in:
Travis Ralston 2022-03-04 11:04:30 -07:00 committed by GitHub
parent aa48cfd0a0
commit b981a96b29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 76 additions and 4 deletions

View file

@ -429,6 +429,11 @@ export const SETTINGS: {[setting: string]: ISetting} = {
default: true,
controller: new UIFeatureController(UIFeature.Widgets, false),
},
"MessageComposerInput.showPollsButton": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td('Show polls button'),
default: true,
},
"MessageComposerInput.insertTrailingColon": {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
displayName: _td('Insert a trailing colon after user mentions at the start of a message'),