@atlaskit/help 6.0.2 → 6.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @atlaskit/help
2
2
 
3
+ ## 6.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 6.0.5
10
+
11
+ ### Patch Changes
12
+
13
+ - [`c55c736ecea`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c55c736ecea) - Patch VULN AFP-3486 AFP-3487 AFP-3488 AFP-3489
14
+
15
+ ## 6.0.4
16
+
17
+ ### Patch Changes
18
+
19
+ - [`9c8157a146f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/9c8157a146f) - [ux] Add tooltip to HelpContentButton and update "What's new" button label
20
+
21
+ ## 6.0.3
22
+
23
+ ### Patch Changes
24
+
25
+ - [`78c9f070230`](https://bitbucket.org/atlassian/atlassian-frontend/commits/78c9f070230) - Bump algoliasearch version from ^3.33.0 to ^3.35.1. In @atlaskit/help we updated the example 3 and moved Algolia API related code to it's own react hook
26
+
3
27
  ## 6.0.2
4
28
 
5
29
  ### Patch Changes
@@ -56,7 +56,8 @@ var HelpContent = function HelpContent(_ref) {
56
56
 
57
57
  var _useWhatsNewArticleCo = (0, _whatsNewArticleContext.useWhatsNewArticleContext)(),
58
58
  onSearchWhatsNewArticles = _useWhatsNewArticleCo.onSearchWhatsNewArticles,
59
- onGetWhatsNewArticle = _useWhatsNewArticleCo.onGetWhatsNewArticle;
59
+ onGetWhatsNewArticle = _useWhatsNewArticleCo.onGetWhatsNewArticle,
60
+ productName = _useWhatsNewArticleCo.productName;
60
61
 
61
62
  var _useNavigationContext = (0, _navigationContext.useNavigationContext)(),
62
63
  isOverlayVisible = _useNavigationContext.isOverlayVisible,
@@ -110,7 +111,9 @@ var HelpContent = function HelpContent(_ref) {
110
111
  }, /*#__PURE__*/_react.default.createElement(_styled.HelpBodyContainer, null, /*#__PURE__*/_react.default.createElement(_styled.HelpBody, null, /*#__PURE__*/_react.default.createElement(_SearchResults.default, null), /*#__PURE__*/_react.default.createElement(_Article.default, null), /*#__PURE__*/_react.default.createElement(_styled.Home, {
111
112
  isOverlayFullyVisible: isOverlayFullyVisible,
112
113
  isOverlayVisible: isOverlayVisible
113
- }, homeContent, onSearchWhatsNewArticles && onGetWhatsNewArticle && /*#__PURE__*/_react.default.createElement(_WhatsNewButton.default, null), homeOptions && homeOptions.map(function (defaultOption) {
114
+ }, homeContent, onSearchWhatsNewArticles && onGetWhatsNewArticle && /*#__PURE__*/_react.default.createElement(_WhatsNewButton.default, {
115
+ productName: productName
116
+ }), homeOptions && homeOptions.map(function (defaultOption) {
114
117
  return /*#__PURE__*/_react.default.createElement(_HelpContentButton.default, (0, _extends2.default)({
115
118
  key: defaultOption.id
116
119
  }, defaultOption));
@@ -13,6 +13,8 @@ var _react = _interopRequireWildcard(require("react"));
13
13
 
14
14
  var _shortcut = _interopRequireDefault(require("@atlaskit/icon/glyph/shortcut"));
15
15
 
16
+ var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
17
+
16
18
  var _notificationIndicator = require("@atlaskit/notification-indicator");
17
19
 
18
20
  var _analyticsNext = require("@atlaskit/analytics-next");
@@ -40,7 +42,8 @@ var HelpContentButton = function HelpContentButton(_ref) {
40
42
  notificationLogProvider = _ref.notificationLogProvider,
41
43
  text = _ref.text,
42
44
  icon = _ref.icon,
43
- onClick = _ref.onClick;
45
+ onClick = _ref.onClick,
46
+ tooltipText = _ref.tooltipText;
44
47
 
45
48
  var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
46
49
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
@@ -53,14 +56,8 @@ var HelpContentButton = function HelpContentButton(_ref) {
53
56
  onClick(id, analyticsEvent, event);
54
57
  }
55
58
  }, [createAnalyticsEvent, id, onClick]);
56
- return /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
57
- data: analitycsContextData
58
- }, /*#__PURE__*/_react.default.createElement(_styled.HelpContentButtonContainer, {
59
- onClick: handleOnClick,
60
- href: href,
61
- id: id,
62
- target: href && '_blank'
63
- }, /*#__PURE__*/_react.default.createElement(_styled.HelpContentButtonIcon, null, icon), /*#__PURE__*/_react.default.createElement(_styled.HelpContentButtonText, null, text, notificationLogProvider !== null && /*#__PURE__*/_react.default.createElement(_styled.HelpContentButtonExternalNotificationIcon, null, /*#__PURE__*/_react.default.createElement(_notificationIndicator.NotificationIndicator, {
59
+
60
+ var buttonContent = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_styled.HelpContentButtonIcon, null, icon), /*#__PURE__*/_react.default.createElement(_styled.HelpContentButtonText, null, text, notificationLogProvider !== null && /*#__PURE__*/_react.default.createElement(_styled.HelpContentButtonExternalNotificationIcon, null, /*#__PURE__*/_react.default.createElement(_notificationIndicator.NotificationIndicator, {
64
61
  notificationLogProvider: notificationLogProvider,
65
62
  max: notificationMax,
66
63
  appearance: "primary"
@@ -69,7 +66,19 @@ var HelpContentButton = function HelpContentButton(_ref) {
69
66
  }, /*#__PURE__*/_react.default.createElement(_shortcut.default, {
70
67
  size: "small",
71
68
  label: ""
72
- })))));
69
+ }))));
70
+
71
+ return /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
72
+ data: analitycsContextData
73
+ }, /*#__PURE__*/_react.default.createElement(_styled.HelpContentButtonContainer, {
74
+ onClick: handleOnClick,
75
+ href: href,
76
+ id: id,
77
+ target: href && '_blank'
78
+ }, tooltipText ? /*#__PURE__*/_react.default.createElement(_tooltip.default, {
79
+ content: tooltipText,
80
+ position: "left"
81
+ }, buttonContent) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, buttonContent)));
73
82
  };
74
83
 
75
84
  var _default = HelpContentButton;
@@ -42,7 +42,8 @@ var ANALYTICS_CONTEXT_DATA = {
42
42
  };
43
43
 
44
44
  var WhatsNewButton = function WhatsNewButton(_ref) {
45
- var formatMessage = _ref.intl.formatMessage;
45
+ var productName = _ref.productName,
46
+ formatMessage = _ref.intl.formatMessage;
46
47
 
47
48
  var _useWhatsNewArticleCo = (0, _whatsNewArticleContext.useWhatsNewArticleContext)(),
48
49
  onWhatsNewButtonClick = _useWhatsNewArticleCo.onWhatsNewButtonClick,
@@ -66,9 +67,12 @@ var WhatsNewButton = function WhatsNewButton(_ref) {
66
67
  return /*#__PURE__*/_react.default.createElement(_HelpContentButton.default, {
67
68
  id: "whats-new",
68
69
  key: "whats-new",
70
+ tooltipText: formatMessage(_messages.messages.help_whats_new_button_tooltip),
69
71
  notificationLogProvider: whatsNewGetNotificationProvider,
70
72
  onClick: handleOnButtonClick,
71
- text: formatMessage(_messages.messages.help_whats_new_button_label),
73
+ text: productName ? formatMessage(_messages.messages.help_whats_new_button_label, {
74
+ productName: productName
75
+ }) : formatMessage(_messages.messages.help_whats_new_button_label_without_product_name),
72
76
  icon: /*#__PURE__*/_react.default.createElement(_lightbulb.default, {
73
77
  primaryColor: colors.N600,
74
78
  size: "medium",
@@ -44,6 +44,7 @@ var WhatsNewArticleProvider = function WhatsNewArticleProvider(_ref) {
44
44
  onSearchWhatsNewArticlesShowMoreClick = _ref.onSearchWhatsNewArticlesShowMoreClick,
45
45
  onWhatsNewResultItemClick = _ref.onWhatsNewResultItemClick,
46
46
  onGetWhatsNewArticle = _ref.onGetWhatsNewArticle,
47
+ productName = _ref.productName,
47
48
  children = _ref.children;
48
49
 
49
50
  // What's new
@@ -149,7 +150,8 @@ var WhatsNewArticleProvider = function WhatsNewArticleProvider(_ref) {
149
150
  searchWhatsNewArticlesState: searchWhatsNewArticlesState,
150
151
  searchWhatsNewArticlesResult: searchWhatsNewArticlesResult,
151
152
  onWhatsNewResultItemClick: onWhatsNewResultItemClick,
152
- onGetWhatsNewArticle: onGetWhatsNewArticle
153
+ onGetWhatsNewArticle: onGetWhatsNewArticle,
154
+ productName: productName
153
155
  }
154
156
  }, children);
155
157
  };
@@ -185,9 +185,19 @@ var messages = (0, _reactIntlNext.defineMessages)({
185
185
  },
186
186
  help_whats_new_button_label: {
187
187
  id: 'help.whats_new.button_label',
188
- defaultMessage: "What's new",
188
+ defaultMessage: 'Find out what’s changed in {productName}',
189
189
  description: "text for the \"What's New\" button"
190
190
  },
191
+ help_whats_new_button_label_without_product_name: {
192
+ id: 'help.whats_new.button_label',
193
+ defaultMessage: 'Find out what’s changed',
194
+ description: "text for the \"What's New\" button"
195
+ },
196
+ help_whats_new_button_tooltip: {
197
+ id: 'help.whats_new.button_tooltip',
198
+ defaultMessage: "Explore our full collection of help and support resources.",
199
+ description: "text for the \"What's New\" tooltip"
200
+ },
191
201
  help_whats_new_filter_select_option_all: {
192
202
  id: 'help.whats_new.filter_select_option_all',
193
203
  defaultMessage: "All release types",
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/help",
3
- "version": "6.0.2",
3
+ "version": "6.0.6",
4
4
  "sideEffects": false
5
5
  }
@@ -23,7 +23,8 @@ export const HelpContent = ({
23
23
  } = useHomeContext();
24
24
  const {
25
25
  onSearchWhatsNewArticles,
26
- onGetWhatsNewArticle
26
+ onGetWhatsNewArticle,
27
+ productName
27
28
  } = useWhatsNewArticleContext();
28
29
  const {
29
30
  isOverlayVisible,
@@ -73,7 +74,9 @@ export const HelpContent = ({
73
74
  }, /*#__PURE__*/React.createElement(HelpBodyContainer, null, /*#__PURE__*/React.createElement(HelpBody, null, /*#__PURE__*/React.createElement(SearchResults, null), /*#__PURE__*/React.createElement(ArticleComponent, null), /*#__PURE__*/React.createElement(Home, {
74
75
  isOverlayFullyVisible: isOverlayFullyVisible,
75
76
  isOverlayVisible: isOverlayVisible
76
- }, homeContent, onSearchWhatsNewArticles && onGetWhatsNewArticle && /*#__PURE__*/React.createElement(WhatsNewButton, null), homeOptions && homeOptions.map(defaultOption => {
77
+ }, homeContent, onSearchWhatsNewArticles && onGetWhatsNewArticle && /*#__PURE__*/React.createElement(WhatsNewButton, {
78
+ productName: productName
79
+ }), homeOptions && homeOptions.map(defaultOption => {
77
80
  return /*#__PURE__*/React.createElement(HelpContentButton, _extends({
78
81
  key: defaultOption.id
79
82
  }, defaultOption));
@@ -1,5 +1,6 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import ShortcutIcon from '@atlaskit/icon/glyph/shortcut';
3
+ import Tooltip from '@atlaskit/tooltip';
3
4
  import { NotificationIndicator } from '@atlaskit/notification-indicator';
4
5
  import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
5
6
  import { name as packageName, version as packageVersion } from '../../version.json';
@@ -17,7 +18,8 @@ const HelpContentButton = ({
17
18
  notificationLogProvider,
18
19
  text,
19
20
  icon,
20
- onClick
21
+ onClick,
22
+ tooltipText
21
23
  }) => {
22
24
  const {
23
25
  createAnalyticsEvent
@@ -30,14 +32,7 @@ const HelpContentButton = ({
30
32
  onClick(id, analyticsEvent, event);
31
33
  }
32
34
  }, [createAnalyticsEvent, id, onClick]);
33
- return /*#__PURE__*/React.createElement(AnalyticsContext, {
34
- data: analitycsContextData
35
- }, /*#__PURE__*/React.createElement(HelpContentButtonContainer, {
36
- onClick: handleOnClick,
37
- href: href,
38
- id: id,
39
- target: href && '_blank'
40
- }, /*#__PURE__*/React.createElement(HelpContentButtonIcon, null, icon), /*#__PURE__*/React.createElement(HelpContentButtonText, null, text, notificationLogProvider !== null && /*#__PURE__*/React.createElement(HelpContentButtonExternalNotificationIcon, null, /*#__PURE__*/React.createElement(NotificationIndicator, {
35
+ const buttonContent = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(HelpContentButtonIcon, null, icon), /*#__PURE__*/React.createElement(HelpContentButtonText, null, text, notificationLogProvider !== null && /*#__PURE__*/React.createElement(HelpContentButtonExternalNotificationIcon, null, /*#__PURE__*/React.createElement(NotificationIndicator, {
41
36
  notificationLogProvider: notificationLogProvider,
42
37
  max: notificationMax,
43
38
  appearance: "primary"
@@ -46,7 +41,18 @@ const HelpContentButton = ({
46
41
  }, /*#__PURE__*/React.createElement(ShortcutIcon, {
47
42
  size: "small",
48
43
  label: ""
49
- })))));
44
+ }))));
45
+ return /*#__PURE__*/React.createElement(AnalyticsContext, {
46
+ data: analitycsContextData
47
+ }, /*#__PURE__*/React.createElement(HelpContentButtonContainer, {
48
+ onClick: handleOnClick,
49
+ href: href,
50
+ id: id,
51
+ target: href && '_blank'
52
+ }, tooltipText ? /*#__PURE__*/React.createElement(Tooltip, {
53
+ content: tooltipText,
54
+ position: "left"
55
+ }, buttonContent) : /*#__PURE__*/React.createElement(React.Fragment, null, buttonContent)));
50
56
  };
51
57
 
52
58
  export default HelpContentButton;
@@ -15,6 +15,7 @@ const ANALYTICS_CONTEXT_DATA = {
15
15
  packageVersion
16
16
  };
17
17
  export const WhatsNewButton = ({
18
+ productName,
18
19
  intl: {
19
20
  formatMessage
20
21
  }
@@ -41,9 +42,12 @@ export const WhatsNewButton = ({
41
42
  return /*#__PURE__*/React.createElement(HelpContentButton, {
42
43
  id: "whats-new",
43
44
  key: "whats-new",
45
+ tooltipText: formatMessage(messages.help_whats_new_button_tooltip),
44
46
  notificationLogProvider: whatsNewGetNotificationProvider,
45
47
  onClick: handleOnButtonClick,
46
- text: formatMessage(messages.help_whats_new_button_label),
48
+ text: productName ? formatMessage(messages.help_whats_new_button_label, {
49
+ productName
50
+ }) : formatMessage(messages.help_whats_new_button_label_without_product_name),
47
51
  icon: /*#__PURE__*/React.createElement(LightbulbIcon, {
48
52
  primaryColor: colors.N600,
49
53
  size: "medium",
@@ -10,6 +10,7 @@ export const WhatsNewArticleProvider = ({
10
10
  onSearchWhatsNewArticlesShowMoreClick,
11
11
  onWhatsNewResultItemClick,
12
12
  onGetWhatsNewArticle,
13
+ productName,
13
14
  children
14
15
  }) => {
15
16
  // What's new
@@ -55,7 +56,8 @@ export const WhatsNewArticleProvider = ({
55
56
  searchWhatsNewArticlesState,
56
57
  searchWhatsNewArticlesResult,
57
58
  onWhatsNewResultItemClick,
58
- onGetWhatsNewArticle
59
+ onGetWhatsNewArticle,
60
+ productName
59
61
  }
60
62
  }, children);
61
63
  };
@@ -177,9 +177,19 @@ export const messages = defineMessages({
177
177
  },
178
178
  help_whats_new_button_label: {
179
179
  id: 'help.whats_new.button_label',
180
- defaultMessage: `What's new`,
180
+ defaultMessage: 'Find out what’s changed in {productName}',
181
181
  description: `text for the "What's New" button`
182
182
  },
