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:
parent
c3a41b8cf3
commit
16b00dc2af
|
@ -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).
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue