@atlaskit/link-create 1.13.1 → 1.13.3
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 +13 -0
- package/analytics.spec.yaml +4 -2
- package/dist/cjs/common/utils/analytics/analytics.codegen.js +1 -1
- package/dist/cjs/common/utils/locale/fetch-messages-for-locale.js +5 -15
- package/dist/cjs/controllers/experience-tracker/index.js +42 -3
- package/dist/cjs/ui/main.js +1 -1
- package/dist/es2019/common/utils/analytics/analytics.codegen.js +1 -1
- package/dist/es2019/common/utils/locale/fetch-messages-for-locale.js +0 -10
- package/dist/es2019/controllers/experience-tracker/index.js +39 -2
- package/dist/es2019/ui/main.js +1 -1
- package/dist/esm/common/utils/analytics/analytics.codegen.js +1 -1
- package/dist/esm/common/utils/locale/fetch-messages-for-locale.js +5 -15
- package/dist/esm/controllers/experience-tracker/index.js +42 -3
- package/dist/esm/ui/main.js +1 -1
- package/dist/types/common/utils/analytics/analytics.codegen.d.ts +2 -1
- package/dist/types-ts4.5/common/utils/analytics/analytics.codegen.d.ts +2 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/link-create
|
|
2
2
|
|
|
3
|
+
## 1.13.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#64291](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/64291) [`c44535acbea9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c44535acbea9) - remove platform.linking-platform.link-create.tmp-fix-translations to permanently return undefined in the loaderFn when dynamic import of locale messages fail.
|
|
8
|
+
|
|
9
|
+
## 1.13.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#64870](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/64870) [`0f1f6c106355`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0f1f6c106355) - Adds analytics attribute to help exclude expected errors from SLIs, behind ff
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 1.13.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/analytics.spec.yaml
CHANGED
|
@@ -84,7 +84,6 @@ events:
|
|
|
84
84
|
<<: *PackageMetaDataContext
|
|
85
85
|
<<: *LinkCreateAnalyticContext
|
|
86
86
|
|
|
87
|
-
|
|
88
87
|
- modalDialog opened (linkCreate):
|
|
89
88
|
type: ui
|
|
90
89
|
description: fired when a link create modal component is mounted
|
|
@@ -122,7 +121,7 @@ events:
|
|
|
122
121
|
|
|
123
122
|
- object createFailed (linkCreate):
|
|
124
123
|
type: track
|
|
125
|
-
description:
|
|
124
|
+
description: '[DEPRECATED] prefer `operation failed (linkCreate)` — fired when the object creation fails'
|
|
126
125
|
attributes:
|
|
127
126
|
<<: *PackageMetaDataContext
|
|
128
127
|
failureType:
|
|
@@ -158,3 +157,6 @@ events:
|
|
|
158
157
|
type: string
|
|
159
158
|
required: false
|
|
160
159
|
description: The x-trace-id header associated with the network request if the failure is a Response
|
|
160
|
+
isSLOFailure:
|
|
161
|
+
type: boolean
|
|
162
|
+
description: Whether the failure should be considered for affecting SLO (should we ignore the failure)
|
|
@@ -11,7 +11,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
|
11
11
|
*
|
|
12
12
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
13
13
|
*
|
|
14
|
-
* @codegen <<SignedSource::
|
|
14
|
+
* @codegen <<SignedSource::7beb355391f6269c701cf87b0c222d69>>
|
|
15
15
|
* @codegenCommand yarn workspace @atlaskit/link-create run codegen-analytics
|
|
16
16
|
*/
|
|
17
17
|
|
|
@@ -8,13 +8,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.fetchMessagesForLocale = void 0;
|
|
9
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
12
|
-
var _en = _interopRequireDefault(require("../../../i18n/en"));
|
|
13
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
13
|
var fetchMessagesForLocale = exports.fetchMessagesForLocale = /*#__PURE__*/function () {
|
|
16
14
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(locale) {
|
|
17
|
-
var
|
|
15
|
+
var messages, parentLocale, _messages;
|
|
18
16
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
19
17
|
while (1) switch (_context.prev = _context.next) {
|
|
20
18
|
case 0:
|
|
@@ -28,8 +26,8 @@ var fetchMessagesForLocale = exports.fetchMessagesForLocale = /*#__PURE__*/funct
|
|
|
28
26
|
});
|
|
29
27
|
}( /* webpackChunkName: "@atlaskit-internal_@atlassian/link-create-confluence-i18n-[request]" */"../../../i18n/".concat(locale.replace('-', '_')));
|
|
30
28
|
case 3:
|
|
31
|
-
|
|
32
|
-
return _context.abrupt("return",
|
|
29
|
+
messages = _context.sent;
|
|
30
|
+
return _context.abrupt("return", messages.default);
|
|
33
31
|
case 7:
|
|
34
32
|
_context.prev = 7;
|
|
35
33
|
_context.t0 = _context["catch"](0);
|
|
@@ -45,20 +43,12 @@ var fetchMessagesForLocale = exports.fetchMessagesForLocale = /*#__PURE__*/funct
|
|
|
45
43
|
});
|
|
46
44
|
}( /* webpackChunkName: "@atlaskit-internal_@atlassian/link-create-confluence-i18n-[request]" */"../../../i18n/".concat(parentLocale));
|
|
47
45
|
case 13:
|
|
48
|
-
|
|
49
|
-
return _context.abrupt("return",
|
|
46
|
+
_messages = _context.sent;
|
|
47
|
+
return _context.abrupt("return", _messages.default);
|
|
50
48
|
case 17:
|
|
51
49
|
_context.prev = 17;
|
|
52
50
|
_context.t1 = _context["catch"](9);
|
|
53
51
|
case 19:
|
|
54
|
-
if (!(0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-create.tmp-fix-translations')) {
|
|
55
|
-
_context.next = 21;
|
|
56
|
-
break;
|
|
57
|
-
}
|
|
58
|
-
return _context.abrupt("return");
|
|
59
|
-
case 21:
|
|
60
|
-
return _context.abrupt("return", _en.default);
|
|
61
|
-
case 22:
|
|
62
52
|
case "end":
|
|
63
53
|
return _context.stop();
|
|
64
54
|
}
|
|
@@ -23,6 +23,27 @@ var ExperienceContext = /*#__PURE__*/(0, _react.createContext)({
|
|
|
23
23
|
failure: function failure() {}
|
|
24
24
|
});
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* Error message matches to ignore
|
|
28
|
+
* These should not affect our SLOs as there's nothing we can do about them
|
|
29
|
+
*/
|
|
30
|
+
var IGNORE_ERROR_MESSAGES = [/failed to fetch/i];
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Returns false for errors that should not be considered failures of our SLO
|
|
34
|
+
* because they are failures only the user can handle.
|
|
35
|
+
*/
|
|
36
|
+
var isErrorSLOFailure = function isErrorSLOFailure(error) {
|
|
37
|
+
if (error instanceof Error) {
|
|
38
|
+
if (IGNORE_ERROR_MESSAGES.some(function (msg) {
|
|
39
|
+
return msg.test(error.message);
|
|
40
|
+
})) {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
return true;
|
|
45
|
+
};
|
|
46
|
+
|
|
26
47
|
/**
|
|
27
48
|
* Experience provider that simply keeps track of the state of the experience.
|
|
28
49
|
* Fires an operational event when experience state changes to FAILED.
|
|
@@ -66,7 +87,11 @@ var Experience = exports.Experience = function Experience(_ref) {
|
|
|
66
87
|
* Previous experience status indicates whether the experience
|
|
67
88
|
* has just failed now, or has already failing
|
|
68
89
|
*/
|
|
69
|
-
previousExperienceStatus: experience.current
|
|
90
|
+
previousExperienceStatus: experience.current,
|
|
91
|
+
/**
|
|
92
|
+
* Whether the failure should be involved when considering SLI/SLO
|
|
93
|
+
*/
|
|
94
|
+
isSLOFailure: (0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-create.slo-ignore-failed-fetch') ? isErrorSLOFailure(error) : true
|
|
70
95
|
}, (0, _errors.getNetworkFields)(error)))).fire(_constants.ANALYTICS_CHANNEL);
|
|
71
96
|
if (error instanceof Error) {
|
|
72
97
|
if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-create.enable-sentry-client')) {
|
|
@@ -74,8 +99,22 @@ var Experience = exports.Experience = function Experience(_ref) {
|
|
|
74
99
|
(0, _sentry.captureException)(error, 'link-create');
|
|
75
100
|
}
|
|
76
101
|
}
|
|
77
|
-
if (
|
|
78
|
-
|
|
102
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.linking-platform.link-create.slo-ignore-failed-fetch')) {
|
|
103
|
+
/**
|
|
104
|
+
* Only consider the experience truly failed if the
|
|
105
|
+
* failure is one we haven't correctly handled.
|
|
106
|
+
*
|
|
107
|
+
* In otherwords allow the experience to be "restarted" for the user to try again
|
|
108
|
+
*/
|
|
109
|
+
if (isErrorSLOFailure(error)) {
|
|
110
|
+
if (experience.current !== experienceStatus) {
|
|
111
|
+
experience.current = experienceStatus;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
} else {
|
|
115
|
+
if (experience.current !== experienceStatus) {
|
|
116
|
+
experience.current = experienceStatus;
|
|
117
|
+
}
|
|
79
118
|
}
|
|
80
119
|
}
|
|
81
120
|
};
|
package/dist/cjs/ui/main.js
CHANGED
|
@@ -31,7 +31,7 @@ var LinkCreateWithAnalyticsContext = (0, _analytics.withLinkCreateAnalyticsConte
|
|
|
31
31
|
}));
|
|
32
32
|
var PACKAGE_DATA = exports.PACKAGE_DATA = {
|
|
33
33
|
packageName: "@atlaskit/link-create" || '',
|
|
34
|
-
packageVersion: "1.13.
|
|
34
|
+
packageVersion: "1.13.3" || '',
|
|
35
35
|
component: _constants.COMPONENT_NAME,
|
|
36
36
|
componentName: _constants.COMPONENT_NAME
|
|
37
37
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::7beb355391f6269c701cf87b0c222d69>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/link-create run codegen-analytics
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
2
|
-
import messages from '../../../i18n/en';
|
|
3
1
|
export const fetchMessagesForLocale = async locale => {
|
|
4
2
|
try {
|
|
5
3
|
const messages = await import( /* webpackChunkName: "@atlaskit-internal_@atlassian/link-create-confluence-i18n-[request]" */`../../../i18n/${locale.replace('-', '_')}`);
|
|
@@ -14,12 +12,4 @@ export const fetchMessagesForLocale = async locale => {
|
|
|
14
12
|
} catch (e) {
|
|
15
13
|
// ignore
|
|
16
14
|
}
|
|
17
|
-
if (getBooleanFF('platform.linking-platform.link-create.tmp-fix-translations')) {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* English bundled by default as this is the majority of users
|
|
23
|
-
*/
|
|
24
|
-
return messages;
|
|
25
15
|
};
|
|
@@ -10,6 +10,25 @@ const ExperienceContext = /*#__PURE__*/createContext({
|
|
|
10
10
|
failure: () => {}
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
+
/**
|
|
14
|
+
* Error message matches to ignore
|
|
15
|
+
* These should not affect our SLOs as there's nothing we can do about them
|
|
16
|
+
*/
|
|
17
|
+
const IGNORE_ERROR_MESSAGES = [/failed to fetch/i];
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Returns false for errors that should not be considered failures of our SLO
|
|
21
|
+
* because they are failures only the user can handle.
|
|
22
|
+
*/
|
|
23
|
+
const isErrorSLOFailure = error => {
|
|
24
|
+
if (error instanceof Error) {
|
|
25
|
+
if (IGNORE_ERROR_MESSAGES.some(msg => msg.test(error.message))) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return true;
|
|
30
|
+
};
|
|
31
|
+
|
|
13
32
|
/**
|
|
14
33
|
* Experience provider that simply keeps track of the state of the experience.
|
|
15
34
|
* Fires an operational event when experience state changes to FAILED.
|
|
@@ -55,6 +74,10 @@ export const Experience = ({
|
|
|
55
74
|
* has just failed now, or has already failing
|
|
56
75
|
*/
|
|
57
76
|
previousExperienceStatus: experience.current,
|
|
77
|
+
/**
|
|
78
|
+
* Whether the failure should be involved when considering SLI/SLO
|
|
79
|
+
*/
|
|
80
|
+
isSLOFailure: getBooleanFF('platform.linking-platform.link-create.slo-ignore-failed-fetch') ? isErrorSLOFailure(error) : true,
|
|
58
81
|
/**
|
|
59
82
|
* Fields related to `Response` object that can help with debugging
|
|
60
83
|
* what has gone wrong
|
|
@@ -67,8 +90,22 @@ export const Experience = ({
|
|
|
67
90
|
captureException(error, 'link-create');
|
|
68
91
|
}
|
|
69
92
|
}
|
|
70
|
-
if (
|
|
71
|
-
|
|
93
|
+
if (getBooleanFF('platform.linking-platform.link-create.slo-ignore-failed-fetch')) {
|
|
94
|
+
/**
|
|
95
|
+
* Only consider the experience truly failed if the
|
|
96
|
+
* failure is one we haven't correctly handled.
|
|
97
|
+
*
|
|
98
|
+
* In otherwords allow the experience to be "restarted" for the user to try again
|
|
99
|
+
*/
|
|
100
|
+
if (isErrorSLOFailure(error)) {
|
|
101
|
+
if (experience.current !== experienceStatus) {
|
|
102
|
+
experience.current = experienceStatus;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
} else {
|
|
106
|
+
if (experience.current !== experienceStatus) {
|
|
107
|
+
experience.current = experienceStatus;
|
|
108
|
+
}
|
|
72
109
|
}
|
|
73
110
|
}
|
|
74
111
|
}), [experience, createAnalyticsEvent]);
|
package/dist/es2019/ui/main.js
CHANGED
|
@@ -23,7 +23,7 @@ const LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE
|
|
|
23
23
|
}));
|
|
24
24
|
export const PACKAGE_DATA = {
|
|
25
25
|
packageName: "@atlaskit/link-create" || '',
|
|
26
|
-
packageVersion: "1.13.
|
|
26
|
+
packageVersion: "1.13.3" || '',
|
|
27
27
|
component: COMPONENT_NAME,
|
|
28
28
|
componentName: COMPONENT_NAME
|
|
29
29
|
};
|
|
@@ -4,7 +4,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
4
4
|
*
|
|
5
5
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
6
6
|
*
|
|
7
|
-
* @codegen <<SignedSource::
|
|
7
|
+
* @codegen <<SignedSource::7beb355391f6269c701cf87b0c222d69>>
|
|
8
8
|
* @codegenCommand yarn workspace @atlaskit/link-create run codegen-analytics
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
4
|
-
import messages from '../../../i18n/en';
|
|
5
3
|
export var fetchMessagesForLocale = /*#__PURE__*/function () {
|
|
6
4
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(locale) {
|
|
7
|
-
var
|
|
5
|
+
var messages, parentLocale, _messages;
|
|
8
6
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
9
7
|
while (1) switch (_context.prev = _context.next) {
|
|
10
8
|
case 0:
|
|
@@ -12,8 +10,8 @@ export var fetchMessagesForLocale = /*#__PURE__*/function () {
|
|
|
12
10
|
_context.next = 3;
|
|
13
11
|
return import( /* webpackChunkName: "@atlaskit-internal_@atlassian/link-create-confluence-i18n-[request]" */"../../../i18n/".concat(locale.replace('-', '_')));
|
|
14
12
|
case 3:
|
|
15
|
-
|
|
16
|
-
return _context.abrupt("return",
|
|
13
|
+
messages = _context.sent;
|
|
14
|
+
return _context.abrupt("return", messages.default);
|
|
17
15
|
case 7:
|
|
18
16
|
_context.prev = 7;
|
|
19
17
|
_context.t0 = _context["catch"](0);
|
|
@@ -23,20 +21,12 @@ export var fetchMessagesForLocale = /*#__PURE__*/function () {
|
|
|
23
21
|
_context.next = 13;
|
|
24
22
|
return import( /* webpackChunkName: "@atlaskit-internal_@atlassian/link-create-confluence-i18n-[request]" */"../../../i18n/".concat(parentLocale));
|
|
25
23
|
case 13:
|
|
26
|
-
|
|
27
|
-
return _context.abrupt("return",
|
|
24
|
+
_messages = _context.sent;
|
|
25
|
+
return _context.abrupt("return", _messages.default);
|
|
28
26
|
case 17:
|
|
29
27
|
_context.prev = 17;
|
|
30
28
|
_context.t1 = _context["catch"](9);
|
|
31
29
|
case 19:
|
|
32
|
-
if (!getBooleanFF('platform.linking-platform.link-create.tmp-fix-translations')) {
|
|
33
|
-
_context.next = 21;
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
return _context.abrupt("return");
|
|
37
|
-
case 21:
|
|
38
|
-
return _context.abrupt("return", messages);
|
|
39
|
-
case 22:
|
|
40
30
|
case "end":
|
|
41
31
|
return _context.stop();
|
|
42
32
|
}
|
|
@@ -13,6 +13,27 @@ var ExperienceContext = /*#__PURE__*/createContext({
|
|
|
13
13
|
failure: function failure() {}
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Error message matches to ignore
|
|
18
|
+
* These should not affect our SLOs as there's nothing we can do about them
|
|
19
|
+
*/
|
|
20
|
+
var IGNORE_ERROR_MESSAGES = [/failed to fetch/i];
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Returns false for errors that should not be considered failures of our SLO
|
|
24
|
+
* because they are failures only the user can handle.
|
|
25
|
+
*/
|
|
26
|
+
var isErrorSLOFailure = function isErrorSLOFailure(error) {
|
|
27
|
+
if (error instanceof Error) {
|
|
28
|
+
if (IGNORE_ERROR_MESSAGES.some(function (msg) {
|
|
29
|
+
return msg.test(error.message);
|
|
30
|
+
})) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return true;
|
|
35
|
+
};
|
|
36
|
+
|
|
16
37
|
/**
|
|
17
38
|
* Experience provider that simply keeps track of the state of the experience.
|
|
18
39
|
* Fires an operational event when experience state changes to FAILED.
|
|
@@ -56,7 +77,11 @@ export var Experience = function Experience(_ref) {
|
|
|
56
77
|
* Previous experience status indicates whether the experience
|
|
57
78
|
* has just failed now, or has already failing
|
|
58
79
|
*/
|
|
59
|
-
previousExperienceStatus: experience.current
|
|
80
|
+
previousExperienceStatus: experience.current,
|
|
81
|
+
/**
|
|
82
|
+
* Whether the failure should be involved when considering SLI/SLO
|
|
83
|
+
*/
|
|
84
|
+
isSLOFailure: getBooleanFF('platform.linking-platform.link-create.slo-ignore-failed-fetch') ? isErrorSLOFailure(error) : true
|
|
60
85
|
}, getNetworkFields(error)))).fire(ANALYTICS_CHANNEL);
|
|
61
86
|
if (error instanceof Error) {
|
|
62
87
|
if (getBooleanFF('platform.linking-platform.link-create.enable-sentry-client')) {
|
|
@@ -64,8 +89,22 @@ export var Experience = function Experience(_ref) {
|
|
|
64
89
|
captureException(error, 'link-create');
|
|
65
90
|
}
|
|
66
91
|
}
|
|
67
|
-
if (
|
|
68
|
-
|
|
92
|
+
if (getBooleanFF('platform.linking-platform.link-create.slo-ignore-failed-fetch')) {
|
|
93
|
+
/**
|
|
94
|
+
* Only consider the experience truly failed if the
|
|
95
|
+
* failure is one we haven't correctly handled.
|
|
96
|
+
*
|
|
97
|
+
* In otherwords allow the experience to be "restarted" for the user to try again
|
|
98
|
+
*/
|
|
99
|
+
if (isErrorSLOFailure(error)) {
|
|
100
|
+
if (experience.current !== experienceStatus) {
|
|
101
|
+
experience.current = experienceStatus;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
} else {
|
|
105
|
+
if (experience.current !== experienceStatus) {
|
|
106
|
+
experience.current = experienceStatus;
|
|
107
|
+
}
|
|
69
108
|
}
|
|
70
109
|
}
|
|
71
110
|
};
|
package/dist/esm/ui/main.js
CHANGED
|
@@ -23,7 +23,7 @@ var LinkCreateWithAnalyticsContext = withLinkCreateAnalyticsContext( /*#__PURE__
|
|
|
23
23
|
}));
|
|
24
24
|
export var PACKAGE_DATA = {
|
|
25
25
|
packageName: "@atlaskit/link-create" || '',
|
|
26
|
-
packageVersion: "1.13.
|
|
26
|
+
packageVersion: "1.13.3" || '',
|
|
27
27
|
component: COMPONENT_NAME,
|
|
28
28
|
componentName: COMPONENT_NAME
|
|
29
29
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::7beb355391f6269c701cf87b0c222d69>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/link-create run codegen-analytics
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataType = {
|
|
@@ -46,6 +46,7 @@ export type LinkCreateExperienceFailedAttributesType = {
|
|
|
46
46
|
path: string | null;
|
|
47
47
|
status: number | null;
|
|
48
48
|
traceId: string | null;
|
|
49
|
+
isSLOFailure: boolean;
|
|
49
50
|
};
|
|
50
51
|
export type AnalyticsEventAttributes = {
|
|
51
52
|
'screen.linkCreateScreen.viewed': LinkCreateScreenViewedAttributesType;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Generates Typescript types for analytics events from analytics.spec.yaml
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::7beb355391f6269c701cf87b0c222d69>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/link-create run codegen-analytics
|
|
8
8
|
*/
|
|
9
9
|
export type PackageMetaDataType = {
|
|
@@ -46,6 +46,7 @@ export type LinkCreateExperienceFailedAttributesType = {
|
|
|
46
46
|
path: string | null;
|
|
47
47
|
status: number | null;
|
|
48
48
|
traceId: string | null;
|
|
49
|
+
isSLOFailure: boolean;
|
|
49
50
|
};
|
|
50
51
|
export type AnalyticsEventAttributes = {
|
|
51
52
|
'screen.linkCreateScreen.viewed': LinkCreateScreenViewedAttributesType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-create",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.3",
|
|
4
4
|
"description": "The driver component of meta creation flow",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -38,19 +38,19 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
41
|
-
"@atlaskit/button": "^17.
|
|
41
|
+
"@atlaskit/button": "^17.2.0",
|
|
42
42
|
"@atlaskit/empty-state": "^7.6.0",
|
|
43
43
|
"@atlaskit/form": "^9.0.3",
|
|
44
44
|
"@atlaskit/icon": "^22.0.0",
|
|
45
45
|
"@atlaskit/intl-messages-provider": "^1.0.2",
|
|
46
|
-
"@atlaskit/linking-common": "^5.
|
|
46
|
+
"@atlaskit/linking-common": "^5.3.0",
|
|
47
47
|
"@atlaskit/modal-dialog": "^12.10.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
49
|
-
"@atlaskit/primitives": "^1.
|
|
49
|
+
"@atlaskit/primitives": "^1.16.0",
|
|
50
50
|
"@atlaskit/select": "^17.0.3",
|
|
51
51
|
"@atlaskit/spinner": "^16.0.0",
|
|
52
52
|
"@atlaskit/textfield": "^6.0.0",
|
|
53
|
-
"@atlaskit/tokens": "^1.
|
|
53
|
+
"@atlaskit/tokens": "^1.33.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
55
|
"@emotion/react": "^11.7.1",
|
|
56
56
|
"debounce-promise": "^3.1.2",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"platform.linking-platform.link-create.tmp-log-error-message": {
|
|
127
127
|
"type": "boolean"
|
|
128
128
|
},
|
|
129
|
-
"platform.linking-platform.link-create.
|
|
129
|
+
"platform.linking-platform.link-create.slo-ignore-failed-fetch": {
|
|
130
130
|
"type": "boolean"
|
|
131
131
|
}
|
|
132
132
|
}
|