Browse Source

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.
master
Nando Thomassen 4 years ago
parent
commit
16b00dc2af
No account linked to committer's email address

+ 6
- 0
react/features/base/flags/constants.js View File

56
  */
56
  */
57
 export const FILMSTRIP_ENABLED = 'filmstrip.enabled';
57
 export const FILMSTRIP_ENABLED = 'filmstrip.enabled';
58
 
58
 
59
+/**
60
+ * Flag indicating if the Help button should be enabled.
61
+ * Default: enabled (true).
62
+ */
63
+export const HELP_BUTTON_ENABLED = 'help.enabled';
64
+
59
 /**
65
 /**
60
  * Flag indicating if invite functionality should be enabled.
66
  * Flag indicating if invite functionality should be enabled.
61
  * Default: enabled (true).
67
  * Default: enabled (true).

+ 3
- 1
react/features/toolbox/components/HelpButton.js View File

1
 // @flow
1
 // @flow
2
 
2
 
3
 import { createToolbarEvent, sendAnalytics } from '../../analytics';
3
 import { createToolbarEvent, sendAnalytics } from '../../analytics';
4
+import { getFeatureFlag, HELP_BUTTON_ENABLED } from '../../base/flags';
4
 import { translate } from '../../base/i18n';
5
 import { translate } from '../../base/i18n';
5
 import { IconHelp } from '../../base/icons';
6
 import { IconHelp } from '../../base/icons';
6
 import { connect } from '../../base/redux';
7
 import { connect } from '../../base/redux';
45
  */
46
  */
46
 function _mapStateToProps(state: Object) {
47
 function _mapStateToProps(state: Object) {
47
     const { userDocumentationURL } = state['features/base/config'].deploymentUrls || {};
48
     const { userDocumentationURL } = state['features/base/config'].deploymentUrls || {};
48
-    const visible = typeof userDocumentationURL === 'string';
49
+    const enabled = getFeatureFlag(state, HELP_BUTTON_ENABLED, true);
50
+    const visible = typeof userDocumentationURL === 'string' && enabled;
49
 
51
 
50
     return {
52
     return {
51
         _userDocumentationURL: userDocumentationURL,
53
         _userDocumentationURL: userDocumentationURL,

Loading…
Cancel
Save