feat(flags) add feature flag for help button

Introduces a new feature flag ('help.enabled') and uses that to
determine the visibility of the 'Help' button in a call.
This commit is contained in:
Nando Thomassen 2021-02-10 22:34:13 +01:00 committed by GitHub
parent c3a41b8cf3
commit 16b00dc2af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -56,6 +56,12 @@ export const CHAT_ENABLED = 'chat.enabled';
*/
export const FILMSTRIP_ENABLED = 'filmstrip.enabled';
/**
* Flag indicating if the Help button should be enabled.
* Default: enabled (true).
*/
export const HELP_BUTTON_ENABLED = 'help.enabled';
/**
* Flag indicating if invite functionality should be enabled.
* Default: enabled (true).

View File

@ -1,6 +1,7 @@
// @flow
import { createToolbarEvent, sendAnalytics } from '../../analytics';
import { getFeatureFlag, HELP_BUTTON_ENABLED } from '../../base/flags';
import { translate } from '../../base/i18n';
import { IconHelp } from '../../base/icons';
import { connect } from '../../base/redux';
@ -45,7 +46,8 @@ class HelpButton extends AbstractButton<Props, *> {
*/
function _mapStateToProps(state: Object) {
const { userDocumentationURL } = state['features/base/config'].deploymentUrls || {};
const visible = typeof userDocumentationURL === 'string';
const enabled = getFeatureFlag(state, HELP_BUTTON_ENABLED, true);
const visible = typeof userDocumentationURL === 'string' && enabled;
return {
_userDocumentationURL: userDocumentationURL,