183
+ help_whats_new_button_label_without_product_name: {
184
+ id: 'help.whats_new.button_label',
185
+ defaultMessage: 'Find out what’s changed',
186
+ description: `text for the "What's New" button`
187
+ },
188
+ help_whats_new_button_tooltip: {
189
+ id: 'help.whats_new.button_tooltip',
190
+ defaultMessage: `Explore our full collection of help and support resources.`,
191
+ description: `text for the "What's New" tooltip`
192
+ },
183
193
  help_whats_new_filter_select_option_all: {
184
194
  id: 'help.whats_new.filter_select_option_all',
185
195
  defaultMessage: `All release types`,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/help",
3
- "version": "6.0.2",
3
+ "version": "6.0.6",
4
4
  "sideEffects": false
5
5
  }
@@ -24,7 +24,8 @@ export var HelpContent = function HelpContent(_ref) {
24
24
 
25
25
  var _useWhatsNewArticleCo = useWhatsNewArticleContext(),
26
26
  onSearchWhatsNewArticles = _useWhatsNewArticleCo.onSearchWhatsNewArticles,
27
- onGetWhatsNewArticle = _useWhatsNewArticleCo.onGetWhatsNewArticle;
27
+ onGetWhatsNewArticle = _useWhatsNewArticleCo.onGetWhatsNewArticle,
28
+ productName = _useWhatsNewArticleCo.productName;
28
29
 
29
30
  var _useNavigationContext = useNavigationContext(),
30
31
  isOverlayVisible = _useNavigationContext.isOverlayVisible,
@@ -78,7 +79,9 @@ export var HelpContent = function HelpContent(_ref) {
78
79
  }, /*#__PURE__*/React.createElement(HelpBodyContainer, null, /*#__PURE__*/React.createElement(HelpBody, null, /*#__PURE__*/React.createElement(SearchResults, null), /*#__PURE__*/React.createElement(ArticleComponent, null), /*#__PURE__*/React.createElement(Home, {
79
80
  isOverlayFullyVisible: isOverlayFullyVisible,
80
81
  isOverlayVisible: isOverlayVisible
81
- }, homeContent, onSearchWhatsNewArticles && onGetWhatsNewArticle && /*#__PURE__*/React.createElement(WhatsNewButton, null), homeOptions && homeOptions.map(function (defaultOption) {
82
+ }, homeContent, onSearchWhatsNewArticles && onGetWhatsNewArticle && /*#__PURE__*/React.createElement(WhatsNewButton, {
83
+ productName: productName
84
+ }), homeOptions && homeOptions.map(function (defaultOption) {
82
85
  return /*#__PURE__*/React.createElement(HelpContentButton, _extends({
83
86
  key: defaultOption.id
84
87
  }, defaultOption));
@@ -1,5 +1,6 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import ShortcutIcon from '@atlaskit/icon/glyph/shortcut';
3
+ import Tooltip from '@atlaskit/tooltip';
3
4
  import { NotificationIndicator } from '@atlaskit/notification-indicator';
4
5
  import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
5
6
  import { name as packageName, version as packageVersion } from '../../version.json';
@@ -19,7 +20,8 @@ var HelpContentButton = function HelpContentButton(_ref) {
19
20
  notificationLogProvider = _ref.notificationLogProvider,
20
21
  text = _ref.text,
21
22
  icon = _ref.icon,
22
- onClick = _ref.onClick;
23
+ onClick = _ref.onClick,
24
+ tooltipText = _ref.tooltipText;
23
25
 
24
26
  var _useAnalyticsEvents = useAnalyticsEvents(),
25
27
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
@@ -32,14 +34,7 @@ var HelpContentButton = function HelpContentButton(_ref) {
32
34
  onClick(id, analyticsEvent, event);
33
35
  }
34
36
  }, [createAnalyticsEvent, id, onClick]);
35
- return /*#__PURE__*/React.createElement(AnalyticsContext, {
36
- data: analitycsContextData
37
- }, /*#__PURE__*/React.createElement(HelpContentButtonContainer, {
38
- onClick: handleOnClick,
39
- href: href,
40
- id: id,
41
- target: href && '_blank'
42
- }, /*#__PURE__*/React.createElement(HelpContentButtonIcon, null, icon), /*#__PURE__*/React.createElement(HelpContentButtonText, null, text, notificationLogProvider !== null && /*#__PURE__*/React.createElement(HelpContentButtonExternalNotificationIcon, null, /*#__PURE__*/React.createElement(NotificationIndicator, {
37
+ var buttonContent = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(HelpContentButtonIcon, null, icon), /*#__PURE__*/React.createElement(HelpContentButtonText, null, text, notificationLogProvider !== null && /*#__PURE__*/React.createElement(HelpContentButtonExternalNotificationIcon, null, /*#__PURE__*/React.createElement(NotificationIndicator, {
43
38
  notificationLogProvider: notificationLogProvider,
44
39
  max: notificationMax,
45
40
  appearance: "primary"
@@ -48,7 +43,18 @@ var HelpContentButton = function HelpContentButton(_ref) {
48
43
  }, /*#__PURE__*/React.createElement(ShortcutIcon, {
49
44
  size: "small",
50
45
  label: ""
51
- })))));
46
+ }))));
47
+ return /*#__PURE__*/React.createElement(AnalyticsContext, {
48
+ data: analitycsContextData
49
+ }, /*#__PURE__*/React.createElement(HelpContentButtonContainer, {
50
+ onClick: handleOnClick,
51
+ href: href,
52
+ id: id,
53
+ target: href && '_blank'
54
+ }, tooltipText ? /*#__PURE__*/React.createElement(Tooltip, {
55
+ content: tooltipText,
56
+ position: "left"
57
+ }, buttonContent) : /*#__PURE__*/React.createElement(React.Fragment, null, buttonContent)));
52
58
  };
53
59
 
54
60
  export default HelpContentButton;
@@ -15,7 +15,8 @@ var ANALYTICS_CONTEXT_DATA = {
15
15
  packageVersion: packageVersion
16
16
  };
17
17
  export var WhatsNewButton = function WhatsNewButton(_ref) {
18
- var formatMessage = _ref.intl.formatMessage;
18
+ var productName = _ref.productName,
19
+ formatMessage = _ref.intl.formatMessage;
19
20
 
20
21
  var _useWhatsNewArticleCo = useWhatsNewArticleContext(),
21
22
  onWhatsNewButtonClick = _useWhatsNewArticleCo.onWhatsNewButtonClick,
@@ -39,9 +40,12 @@ export var WhatsNewButton = function WhatsNewButton(_ref) {
39
40
  return /*#__PURE__*/React.createElement(HelpContentButton, {
40
41
  id: "whats-new",
41
42
  key: "whats-new",
43
+ tooltipText: formatMessage(messages.help_whats_new_button_tooltip),
42
44
  notificationLogProvider: whatsNewGetNotificationProvider,
43
45
  onClick: handleOnButtonClick,
44
- text: formatMessage(messages.help_whats_new_button_label),
46
+ text: productName ? formatMessage(messages.help_whats_new_button_label, {
47
+ productName: productName
48
+ }) : formatMessage(messages.help_whats_new_button_label_without_product_name),
45
49
  icon: /*#__PURE__*/React.createElement(LightbulbIcon, {
46
50
  primaryColor: colors.N600,
47
51
  size: "medium",
@@ -20,6 +20,7 @@ export var WhatsNewArticleProvider = function WhatsNewArticleProvider(_ref) {
20
20
  onSearchWhatsNewArticlesShowMoreClick = _ref.onSearchWhatsNewArticlesShowMoreClick,
21
21
  onWhatsNewResultItemClick = _ref.onWhatsNewResultItemClick,
22
22
  onGetWhatsNewArticle = _ref.onGetWhatsNewArticle,
23
+ productName = _ref.productName,
23
24
  children = _ref.children;
24
25
 
25
26
  // What's new
@@ -125,7 +126,8 @@ export var WhatsNewArticleProvider = function WhatsNewArticleProvider(_ref) {
125
126
  searchWhatsNewArticlesState: searchWhatsNewArticlesState,
126
127
  searchWhatsNewArticlesResult: searchWhatsNewArticlesResult,
127
128
  onWhatsNewResultItemClick: onWhatsNewResultItemClick,
128
- onGetWhatsNewArticle: onGetWhatsNewArticle
129
+ onGetWhatsNewArticle: onGetWhatsNewArticle,
130
+ productName: productName
129
131
  }
130
132
  }, children);
131
133
  };
@@ -177,9 +177,19 @@ export var messages = defineMessages({
177
177
  },
178
178
  help_whats_new_button_label: {
179
179
  id: 'help.whats_new.button_label',
180
- defaultMessage: "What's new",
180
+ defaultMessage: 'Find out what’s changed in {productName}',
181
181
  description: "text for the \"What's New\" button"
182
182
  },
183
+ help_whats_new_button_label_without_product_name: {
184
+ id: 'help.whats_new.button_label',
185
+ defaultMessage: 'Find out what’s changed',
186
+ description: "text for the \"What's New\" button"
187
+ },
188
+ help_whats_new_button_tooltip: {
189
+ id: 'help.whats_new.button_tooltip',
190
+ defaultMessage: "Explore our full collection of help and support resources.",
191
+ description: "text for the \"What's New\" tooltip"
192
+ },
183
193
  help_whats_new_filter_select_option_all: {
184
194
  id: 'help.whats_new.filter_select_option_all',
185
195
  defaultMessage: "All release types",
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/help",
3
- "version": "6.0.2",
3
+ "version": "6.0.6",
4
4
  "sideEffects": false
5
5
  }
@@ -8,7 +8,8 @@ export declare type Props = {
8
8
  notificationLogProvider?: Promise<NotificationLogProvider>;
9
9
  text: string;
10
10
  icon?: React.ReactChild;
11
+ tooltipText?: string;
11
12
  onClick?: (id: string, analytics: UIAnalyticsEvent, event: React.MouseEvent<HTMLElement>) => void;
12
13
  };
13
- declare const HelpContentButton: ({ id, href, notificationMax, notificationLogProvider, text, icon, onClick, }: Props) => JSX.Element;
14
+ declare const HelpContentButton: ({ id, href, notificationMax, notificationLogProvider, text, icon, onClick, tooltipText, }: Props) => JSX.Element;
14
15
  export default HelpContentButton;
@@ -1,7 +1,10 @@
1
1
  import React from 'react';
2
2
  import { WrappedComponentProps } from 'react-intl-next';
3
- export declare const WhatsNewButton: React.FC<WrappedComponentProps>;
4
- declare const _default: React.FC<import("react-intl-next").WithIntlProps<WrappedComponentProps<"intl">>> & {
5
- WrappedComponent: React.ComponentType<WrappedComponentProps<"intl">>;
3
+ interface WhatsNewButtonProps {
4
+ productName?: string;
5
+ }
6
+ export declare const WhatsNewButton: React.FC<WrappedComponentProps & WhatsNewButtonProps>;
7
+ declare const _default: React.FC<import("react-intl-next").WithIntlProps<WrappedComponentProps<"intl"> & WhatsNewButtonProps>> & {
8
+ WrappedComponent: React.ComponentType<WrappedComponentProps<"intl"> & WhatsNewButtonProps>;
6
9
  };
7
10
  export default _default;
@@ -7,6 +7,7 @@ import { articleId } from '../../model/Help';
7
7
  import { WHATS_NEW_ITEM_TYPES } from '../../model/WhatsNew';
8
8
  interface WhatsNewArticleSharedInterface {
9
9
  whatsNewGetNotificationProvider?: Promise<NotificationLogProvider>;
10
+ productName?: string;
10
11
  onWhatsNewButtonClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent): void;
11
12
  onWhatsNewResultItemClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent, whatsNewArticleData: WhatsNewArticleItem): void;
12
13
  onSearchWhatsNewArticlesShowMoreClick?(event: React.MouseEvent<HTMLElement>, analyticsEvent: UIAnalyticsEvent): void;
@@ -179,6 +179,16 @@ export declare const messages: {
179
179
  defaultMessage: string;
180
180
  description: string;
181
181
  };
182
+ help_whats_new_button_label_without_product_name: {
183
+ id: string;
184
+ defaultMessage: string;
185
+ description: string;
186
+ };
187
+ help_whats_new_button_tooltip: {
188
+ id: string;
189
+ defaultMessage: string;
190
+ description: string;
191
+ };
182
192
  help_whats_new_filter_select_option_all: {
183
193
  id: string;
184
194
  defaultMessage: string;
@@ -59,6 +59,7 @@ export interface Help {
59
59
  };
60
60
  whatsNew?: {
61
61
  whatsNewGetNotificationProvider?: Promise<NotificationLogProvider>;
62
+ productName?: string;
62
63
  onWhatsNewButtonClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent): void;
63
64
  onSearchWhatsNewArticles?(filter?: WHATS_NEW_ITEM_TYPES | '', numberOfItems?: number, page?: string): Promise<whatsNewSearchResult>;
64
65
  onWhatsNewResultItemClick?(event: React.MouseEvent<HTMLElement, MouseEvent>, analyticsEvent: UIAnalyticsEvent, whatsNewArticleData: WhatsNewArticleItem): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/help",
3
- "version": "6.0.2",
3
+ "version": "6.0.6",
4
4
  "description": "A cross-product help component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -35,8 +35,8 @@
35
35
  "@atlaskit/help-layout": "^4.0.0",
36
36
  "@atlaskit/icon": "^21.9.0",
37
37
  "@atlaskit/item": "^12.0.0",
38
- "@atlaskit/notification-indicator": "^8.1.0",
39
- "@atlaskit/notification-log-client": "^5.2.0",
38
+ "@atlaskit/notification-indicator": "^9.0.0",
39
+ "@atlaskit/notification-log-client": "^6.0.0",
40
40
  "@atlaskit/radio": "^5.3.0",
41
41
  "@atlaskit/section-message": "^6.1.0",
42
42
  "@atlaskit/select": "^15.0.0",
@@ -44,11 +44,12 @@
44
44
  "@atlaskit/textarea": "^4.2.0",
45
45
  "@atlaskit/textfield": "^5.1.0",
46
46
  "@atlaskit/theme": "^12.0.0",
47
+ "@atlaskit/tooltip": "^17.5.0",
47
48
  "@babel/runtime": "^7.0.0",
48
49
  "@emotion/core": "^10.0.9",
49
50
  "@emotion/styled": "^10.0.7",
50
51
  "date-fns": "^2.17.0",
51
- "lodash": "^4.17.15",
52
+ "lodash": "^4.17.21",
52
53
  "react-animate-height": "^2.0.5",
53
54
  "react-transition-group": "^4.4.1"
54
55
  },
@@ -61,10 +62,10 @@
61
62
  "devDependencies": {
62
63
  "@atlaskit/docs": "*",
63
64
  "@atlaskit/navigation": "^37.0.0",
64
- "@atlaskit/page": "^12.0.0",
65
+ "@atlaskit/page": "^12.1.0",
65
66
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
66
67
  "@testing-library/react": "^8.0.1",
67
- "algoliasearch": "^3.33.0",
68
+ "algoliasearch": "^3.35.1",
68
69
  "enzyme": "^3.10.0",
69
70
  "react-test-renderer": "^16.8.0",
70
71
  "typescript": "3.9.6"